* [PATCH 28/28] mfd: ti_am335x_tscadc: Remove redundant ti_tscadc_dev_get() helper
[not found] <20261021121245.3111563-1-lee@kernel.org>
@ 2026-10-21 12:09 ` Lee Jones
2026-10-21 14:02 ` Andy Shevchenko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lee Jones @ 2026-10-21 12:09 UTC (permalink / raw)
To: lee, Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko, Dmitry Torokhov, Shi Hao, Rachna Patil,
linux-iio, linux-kernel, linux-input, mfd
Now that ti_tscadc_dev_get() is a single-line wrapper around
dev_get_drvdata(p->dev.parent), remove the bespoke helper and retrieve
the parent driver data directly in the child ADC and touchscreen
drivers.
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/iio/adc/ti_am335x_adc.c | 2 +-
drivers/input/touchscreen/ti_am335x_tsc.c | 2 +-
include/linux/mfd/ti_am335x_tscadc.h | 5 -----
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index 1516dd332f90..77ea59d6c6b7 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -636,7 +636,7 @@ static int tiadc_probe(struct platform_device *pdev)
adc_dev = iio_priv(indio_dev);
- adc_dev->mfd_tscadc = ti_tscadc_dev_get(pdev);
+ adc_dev->mfd_tscadc = dev_get_drvdata(pdev->dev.parent);
tiadc_parse_dt(pdev, adc_dev);
indio_dev->name = dev_name(&pdev->dev);
diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
index 623546e80668..40ffdec9d207 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -418,7 +418,7 @@ static int titsc_probe(struct platform_device *pdev)
{
struct titsc *ts_dev;
struct input_dev *input_dev;
- struct ti_tscadc_dev *tscadc_dev = ti_tscadc_dev_get(pdev);
+ struct ti_tscadc_dev *tscadc_dev = dev_get_drvdata(pdev->dev.parent);
int err;
/* Allocate memory for device */
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index 4a048a897cf3..36d365b64fe6 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -175,11 +175,6 @@ struct ti_tscadc_dev {
struct adc_device *adc;
};
-static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p)
-{
- return dev_get_drvdata(p->dev.parent);
-}
-
static inline bool ti_adc_with_touchscreen(struct ti_tscadc_dev *tscadc)
{
return of_device_is_compatible(tscadc->dev->of_node,
--
2.56.0.218.g1ec904b173-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 28/28] mfd: ti_am335x_tscadc: Remove redundant ti_tscadc_dev_get() helper
2026-10-21 12:09 ` [PATCH 28/28] mfd: ti_am335x_tscadc: Remove redundant ti_tscadc_dev_get() helper Lee Jones
@ 2026-10-21 14:02 ` Andy Shevchenko
2026-10-21 16:52 ` Dmitry Torokhov
2026-10-21 19:19 ` Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-10-21 14:02 UTC (permalink / raw)
To: Lee Jones
Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Dmitry Torokhov, Shi Hao, Rachna Patil, linux-iio, linux-kernel,
linux-input, mfd
On Wed, Oct 21, 2026 at 12:09:50PM +0000, Lee Jones wrote:
> Now that ti_tscadc_dev_get() is a single-line wrapper around
> dev_get_drvdata(p->dev.parent), remove the bespoke helper and retrieve
> the parent driver data directly in the child ADC and touchscreen
> drivers.
I don't see more patches Cc'ed to me, so I don't know if this one makes sense
or not, but OTOH I don't care much, both approaches are fine with me.
Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 28/28] mfd: ti_am335x_tscadc: Remove redundant ti_tscadc_dev_get() helper
2026-10-21 12:09 ` [PATCH 28/28] mfd: ti_am335x_tscadc: Remove redundant ti_tscadc_dev_get() helper Lee Jones
2026-10-21 14:02 ` Andy Shevchenko
@ 2026-10-21 16:52 ` Dmitry Torokhov
2026-10-21 19:19 ` Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2026-10-21 16:52 UTC (permalink / raw)
To: Lee Jones
Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Shi Hao, Rachna Patil, linux-iio, linux-kernel, linux-input, mfd
On Wed, Oct 21, 2026 at 12:09:50PM +0000, Lee Jones wrote:
> Now that ti_tscadc_dev_get() is a single-line wrapper around
> dev_get_drvdata(p->dev.parent), remove the bespoke helper and retrieve
> the parent driver data directly in the child ADC and touchscreen
> drivers.
>
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> drivers/iio/adc/ti_am335x_adc.c | 2 +-
> drivers/input/touchscreen/ti_am335x_tsc.c | 2 +-
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> # for input
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 28/28] mfd: ti_am335x_tscadc: Remove redundant ti_tscadc_dev_get() helper
2026-10-21 12:09 ` [PATCH 28/28] mfd: ti_am335x_tscadc: Remove redundant ti_tscadc_dev_get() helper Lee Jones
2026-10-21 14:02 ` Andy Shevchenko
2026-10-21 16:52 ` Dmitry Torokhov
@ 2026-10-21 19:19 ` Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2026-10-21 19:19 UTC (permalink / raw)
To: Lee Jones
Cc: David Lechner, Nuno Sá, Andy Shevchenko, Dmitry Torokhov,
Shi Hao, Rachna Patil, linux-iio, linux-kernel, linux-input, mfd
On Wed, 21 Oct 2026 12:09:50 +0000
Lee Jones <lee@kernel.org> wrote:
> Now that ti_tscadc_dev_get() is a single-line wrapper around
> dev_get_drvdata(p->dev.parent), remove the bespoke helper and retrieve
> the parent driver data directly in the child ADC and touchscreen
> drivers.
>
> Signed-off-by: Lee Jones <lee@kernel.org>
Acked-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Seems moderately unlikely we will get a flurry of activity on
this driver and if we do merge conflicts should be minimal
so no need for an immutable I think.
J
> ---
> drivers/iio/adc/ti_am335x_adc.c | 2 +-
> drivers/input/touchscreen/ti_am335x_tsc.c | 2 +-
> include/linux/mfd/ti_am335x_tscadc.h | 5 -----
> 3 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> index 1516dd332f90..77ea59d6c6b7 100644
> --- a/drivers/iio/adc/ti_am335x_adc.c
> +++ b/drivers/iio/adc/ti_am335x_adc.c
> @@ -636,7 +636,7 @@ static int tiadc_probe(struct platform_device *pdev)
>
> adc_dev = iio_priv(indio_dev);
>
> - adc_dev->mfd_tscadc = ti_tscadc_dev_get(pdev);
> + adc_dev->mfd_tscadc = dev_get_drvdata(pdev->dev.parent);
> tiadc_parse_dt(pdev, adc_dev);
>
> indio_dev->name = dev_name(&pdev->dev);
> diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
> index 623546e80668..40ffdec9d207 100644
> --- a/drivers/input/touchscreen/ti_am335x_tsc.c
> +++ b/drivers/input/touchscreen/ti_am335x_tsc.c
> @@ -418,7 +418,7 @@ static int titsc_probe(struct platform_device *pdev)
> {
> struct titsc *ts_dev;
> struct input_dev *input_dev;
> - struct ti_tscadc_dev *tscadc_dev = ti_tscadc_dev_get(pdev);
> + struct ti_tscadc_dev *tscadc_dev = dev_get_drvdata(pdev->dev.parent);
> int err;
>
> /* Allocate memory for device */
> diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
> index 4a048a897cf3..36d365b64fe6 100644
> --- a/include/linux/mfd/ti_am335x_tscadc.h
> +++ b/include/linux/mfd/ti_am335x_tscadc.h
> @@ -175,11 +175,6 @@ struct ti_tscadc_dev {
> struct adc_device *adc;
> };
>
> -static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p)
> -{
> - return dev_get_drvdata(p->dev.parent);
> -}
> -
> static inline bool ti_adc_with_touchscreen(struct ti_tscadc_dev *tscadc)
> {
> return of_device_is_compatible(tscadc->dev->of_node,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-21 19:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261021121245.3111563-1-lee@kernel.org>
2026-10-21 12:09 ` [PATCH 28/28] mfd: ti_am335x_tscadc: Remove redundant ti_tscadc_dev_get() helper Lee Jones
2026-10-21 14:02 ` Andy Shevchenko
2026-10-21 16:52 ` Dmitry Torokhov
2026-10-21 19:19 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox