linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] iio: Set default trigger device parent
@ 2020-12-16  4:20 Gwendal Grignou
  2020-12-29 17:40 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Gwendal Grignou @ 2020-12-16  4:20 UTC (permalink / raw)
  To: jic23, lars, andy.shevchenko, ardeleanalex; +Cc: linux-iio, Gwendal Grignou

[Added a new patch to rename iio_trigger_alloc argument from dev to
parent for clarity. Other patches remain the same.]

Each drivers are setting trig->dev.parent to a common value - usually.
Move that in boiler plate code.

The first patch set the parent pointer, the next is an automatic change
with spatch.
The remaining ones are straightforward manual changes.

Few drivers remain:
drivers/iio/adc/at91-sama5d2_adc.c
drivers/iio/adc/mxs-lradc-adc.c
trigger parent set to iio device instead of its parent.

drivers/iio/adc/dln2-adc.c
trigger parent not set.

drivers/iio/gyro/mpu3050-core.c
trigger allocated for iio device but parent set to iio device parent.

drivers/iio/imu/bmi160/bmi160_core.c
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
trigger allocated for iio device but parent set to mapped register device holder. Looks like iio device parent.

drivers/iio/trigger/stm32-lptimer-trigger.c
drivers/iio/trigger/stm32-timer-trigger.c
trigger allocated for device, but parent set to device parent.

Gwendal Grignou (8):
  iio: set default trig->dev.parent
  iio: fix devm_iio_trigger_alloc with parent.cocci
  iio: adis_trigger: Remove code to set trigger parent
  iio: gp2ap020a00f: Remove code to set trigger parent
  iio: lmp91000: Remove code to set trigger parent
  iio: chemical: atlas: Remove code to set trigger parent
  iio: as3935: Remove code to set trigger parent
  iio: Rename iio_trigger_alloc dev argument to parent

 drivers/iio/accel/adxl372.c                   |  2 --
 drivers/iio/accel/bma180.c                    |  3 +-
 drivers/iio/accel/bmc150-accel-core.c         |  1 -
 drivers/iio/accel/kxcjk-1013.c                |  2 --
 drivers/iio/accel/mma8452.c                   |  1 -
 drivers/iio/accel/mxc4005.c                   |  1 -
 drivers/iio/accel/stk8312.c                   |  1 -
 drivers/iio/accel/stk8ba50.c                  |  1 -
 drivers/iio/adc/ad7606.c                      |  1 -
 drivers/iio/adc/ad7766.c                      |  1 -
 drivers/iio/adc/ad7768-1.c                    |  1 -
 drivers/iio/adc/ad_sigma_delta.c              |  4 +--
 drivers/iio/adc/at91_adc.c                    |  3 +-
 drivers/iio/adc/max1027.c                     |  1 -
 drivers/iio/adc/xilinx-xadc-core.c            |  4 +--
 drivers/iio/chemical/atlas-sensor.c           |  1 -
 drivers/iio/chemical/ccs811.c                 |  1 -
 drivers/iio/chemical/scd30_core.c             |  1 -
 .../common/hid-sensors/hid-sensor-trigger.c   |  4 +--
 .../common/st_sensors/st_sensors_trigger.c    |  4 +--
 drivers/iio/gyro/adxrs290.c                   |  1 -
 drivers/iio/gyro/bmg160_core.c                |  2 --
 drivers/iio/gyro/fxas21002c_core.c            |  1 -
 drivers/iio/gyro/itg3200_buffer.c             |  3 +-
 drivers/iio/health/afe4403.c                  |  1 -
 drivers/iio/health/afe4404.c                  |  1 -
 drivers/iio/humidity/hts221_buffer.c          |  1 -
 drivers/iio/imu/adis_trigger.c                | 10 ++----
 drivers/iio/imu/kmx61.c                       |  1 -
 drivers/iio/industrialio-trigger.c            | 33 +++++++++++--------
 drivers/iio/light/gp2ap020a00f.c              |  1 -
 drivers/iio/light/rpr0521.c                   |  1 -
 drivers/iio/light/si1145.c                    |  1 -
 drivers/iio/light/st_uvis25_core.c            |  1 -
 drivers/iio/light/vcnl4000.c                  |  1 -
 drivers/iio/light/vcnl4035.c                  |  1 -
 drivers/iio/magnetometer/bmc150_magn.c        |  1 -
 drivers/iio/magnetometer/rm3100-core.c        |  1 -
 drivers/iio/potentiostat/lmp91000.c           |  3 +-
 drivers/iio/pressure/zpa2326.c                |  1 -
 drivers/iio/proximity/as3935.c                |  1 -
 drivers/iio/proximity/sx9310.c                |  1 -
 drivers/iio/proximity/sx932x.c                |  1 -
 drivers/iio/proximity/sx9500.c                |  1 -
 drivers/iio/trigger/iio-trig-hrtimer.c        |  2 +-
 drivers/iio/trigger/iio-trig-interrupt.c      |  2 +-
 drivers/iio/trigger/iio-trig-loop.c           |  2 +-
 drivers/iio/trigger/iio-trig-sysfs.c          |  3 +-
 include/linux/iio/iio.h                       |  2 +-
 include/linux/iio/trigger.h                   |  3 +-
 50 files changed, 41 insertions(+), 81 deletions(-)

