Re: [PATCH] hwmon: (ina2xx) drop unused platform data

From: Andy Shevchenko

Date: Thu Mar 26 2026 - 14:34:15 EST


On Thu, Mar 26, 2026 at 07:12:16AM -0700, Guenter Roeck wrote:
> On Thu, Mar 26, 2026 at 12:23:20PM +0200, Andy Shevchenko wrote:
> > On Thu, Mar 26, 2026 at 10:30:00AM +0100, Bartosz Golaszewski wrote:
> > > Nobody defines struct ina2xx_platform_data. Remove platform data support
> > > from the drivers which still have it (it's effectively dead code) and
> > > remove the header.
> >
> > Would be nice to see a follow up to convert to use device properties.
> > But again, I already asked this Q: why do we have two drivers for the
> > same part? (Probably not to you, Bart)
>
> Because the person introducing the iio driver claimed that they needed
> the iio ABI and were unwilling to create a generic hwmon->iio bridge.

Okay, but why did we allow that? I fell uncomfortable to bear two drivers
of the same when the whole idea of the kernel is reduce duplication. Yes,
I know that there are more cross-subsystem examples that we have IIO vs.
other subsystem cases (usually in drivers/input), but I believe it was
historical and for new devices I would like to have a stricter rules. IIO
hwmon bridge is exactly for that and if it lacks something we rather should
discuss improving that instead of duplications.

--
With Best Regards,
Andy Shevchenko