Re: [PATCH v2] iio: addac: stx104: Migrate to the regmap API
From: Jonathan Cameron
Date: Sat Apr 01 2023 - 09:30:15 EST
On Sun, 26 Mar 2023 17:13:18 -0400
William Breathitt Gray <william.gray@xxxxxxxxxx> wrote:
> On Sun, Mar 26, 2023 at 04:49:20PM +0100, Jonathan Cameron wrote:
> > On Thu, 23 Mar 2023 23:09:16 -0400
> > William Breathitt Gray <william.gray@xxxxxxxxxx> wrote:
> >
> > > The regmap API supports IO port accessors so we can take advantage of
> > > regmap abstractions rather than handling access to the device registers
> > > directly in the driver.
> > >
> > > Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > > Signed-off-by: William Breathitt Gray <william.gray@xxxxxxxxxx>
> >
> > I would have preferred slightly if you had avoided reording the probe
> > (previously gpio chip was registered before iio device and now it is after)
> > but it make no real difference so I'm not that bothered.
> >
> > A few other minor comments. Biggest one being that the defines should be
> > prefixed.
> >
> > Thanks,
> >
> > Jonathan
>
> Hi Jonathan,
>
> I'll be submitting a v3 soon addressing your comments as well as some
> minor fixes to v2; I'll make the regmap_read_poll_timeout() change as a
> follow-up patch as suggested.
>
> Regarding the GPIO code reordering in the probe, I decided to move it
> after the iio device registration so that all the IIO-related code is
> grouped together and finished before we deal with GPIO-related stuff.
> Given that all the original gpio chip code is removed anyway in this
> patch, I figure this is a minor enough cleanup to perform here. If you
> aren't too strongly opposed to this change I'll keep it in v3 as it
> avoids the hassle of creating a separate patch for such a trivial
> change.
That's fine, just call it out in the patch description as a
"While making these changes, also ..." or similar.
Jonathan
>
> William Breathitt Gray