[PATCH v7 0/8] iio: magnetometer: ak8975: driver cleanup

Joshua Crofts via B4 Relay posted 8 patches 1 month ago
There is a newer version of this series
drivers/iio/magnetometer/ak8975.c | 269 +++++++++++++++++++-------------------
1 file changed, 134 insertions(+), 135 deletions(-)
[PATCH v7 0/8] iio: magnetometer: ak8975: driver cleanup
Posted by Joshua Crofts via B4 Relay 1 month ago
This series is a continuation of the previous ak8975 driver cleanup
effort, as most of the patches were picked.

Changes include:
- using BIT() and GENMASK() macros
- moving to devm_* resource management
- adding a scan index enum
- moving from using wait loops to iopoll functions
- various code style changes

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
---
Changes in v7:
- Changed revision to v7 as series is a continuation of previous series
- Added Nuno's Reviewed-by tag
- PATCH 3: change order of pm_runtime initialization
- Link to v6: https://lore.kernel.org/r/20260507-magnetometer-fixes-post-pickup-v1-0-37827ca68fb3@gmail.com

---
Andy Shevchenko (5):
      iio: magnetometer: ak8975: switch to using managed resources
      iio: magnetometer: ak8975: consistently use 'data' parameter
      iio: magnetometer: ak8975: unify messages with help of dev_err_probe()
      iio: magnetometer: ak8975: use temporary variable for struct device
      iio: magnetometer: ak8975: make use of the macros from bits.h

Joshua Crofts (3):
      iio: magnetometer: ak8975: modernize polling loops with iopoll() macros
      iio: magnetometer: ak8975: check if gpiod read was successful
      iio: magnetometer: ak8975: add scan mask index enum

 drivers/iio/magnetometer/ak8975.c | 269 +++++++++++++++++++-------------------
 1 file changed, 134 insertions(+), 135 deletions(-)
---
base-commit: 74d173f29572951629d1e0b7456b424006e51b87
change-id: 20260507-magnetometer-fixes-post-pickup-c6dabdd66f54

Best regards,
-- 
Joshua Crofts <joshua.crofts1@gmail.com>
Re: [PATCH v7 0/8] iio: magnetometer: ak8975: driver cleanup
Posted by Andy Shevchenko 1 month ago
On Mon, May 11, 2026 at 01:26:09PM +0200, Joshua Crofts via B4 Relay wrote:
> This series is a continuation of the previous ak8975 driver cleanup
> effort, as most of the patches were picked.
> 
> Changes include:
> - using BIT() and GENMASK() macros
> - moving to devm_* resource management
> - adding a scan index enum
> - moving from using wait loops to iopoll functions
> - various code style changes

Thanks for doing this!

Jonathan, the same Q I had in previous version round, can we get some patches
applied to reduce the burden of the series? (I think of 1, 2, 7, 8 and might be
more.) As for the series, I think if this version is still not good enough
(patch 3) we need to rearrange it so that patch is going to the end (as much as
possible) of the series, so we want delay the 'good' ones to be applied.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v7 0/8] iio: magnetometer: ak8975: driver cleanup
Posted by Joshua Crofts 1 month ago
On Tue, 12 May 2026 at 11:12, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Mon, May 11, 2026 at 01:26:09PM +0200, Joshua Crofts via B4 Relay wrote:
> > This series is a continuation of the previous ak8975 driver cleanup
> > effort, as most of the patches were picked.
> >
> > Changes include:
> > - using BIT() and GENMASK() macros
> > - moving to devm_* resource management
> > - adding a scan index enum
> > - moving from using wait loops to iopoll functions
> > - various code style changes
>
> Thanks for doing this!
>
> Jonathan, the same Q I had in previous version round, can we get some patches
> applied to reduce the burden of the series? (I think of 1, 2, 7, 8 and might be
> more.) As for the series, I think if this version is still not good enough
> (patch 3) we need to rearrange it so that patch is going to the end (as much as
> possible) of the series, so we want delay the 'good' ones to be applied.

IMO all patches excluding the shared resource management patch are good
to go. I can send a new version reordered to reduce the headache.

-- 
Kind regards

CJD
Re: [PATCH v7 0/8] iio: magnetometer: ak8975: driver cleanup
Posted by Jonathan Cameron 1 month ago
On Tue, 12 May 2026 11:16:17 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:

> On Tue, 12 May 2026 at 11:12, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Mon, May 11, 2026 at 01:26:09PM +0200, Joshua Crofts via B4 Relay wrote:  
> > > This series is a continuation of the previous ak8975 driver cleanup
> > > effort, as most of the patches were picked.
> > >
> > > Changes include:
> > > - using BIT() and GENMASK() macros
> > > - moving to devm_* resource management
> > > - adding a scan index enum
> > > - moving from using wait loops to iopoll functions
> > > - various code style changes  
> >
> > Thanks for doing this!
> >
> > Jonathan, the same Q I had in previous version round, can we get some patches
> > applied to reduce the burden of the series? (I think of 1, 2, 7, 8 and might be
> > more.) As for the series, I think if this version is still not good enough
> > (patch 3) we need to rearrange it so that patch is going to the end (as much as
> > possible) of the series, so we want delay the 'good' ones to be applied.  
> 
> IMO all patches excluding the shared resource management patch are good
> to go. I can send a new version reordered to reduce the headache.
> 
I'll see what picks up easily then you can reorder the rest.

Sashiko indeed not happy with patch 3 and the issues around runtime pm.

Jonathan
Re: [PATCH v7 0/8] iio: magnetometer: ak8975: driver cleanup
Posted by Andy Shevchenko 1 month ago
On Tue, May 12, 2026 at 11:16:17AM +0200, Joshua Crofts wrote:
> On Tue, 12 May 2026 at 11:12, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, May 11, 2026 at 01:26:09PM +0200, Joshua Crofts via B4 Relay wrote:
> > > This series is a continuation of the previous ak8975 driver cleanup
> > > effort, as most of the patches were picked.
> > >
> > > Changes include:
> > > - using BIT() and GENMASK() macros
> > > - moving to devm_* resource management
> > > - adding a scan index enum
> > > - moving from using wait loops to iopoll functions
> > > - various code style changes
> >
> > Thanks for doing this!
> >
> > Jonathan, the same Q I had in previous version round, can we get some patches
> > applied to reduce the burden of the series? (I think of 1, 2, 7, 8 and might be
> > more.) As for the series, I think if this version is still not good enough
> > (patch 3) we need to rearrange it so that patch is going to the end (as much as
> > possible) of the series, so we want delay the 'good' ones to be applied.
> 
> IMO all patches excluding the shared resource management patch are good
> to go. I can send a new version reordered to reduce the headache.

Let's wait for Jonathan. Whatever he prefers.

-- 
With Best Regards,
Andy Shevchenko