* [PATCH] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*
@ 2025-06-07 20:22 linux
2025-06-13 14:37 ` Lee Jones
2025-06-13 14:39 ` (subset) " Lee Jones
0 siblings, 2 replies; 5+ messages in thread
From: linux @ 2025-06-07 20:22 UTC (permalink / raw)
To: aaro.koskinen, andreas, khilman, rogerq, tony
Cc: lee, linux-omap, linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
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>
---
drivers/mfd/twl6030-irq.c | 74 ---------------------------------------
include/linux/mfd/twl.h | 21 -----------
2 files changed, 95 deletions(-)
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 00b14cef1dfb..ffb4b98639c7 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -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, ®_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, ®_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)
{
diff --git a/include/linux/mfd/twl.h b/include/linux/mfd/twl.h
index 85dc406173db..b31e07fa4d51 100644
--- a/include/linux/mfd/twl.h
+++ b/include/linux/mfd/twl.h
@@ -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
/*----------------------------------------------------------------------*/
/*
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*
2025-06-07 20:22 [PATCH] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect* linux
@ 2025-06-13 14:37 ` Lee Jones
2025-06-13 15:27 ` Dr. David Alan Gilbert
2025-06-13 14:39 ` (subset) " Lee Jones
1 sibling, 1 reply; 5+ messages in thread
From: Lee Jones @ 2025-06-13 14:37 UTC (permalink / raw)
To: linux
Cc: aaro.koskinen, andreas, khilman, rogerq, tony, linux-omap,
linux-kernel
On Sat, 07 Jun 2025, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> 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")
This formatting is driving the little OCD being that lives on my
shoulder crazy! I'll fix-up and apply the patch. Bear with.
> Remove them.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> ---
> drivers/mfd/twl6030-irq.c | 74 ---------------------------------------
> include/linux/mfd/twl.h | 21 -----------
> 2 files changed, 95 deletions(-)
>
> diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
> index 00b14cef1dfb..ffb4b98639c7 100644
> --- a/drivers/mfd/twl6030-irq.c
> +++ b/drivers/mfd/twl6030-irq.c
> @@ -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, ®_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, ®_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)
> {
> diff --git a/include/linux/mfd/twl.h b/include/linux/mfd/twl.h
> index 85dc406173db..b31e07fa4d51 100644
> --- a/include/linux/mfd/twl.h
> +++ b/include/linux/mfd/twl.h
> @@ -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
> /*----------------------------------------------------------------------*/
>
> /*
> --
> 2.49.0
>
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*
2025-06-13 14:37 ` Lee Jones
@ 2025-06-13 15:27 ` Dr. David Alan Gilbert
2025-06-19 11:51 ` Lee Jones
0 siblings, 1 reply; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2025-06-13 15:27 UTC (permalink / raw)
To: Lee Jones
Cc: aaro.koskinen, andreas, khilman, rogerq, tony, linux-omap,
linux-kernel
* Lee Jones (lee@kernel.org) wrote:
> On Sat, 07 Jun 2025, linux@treblig.org wrote:
>
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> >
> > 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")
>
> This formatting is driving the little OCD being that lives on my
> shoulder crazy!
Thanks, which bit? I tend to put the commit .... on it's own
line, but then checkpatch really doesn't like long lines so I wrap
any word that starts after col 75.
> I'll fix-up and apply the patch. Bear with.
Thanks!
Dave
>
> > Remove them.
> >
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > ---
> > drivers/mfd/twl6030-irq.c | 74 ---------------------------------------
> > include/linux/mfd/twl.h | 21 -----------
> > 2 files changed, 95 deletions(-)
> >
> > diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
> > index 00b14cef1dfb..ffb4b98639c7 100644
> > --- a/drivers/mfd/twl6030-irq.c
> > +++ b/drivers/mfd/twl6030-irq.c
> > @@ -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, ®_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, ®_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)
> > {
> > diff --git a/include/linux/mfd/twl.h b/include/linux/mfd/twl.h
> > index 85dc406173db..b31e07fa4d51 100644
> > --- a/include/linux/mfd/twl.h
> > +++ b/include/linux/mfd/twl.h
> > @@ -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
> > /*----------------------------------------------------------------------*/
> >
> > /*
> > --
> > 2.49.0
> >
>
> --
> Lee Jones [李琼斯]
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*
2025-06-13 15:27 ` Dr. David Alan Gilbert
@ 2025-06-19 11:51 ` Lee Jones
0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2025-06-19 11:51 UTC (permalink / raw)
To: Dr. David Alan Gilbert
Cc: aaro.koskinen, andreas, khilman, rogerq, tony, linux-omap,
linux-kernel
On Fri, 13 Jun 2025, Dr. David Alan Gilbert wrote:
> * Lee Jones (lee@kernel.org) wrote:
> > On Sat, 07 Jun 2025, linux@treblig.org wrote:
> >
> > > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > >
> > > 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")
> >
> > This formatting is driving the little OCD being that lives on my
> > shoulder crazy!
>
> Thanks, which bit? I tend to put the commit .... on it's own
> line, but then checkpatch really doesn't like long lines so I wrap
> any word that starts after col 75.
No need to put the commit on a new line.
> > I'll fix-up and apply the patch. Bear with.
>
> Thanks!
NP
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (subset) [PATCH] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*
2025-06-07 20:22 [PATCH] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect* linux
2025-06-13 14:37 ` Lee Jones
@ 2025-06-13 14:39 ` Lee Jones
1 sibling, 0 replies; 5+ messages in thread
From: Lee Jones @ 2025-06-13 14:39 UTC (permalink / raw)
To: aaro.koskinen, andreas, khilman, rogerq, tony, linux
Cc: lee, linux-omap, linux-kernel
On Sat, 07 Jun 2025 21:22:32 +0100, linux@treblig.org wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*
commit: 3d5341b17ca242fbf1dc78d642c36af0a510c758
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-19 11:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-07 20:22 [PATCH] mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect* linux
2025-06-13 14:37 ` Lee Jones
2025-06-13 15:27 ` Dr. David Alan Gilbert
2025-06-19 11:51 ` Lee Jones
2025-06-13 14:39 ` (subset) " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).