-- 
2.29.2.684.gfbc64c5ab5-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 0/8] iio: Set default trigger device parent
  2020-12-16  4:20 [PATCH v2 0/8] iio: Set default trigger device parent Gwendal Grignou
@ 2020-12-29 17:40 ` Jonathan Cameron
  2021-03-09  1:06   ` Gwendal Grignou
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2020-12-29 17:40 UTC (permalink / raw)
  To: Gwendal Grignou; +Cc: lars, andy.shevchenko, ardeleanalex, linux-iio

On Tue, 15 Dec 2020 20:20:08 -0800
Gwendal Grignou <gwendal@chromium.org> wrote:

> [Added a new patch to rename iio_trigger_alloc argument from dev to
> parent for clarity. Other patches remain the same.]
> 
> Each drivers are setting trig->dev.parent to a common value - usually.
> Move that in boiler plate code.
> 
> The first patch set the parent pointer, the next is an automatic change
> with spatch.
> The remaining ones are straightforward manual changes.
I'm not sure if it was deliberate, but I only got the cover letter
and patch 8.  Given automated tooling (b4) isn't going to cope with that
I had a go at manually picking the other patches but ran into some issues.
Please rebase the lot against the testing branch of iio.git

Thanks,

Jonathan

> 
> Few drivers remain:
> drivers/iio/adc/at91-sama5d2_adc.c
> drivers/iio/adc/mxs-lradc-adc.c
> trigger parent set to iio device instead of its parent.
> 
> drivers/iio/adc/dln2-adc.c
> trigger parent not set.
> 
> drivers/iio/gyro/mpu3050-core.c
> trigger allocated for iio device but parent set to iio device parent.
> 
> drivers/iio/imu/bmi160/bmi160_core.c
> drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> trigger allocated for iio device but parent set to mapped register device holder. Looks like iio device parent.
> 
> drivers/iio/trigger/stm32-lptimer-trigger.c
> drivers/iio/trigger/stm32-timer-trigger.c
> trigger allocated for device, but parent set to device parent.
> 
> Gwendal Grignou (8):
>   iio: set default trig->dev.parent
>   iio: fix devm_iio_trigger_alloc with parent.cocci
>   iio: adis_trigger: Remove code to set trigger parent
>   iio: gp2ap020a00f: Remove code to set trigger parent
>   iio: lmp91000: Remove code to set trigger parent
>   iio: chemical: atlas: Remove code to set trigger parent
>   iio: as3935: Remove code to set trigger parent
>   iio: Rename iio_trigger_alloc dev argument to parent
> 
>  drivers/iio/accel/adxl372.c                   |  2 --
>  drivers/iio/accel/bma180.c                    |  3 +-
>  drivers/iio/accel/bmc150-accel-core.c         |  1 -
>  drivers/iio/accel/kxcjk-1013.c                |  2 --
>  drivers/iio/accel/mma8452.c                   |  1 -
>  drivers/iio/accel/mxc4005.c                   |  1 -
>  drivers/iio/accel/stk8312.c                   |  1 -
>  drivers/iio/accel/stk8ba50.c                  |  1 -
>  drivers/iio/adc/ad7606.c                      |  1 -
>  drivers/iio/adc/ad7766.c                      |  1 -
>  drivers/iio/adc/ad7768-1.c                    |  1 -
>  drivers/iio/adc/ad_sigma_delta.c              |  4 +--
>  drivers/iio/adc/at91_adc.c                    |  3 +-
>  drivers/iio/adc/max1027.c                     |  1 -
>  drivers/iio/adc/xilinx-xadc-core.c            |  4 +--
>  drivers/iio/chemical/atlas-sensor.c           |  1 -
>  drivers/iio/chemical/ccs811.c                 |  1 -
>  drivers/iio/chemical/scd30_core.c             |  1 -
>  .../common/hid-sensors/hid-sensor-trigger.c   |  4 +--
>  .../common/st_sensors/st_sensors_trigger.c    |  4 +--
>  drivers/iio/gyro/adxrs290.c                   |  1 -
>  drivers/iio/gyro/bmg160_core.c                |  2 --
>  drivers/iio/gyro/fxas21002c_core.c            |  1 -
>  drivers/iio/gyro/itg3200_buffer.c             |  3 +-
>  drivers/iio/health/afe4403.c                  |  1 -
>  drivers/iio/health/afe4404.c                  |  1 -
>  drivers/iio/humidity/hts221_buffer.c          |  1 -
>  drivers/iio/imu/adis_trigger.c                | 10 ++----
>  drivers/iio/imu/kmx61.c                       |  1 -
>  drivers/iio/industrialio-trigger.c            | 33 +++++++++++--------
>  drivers/iio/light/gp2ap020a00f.c              |  1 -
>  drivers/iio/light/rpr0521.c                   |  1 -
>  drivers/iio/light/si1145.c                    |  1 -
>  drivers/iio/light/st_uvis25_core.c            |  1 -
>  drivers/iio/light/vcnl4000.c                  |  1 -
>  drivers/iio/light/vcnl4035.c                  |  1 -
>  drivers/iio/magnetometer/bmc150_magn.c        |  1 -
>  drivers/iio/magnetometer/rm3100-core.c        |  1 -
>  drivers/iio/potentiostat/lmp91000.c           |  3 +-
>  drivers/iio/pressure/zpa2326.c                |  1 -
>  drivers/iio/proximity/as3935.c                |  1 -
>  drivers/iio/proximity/sx9310.c                |  1 -
>  drivers/iio/proximity/sx932x.c                |  1 -
>  drivers/iio/proximity/sx9500.c                |  1 -
>  drivers/iio/trigger/iio-trig-hrtimer.c        |  2 +-
>  drivers/iio/trigger/iio-trig-interrupt.c      |  2 +-
>  drivers/iio/trigger/iio-trig-loop.c           |  2 +-
>  drivers/iio/trigger/iio-trig-sysfs.c          |  3 +-
>  include/linux/iio/iio.h                       |  2 +-
>  include/linux/iio/trigger.h                   |  3 +-
>  50 files changed, 41 insertions(+), 81 deletions(-)
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 0/8] iio: Set default trigger device parent
  2020-12-29 17:40 ` Jonathan Cameron
@ 2021-03-09  1:06   ` Gwendal Grignou
  0 siblings, 0 replies; 3+ messages in thread
