lkml.org 
[lkml]   [2023]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 5/5] mfd: max77541: Add ADI MAX77541/MAX77540 PMIC Support
On Wed, Mar 29, 2023 at 03:36:15PM +0100, Lee Jones wrote:
> On Tue, 28 Mar 2023, Sahin, Okan wrote:
> > >On Wed, 15 Mar 2023, Lee Jones wrote:
> > >> On Tue, 07 Mar 2023, Okan Sahin wrote:

...

> > +static const struct i2c_device_id max77541_i2c_id[] = {
> > + { "max77540", (kernel_ulong_t)&chip[MAX77540] },
> > + { "max77541", (kernel_ulong_t)&chip[MAX77541] },
>
> Just 'MAX77540' is fine.

I tend to disagree.

There is an error prone approach esp. when we talk with some functions
that unifies OF/ACPI driver data retrieval with legacy ID tables.
In such a case the 0 from enum is hard to distinguish from NULL when
the driver data is not set or not found. On top of that the simple integer
in the legacy driver data will require additional code to be added in
the ->probe().

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-03-29 16:46    [W:1.003 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site