Re: [PATCH v3 14/24] iio: accel: kxcjk-1013: Get rid of enum kx_chipset

Andy Shevchenko
2024-10-28T09:50:19Z

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@linux.intel.com> 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@linux.intel.com>
> 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