From: Gwendal Grignou @ 2021-03-09  1:06 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Andy Shevchenko, Alexandru Ardelean, linux-iio

I drop the ball on this one. Let me resend a v3 train that applies properly.
Gwendal.

On Tue, Dec 29, 2020 at 9:40 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Tue, 15 Dec 2020 20:20:08 -0800
> Gwendal Grignou <gwendal@chromium.org> wrote:
>
> > [Added a new patch to rename iio_trigger_alloc argument from dev to
> > parent for clarity. Other patches remain the same.]
> >
> > Each drivers are setting trig->dev.parent to a common value - usually.
> > Move that in boiler plate code.
> >
> > The first patch set the parent pointer, the next is an automatic change
> > with spatch.
> > The remaining ones are straightforward manual changes.
> I'm not sure if it was deliberate, but I only got the cover letter
> and patch 8.  Given automated tooling (b4) isn't going to cope with that
> I had a go at manually picking the other patches but ran into some issues.
> Please rebase the lot against the testing branch of iio.git
>
> Thanks,
>
> Jonathan
>
> >
> > Few drivers remain:
> > drivers/iio/adc/at91-sama5d2_adc.c
> > drivers/iio/adc/mxs-lradc-adc.c
> > trigger parent set to iio device instead of its parent.
> >
> > drivers/iio/adc/dln2-adc.c
> > trigger parent not set.
> >
> > drivers/iio/gyro/mpu3050-core.c
> > trigger allocated for iio device but parent set to iio device parent.
> >
> > drivers/iio/imu/bmi160/bmi160_core.c
> > drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> > trigger allocated for iio device but parent set to mapped register device holder. Looks like iio device parent.
> >
> > drivers/iio/trigger/stm32-lptimer-trigger.c
> > drivers/iio/trigger/stm32-timer-trigger.c
> > trigger allocated for device, but parent set to device parent.
> >
> > Gwendal Grignou (8):
> >   iio: set default trig->dev.parent
> >   iio: fix devm_iio_trigger_alloc with parent.cocci
> >   iio: adis_trigger: Remove code to set trigger parent
> >   iio: gp2ap020a00f: Remove code to set trigger parent
> >   iio: lmp91000: Remove code to set trigger parent
> >   iio: chemical: atlas: Remove code to set trigger parent
> >   iio: as3935: Remove code to set trigger parent
> >   iio: Rename iio_trigger_alloc dev argument to parent
> >
> >  drivers/iio/accel/adxl372.c                   |  2 --
> >  drivers/iio/accel/bma180.c                    |  3 +-
> >  drivers/iio/accel/bmc150-accel-core.c         |  1 -
> >  drivers/iio/accel/kxcjk-1013.c                |  2 --
> >  drivers/iio/accel/mma8452.c                   |  1 -
> >  drivers/iio/accel/mxc4005.c                   |  1 -
> >  drivers/iio/accel/stk8312.c                   |  1 -
> >  drivers/iio/accel/stk8ba50.c                  |  1 -
> >  drivers/iio/adc/ad7606.c                      |  1 -
> >  drivers/iio/adc/ad7766.c                      |  1 -
> >  drivers/iio/adc/ad7768-1.c                    |  1 -
> >  drivers/iio/adc/ad_sigma_delta.c              |  4 +--
> >  drivers/iio/adc/at91_adc.c                    |  3 +-
> >  drivers/iio/adc/max1027.c                     |  1 -
> >  drivers/iio/adc/xilinx-xadc-core.c            |  4 +--
> >  drivers/iio/chemical/atlas-sensor.c           |  1 -
> >  drivers/iio/chemical/ccs811.c                 |  1 -
> >  drivers/iio/chemical/scd30_core.c             |  1 -
> >  .../common/hid-sensors/hid-sensor-trigger.c   |  4 +--
> >  .../common/st_sensors/st_sensors_trigger.c    |  4 +--
> >  drivers/iio/gyro/adxrs290.c                   |  1 -
> >  drivers/iio/gyro/bmg160_core.c                |  2 --
> >  drivers/iio/gyro/fxas21002c_core.c            |  1 -
> >  drivers/iio/gyro/itg3200_buffer.c             |  3 +-
> >  drivers/iio/health/afe4403.c                  |  1 -
> >  drivers/iio/health/afe4404.c                  |  1 -
> >  drivers/iio/humidity/hts221_buffer.c          |  1 -
> >  drivers/iio/imu/adis_trigger.c                | 10 ++----
> >  drivers/iio/imu/kmx61.c                       |  1 -
> >  drivers/iio/industrialio-trigger.c            | 33 +++++++++++--------
> >  drivers/iio/light/gp2ap020a00f.c              |  1 -
> >  drivers/iio/light/rpr0521.c                   |  1 -
> >  drivers/iio/light/si1145.c                    |  1 -
> >  drivers/iio/light/st_uvis25_core.c            |  1 -
> >  drivers/iio/light/vcnl4000.c                  |  1 -
> >  drivers/iio/light/vcnl4035.c                  |  1 -
> >  drivers/iio/magnetometer/bmc150_magn.c        |  1 -
> >  drivers/iio/magnetometer/rm3100-core.c        |  1 -
> >  drivers/iio/potentiostat/lmp91000.c           |  3 +-
> >  drivers/iio/pressure/zpa2326.c                |  1 -
> >  drivers/iio/proximity/as3935.c                |  1 -
> >  drivers/iio/proximity/sx9310.c                |  1 -
> >  drivers/iio/proximity/sx932x.c                |  1 -
> >  drivers/iio/proximity/sx9500.c                |  1 -
> >  drivers/iio/trigger/iio-trig-hrtimer.c        |  2 +-
> >  drivers/iio/trigger/iio-trig-interrupt.c      |  2 +-
> >  drivers/iio/trigger/iio-trig-loop.c           |  2 +-
> >  drivers/iio/trigger/iio-trig-sysfs.c          |  3 +-
> >  include/linux/iio/iio.h                       |  2 +-
> >  include/linux/iio/trigger.h                   |  3 +-
> >  50 files changed, 41 insertions(+), 81 deletions(-)
> >
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-09  1:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16  4:20 [PATCH v2 0/8] iio: Set default trigger device parent Gwendal Grignou
2020-12-29 17:40 ` Jonathan Cameron
2021-03-09  1:06   ` Gwendal Grignou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).