lkml.org 
[lkml]   [2023]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/5] iio: pressure: bmp280: Add enumeration to handle chip variants
From
Date
On Tue, 2022-12-27 at 23:37 +0200, Andy Shevchenko wrote:
> On Mon, Dec 26, 2022 at 03:29:20PM +0100, Angel Iglesias wrote:
> > Adds enumeration to improve handling the different supported sensors
> > on driver initialization. This avoid collisions if different variants
> > share the same device idetifier on ID register.
>
> As per v1, use pointers in the ID tables.
>

Taking your suggestion and Jonathan's remarks into account seems to me like the
best approach here is using chip_info pointer for each driver as the pointer set
on the id tables. As in the i2c and spi drivers, the enum is used to fetch the
correct regmap configuration, and later in the shared probe, the chip_info. The
logical follow-up would be adding the regmap configuration to the chip_info,
right?
Or is there a better solution I'm not seeing right now?

Thanks for your time,
Angel

\
 
 \ /
  Last update: 2023-03-26 23:24    [W:0.117 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site