Re: [PATCH v3 14/24] iio: accel: kxcjk-1013: Get rid of enum kx_chipset
From: Andy Shevchenko
Date: Mon Oct 28 2024 - 05:50:32 EST
On Sat, Oct 26, 2024 at 12:37:36PM +0100, Jonathan Cameron wrote:
> On Thu, 24 Oct 2024 22:05:03 +0300
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> > Instead of using enum, out of which only a couple of values
> > are being actully used, make a comparisons against pointer
> > to the respective chip_info structures.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Hmm. Maybe worth a revisit longer term to use callbacks for the
> decisions instead of matching at all as this stuff tends not to end
> up being specific to one version of a chip as more parts are added.
As already mentioned in another reply, yes, the callbacks is the future.
--
With Best Regards,
Andy Shevchenko