]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*
authorDr. David Alan Gilbert <linux@treblig.org>
Sat, 7 Jun 2025 20:22:32 +0000 (21:22 +0100)
committerLee Jones <lee@kernel.org>
Thu, 24 Jul 2025 10:27:00 +0000 (11:27 +0100)
twl6030_mmc_card_detect() and twl6030_mmc_card_detect_config() have been
unused since 2013's commit b2ff4790612b ("ARM: OMAP2+: Remove legacy
omap4_twl6030_hsmmc_init")

Remove them.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250607202232.265344-1-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/twl6030-irq.c
include/linux/mfd/twl.h

index 00b14cef1dfb59e32911115690ee55154215e817..ffb4b98639c7ddf9934d38f62817c98457d01bee 100644 (file)
@@ -256,80 +256,6 @@ int twl6030_interrupt_mask(u8 bit_mask, u8 offset)
 }
 EXPORT_SYMBOL(twl6030_interrupt_mask);
 
-int twl6030_mmc_card_detect_config(void)
-{
-       int ret;
-       u8 reg_val = 0;
-
-       /* Unmasking the Card detect Interrupt line for MMC1 from Phoenix */
-       twl6030_interrupt_unmask(TWL6030_MMCDETECT_INT_MASK,
-                                               REG_INT_MSK_LINE_B);
-       twl6030_interrupt_unmask(TWL6030_MMCDETECT_INT_MASK,
-                                               REG_INT_MSK_STS_B);
-       /*
-        * Initially Configuring MMC_CTRL for receiving interrupts &
-        * Card status on TWL6030 for MMC1
-        */
-       ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, &reg_val, TWL6030_MMCCTRL);
-       if (ret < 0) {
-               pr_err("twl6030: Failed to read MMCCTRL, error %d\n", ret);
-               return ret;
-       }
-       reg_val &= ~VMMC_AUTO_OFF;
-       reg_val |= SW_FC;
-       ret = twl_i2c_write_u8(TWL6030_MODULE_ID0, reg_val, TWL6030_MMCCTRL);
-       if (ret < 0) {
-               pr_err("twl6030: Failed to write MMCCTRL, error %d\n", ret);
-               return ret;
-       }
-
-       /* Configuring PullUp-PullDown register */
-       ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, &reg_val,
-                                               TWL6030_CFG_INPUT_PUPD3);
-       if (ret < 0) {
-               pr_err("twl6030: Failed to read CFG_INPUT_PUPD3, error %d\n",
-                                                                       ret);
-               return ret;
-       }
-       reg_val &= ~(MMC_PU | MMC_PD);
-       ret = twl_i2c_write_u8(TWL6030_MODULE_ID0, reg_val,
-                                               TWL6030_CFG_INPUT_PUPD3);
-       if (ret < 0) {
-               pr_err("twl6030: Failed to write CFG_INPUT_PUPD3, error %d\n",
-                                                                       ret);
-               return ret;
-       }
-
-       return irq_find_mapping(twl6030_irq->irq_domain,
-                                MMCDETECT_INTR_OFFSET);
-}
-EXPORT_SYMBOL(twl6030_mmc_card_detect_config);
-
-int twl6030_mmc_card_detect(struct device *dev, int slot)
-{
-       int ret = -EIO;
-       u8 read_reg = 0;
-       struct platform_device *pdev = to_platform_device(dev);
-
-       if (pdev->id) {
-               /* TWL6030 provide's Card detect support for
-                * only MMC1 controller.
-                */
-               pr_err("Unknown MMC controller %d in %s\n", pdev->id, __func__);
-               return ret;
-       }
-       /*
-        * BIT0 of MMC_CTRL on TWL6030 provides card status for MMC1
-        * 0 - Card not present ,1 - Card present
-        */
-       ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, &read_reg,
-                                               TWL6030_MMCCTRL);
-       if (ret >= 0)
-               ret = read_reg & STS_MMC;
-       return ret;
-}
-EXPORT_SYMBOL(twl6030_mmc_card_detect);
-
 static int twl6030_irq_map(struct irq_domain *d, unsigned int virq,
                              irq_hw_number_t hwirq)
 {
index 85dc406173dba92b2c5b64f49dbfb0c176b96f1e..b31e07fa4d516450f1c31643d97b847820c1c553 100644 (file)
@@ -205,27 +205,6 @@ int twl_get_hfclk_rate(void);
 int twl6030_interrupt_unmask(u8 bit_mask, u8 offset);
 int twl6030_interrupt_mask(u8 bit_mask, u8 offset);
 
-/* Card detect Configuration for MMC1 Controller on OMAP4 */
-#ifdef CONFIG_TWL4030_CORE
-int twl6030_mmc_card_detect_config(void);
-#else
-static inline int twl6030_mmc_card_detect_config(void)
-{
-       pr_debug("twl6030_mmc_card_detect_config not supported\n");
-       return 0;
-}
-#endif
-
-/* MMC1 Controller on OMAP4 uses Phoenix irq for Card detect */
-#ifdef CONFIG_TWL4030_CORE
-int twl6030_mmc_card_detect(struct device *dev, int slot);
-#else
-static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
-{
-       pr_debug("Call back twl6030_mmc_card_detect not supported\n");
-       return -EIO;
-}
-#endif
 /*----------------------------------------------------------------------*/
 
 /*