Message ID | 20220116180535.2367780-1-jic23@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | IIO: accel/st-sensors move into separate symbol namespaces | expand |
On Sun, 16 Jan 2022 18:05:22 +0000 Jonathan Cameron <jic23@kernel.org> wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> Hi All, I'd appreciate it if someone has a chance to look at this set. Should be fairly simple to review as more or less mechanical changes other than the choice of naming for each namespace. Thanks, Jonathan > > Changes since v1: > * Add IIO_ prefix to namespaces. > > https://lwn.net/Articles/760045/ provides a good overview of this feature > and why it might be used. In this particular case we fall under the multi > module case. For each group of modules, I've moved the exports into > an independent namespace. > > Whilst I'm not entirely sure it is worth the noise of moving the main > IIO exports into a namespace, it is definitely worthwhile for these small > clusters of related modules (typically a core + i2c and spi modules). > > I've just done those within drivers/accel (including all of st-sensors as > I did not want to do that piecemeal) as an initial set to get feedback on > what people think of the approach and in particular naming of the namespaces. > > As you can see it is a straight forward change to makes so I'll do the > rest of the IIO drivers once we are agreed on the generic details. > Note that I'll be expecting this for any new cases of this pattern going > forwards. > > Includes a small diversion in st-sensors where we had a bunch of duplicated > MODULE_* macros for some of the core modules which were made up of multiple > c files. > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Lucas Stankus <lucas.p.stankus@gmail.com> > Cc: Puranjay Mohan <puranjay12@gmail.com> > Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> > Cc: Mike Looijmans <mike.looijmans@topic.nl> > Cc: Sean Nyekjaer <sean@geanix.com> > Cc: Andy Shevchenko <andy.shevchenko@gmail.com> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Denis Ciocca <denis.ciocca@st.com> > > Jonathan Cameron (13): > iio:accel:mma9551_core: Move exports into IIO_MMA9551 namespace > iio:accel:mma7455_core: Move exports into IIO_MMA7455 namespace > iio:accel:kxsd9: Move exports into IIO_KDSD9 namespace > iio:accel:bma400: Move exports into IIO_BMA400 namespace > iio:accel:adxl313: Move exports into IIO_ADXL313 namespace > iio:accel:adxl345: Move exports into IIO_ADXL345 namespace > iio:accel:adxl355: Move exports into IIO_ADXL355 namespace > iio:accel:adxl372: Move exports into IIO_ADXL372 namespace > iio:accel:bmc150: Move exports into IIO_BMC150 namespace > iio:accel:bmi088: Move exports into IIO_BMI088 namespace > iio:accel:fxl8962af: Move exports into IIO_FXL8962AF namespace > iio:st-sensors: Remove duplicate MODULE_* > iio:st-sensors: Move exports into IIO_ST_SENSORS namespace > > drivers/iio/accel/adxl313_core.c | 6 ++-- > drivers/iio/accel/adxl313_i2c.c | 1 + > drivers/iio/accel/adxl313_spi.c | 1 + > drivers/iio/accel/adxl345_core.c | 2 +- > drivers/iio/accel/adxl345_i2c.c | 1 + > drivers/iio/accel/adxl345_spi.c | 1 + > drivers/iio/accel/adxl355_core.c | 6 ++-- > drivers/iio/accel/adxl355_i2c.c | 1 + > drivers/iio/accel/adxl355_spi.c | 1 + > drivers/iio/accel/adxl372.c | 4 +-- > drivers/iio/accel/adxl372_i2c.c | 1 + > drivers/iio/accel/adxl372_spi.c | 1 + > drivers/iio/accel/bma400_core.c | 6 ++-- > drivers/iio/accel/bma400_i2c.c | 1 + > drivers/iio/accel/bma400_spi.c | 1 + > drivers/iio/accel/bmc150-accel-core.c | 8 ++--- > drivers/iio/accel/bmc150-accel-i2c.c | 1 + > drivers/iio/accel/bmc150-accel-spi.c | 1 + > drivers/iio/accel/bmi088-accel-core.c | 8 ++--- > drivers/iio/accel/bmi088-accel-spi.c | 1 + > drivers/iio/accel/fxls8962af-core.c | 6 ++-- > drivers/iio/accel/fxls8962af-i2c.c | 1 + > drivers/iio/accel/fxls8962af-spi.c | 1 + > drivers/iio/accel/kxsd9-i2c.c | 1 + > drivers/iio/accel/kxsd9-spi.c | 1 + > drivers/iio/accel/kxsd9.c | 6 ++-- > drivers/iio/accel/mma7455_core.c | 6 ++-- > drivers/iio/accel/mma7455_i2c.c | 1 + > drivers/iio/accel/mma7455_spi.c | 1 + > drivers/iio/accel/mma9551.c | 1 + > drivers/iio/accel/mma9551_core.c | 36 +++++++++---------- > drivers/iio/accel/mma9553.c | 1 + > drivers/iio/accel/st_accel_buffer.c | 5 --- > drivers/iio/accel/st_accel_core.c | 5 +-- > drivers/iio/accel/st_accel_i2c.c | 1 + > drivers/iio/accel/st_accel_spi.c | 1 + > .../iio/common/st_sensors/st_sensors_buffer.c | 7 +--- > .../iio/common/st_sensors/st_sensors_core.c | 28 +++++++-------- > .../iio/common/st_sensors/st_sensors_i2c.c | 2 +- > .../iio/common/st_sensors/st_sensors_spi.c | 2 +- > .../common/st_sensors/st_sensors_trigger.c | 9 ++--- > drivers/iio/gyro/st_gyro_buffer.c | 4 --- > drivers/iio/gyro/st_gyro_core.c | 5 +-- > drivers/iio/gyro/st_gyro_i2c.c | 1 + > drivers/iio/gyro/st_gyro_spi.c | 1 + > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 3 +- > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 1 + > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 1 + > drivers/iio/magnetometer/st_magn_buffer.c | 4 --- > drivers/iio/magnetometer/st_magn_core.c | 5 +-- > drivers/iio/magnetometer/st_magn_i2c.c | 1 + > drivers/iio/magnetometer/st_magn_spi.c | 1 + > drivers/iio/pressure/st_pressure_buffer.c | 5 --- > drivers/iio/pressure/st_pressure_core.c | 5 +-- > drivers/iio/pressure/st_pressure_i2c.c | 1 + > drivers/iio/pressure/st_pressure_spi.c | 1 + > 56 files changed, 111 insertions(+), 103 deletions(-) >
On Sun, 30 Jan 2022 20:01:28 +0000 Jonathan Cameron <jic23@kernel.org> wrote: > On Sun, 16 Jan 2022 18:05:22 +0000 > Jonathan Cameron <jic23@kernel.org> wrote: > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Hi All, > > I'd appreciate it if someone has a chance to look at this set. > Should be fairly simple to review as more or less mechanical changes > other than the choice of naming for each namespace. I plan to pick this set up shortly on basis v1 got some review and comments were all about the prefix. So hopefully everything else is fine. However, if anyone does have time to sanity check it would be much appreciated as I don't trust myself to not do something silly (call it experience :) Thanks, Jonathan > > Thanks, > > Jonathan > > > > > Changes since v1: > > * Add IIO_ prefix to namespaces. > > > > https://lwn.net/Articles/760045/ provides a good overview of this feature > > and why it might be used. In this particular case we fall under the multi > > module case. For each group of modules, I've moved the exports into > > an independent namespace. > > > > Whilst I'm not entirely sure it is worth the noise of moving the main > > IIO exports into a namespace, it is definitely worthwhile for these small > > clusters of related modules (typically a core + i2c and spi modules). > > > > I've just done those within drivers/accel (including all of st-sensors as > > I did not want to do that piecemeal) as an initial set to get feedback on > > what people think of the approach and in particular naming of the namespaces. > > > > As you can see it is a straight forward change to makes so I'll do the > > rest of the IIO drivers once we are agreed on the generic details. > > Note that I'll be expecting this for any new cases of this pattern going > > forwards. > > > > Includes a small diversion in st-sensors where we had a bunch of duplicated > > MODULE_* macros for some of the core modules which were made up of multiple > > c files. > > > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de > > Cc: Linus Walleij <linus.walleij@linaro.org> > > Cc: Lucas Stankus <lucas.p.stankus@gmail.com> > > Cc: Puranjay Mohan <puranjay12@gmail.com> > > Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> > > Cc: Mike Looijmans <mike.looijmans@topic.nl> > > Cc: Sean Nyekjaer <sean@geanix.com> > > Cc: Andy Shevchenko <andy.shevchenko@gmail.com> > > Cc: Linus Walleij <linus.walleij@linaro.org> > > Cc: Denis Ciocca <denis.ciocca@st.com> > > > > Jonathan Cameron (13): > > iio:accel:mma9551_core: Move exports into IIO_MMA9551 namespace > > iio:accel:mma7455_core: Move exports into IIO_MMA7455 namespace > > iio:accel:kxsd9: Move exports into IIO_KDSD9 namespace > > iio:accel:bma400: Move exports into IIO_BMA400 namespace > > iio:accel:adxl313: Move exports into IIO_ADXL313 namespace > > iio:accel:adxl345: Move exports into IIO_ADXL345 namespace > > iio:accel:adxl355: Move exports into IIO_ADXL355 namespace > > iio:accel:adxl372: Move exports into IIO_ADXL372 namespace > > iio:accel:bmc150: Move exports into IIO_BMC150 namespace > > iio:accel:bmi088: Move exports into IIO_BMI088 namespace > > iio:accel:fxl8962af: Move exports into IIO_FXL8962AF namespace > > iio:st-sensors: Remove duplicate MODULE_* > > iio:st-sensors: Move exports into IIO_ST_SENSORS namespace > > > > drivers/iio/accel/adxl313_core.c | 6 ++-- > > drivers/iio/accel/adxl313_i2c.c | 1 + > > drivers/iio/accel/adxl313_spi.c | 1 + > > drivers/iio/accel/adxl345_core.c | 2 +- > > drivers/iio/accel/adxl345_i2c.c | 1 + > > drivers/iio/accel/adxl345_spi.c | 1 + > > drivers/iio/accel/adxl355_core.c | 6 ++-- > > drivers/iio/accel/adxl355_i2c.c | 1 + > > drivers/iio/accel/adxl355_spi.c | 1 + > > drivers/iio/accel/adxl372.c | 4 +-- > > drivers/iio/accel/adxl372_i2c.c | 1 + > > drivers/iio/accel/adxl372_spi.c | 1 + > > drivers/iio/accel/bma400_core.c | 6 ++-- > > drivers/iio/accel/bma400_i2c.c | 1 + > > drivers/iio/accel/bma400_spi.c | 1 + > > drivers/iio/accel/bmc150-accel-core.c | 8 ++--- > > drivers/iio/accel/bmc150-accel-i2c.c | 1 + > > drivers/iio/accel/bmc150-accel-spi.c | 1 + > > drivers/iio/accel/bmi088-accel-core.c | 8 ++--- > > drivers/iio/accel/bmi088-accel-spi.c | 1 + > > drivers/iio/accel/fxls8962af-core.c | 6 ++-- > > drivers/iio/accel/fxls8962af-i2c.c | 1 + > > drivers/iio/accel/fxls8962af-spi.c | 1 + > > drivers/iio/accel/kxsd9-i2c.c | 1 + > > drivers/iio/accel/kxsd9-spi.c | 1 + > > drivers/iio/accel/kxsd9.c | 6 ++-- > > drivers/iio/accel/mma7455_core.c | 6 ++-- > > drivers/iio/accel/mma7455_i2c.c | 1 + > > drivers/iio/accel/mma7455_spi.c | 1 + > > drivers/iio/accel/mma9551.c | 1 + > > drivers/iio/accel/mma9551_core.c | 36 +++++++++---------- > > drivers/iio/accel/mma9553.c | 1 + > > drivers/iio/accel/st_accel_buffer.c | 5 --- > > drivers/iio/accel/st_accel_core.c | 5 +-- > > drivers/iio/accel/st_accel_i2c.c | 1 + > > drivers/iio/accel/st_accel_spi.c | 1 + > > .../iio/common/st_sensors/st_sensors_buffer.c | 7 +--- > > .../iio/common/st_sensors/st_sensors_core.c | 28 +++++++-------- > > .../iio/common/st_sensors/st_sensors_i2c.c | 2 +- > > .../iio/common/st_sensors/st_sensors_spi.c | 2 +- > > .../common/st_sensors/st_sensors_trigger.c | 9 ++--- > > drivers/iio/gyro/st_gyro_buffer.c | 4 --- > > drivers/iio/gyro/st_gyro_core.c | 5 +-- > > drivers/iio/gyro/st_gyro_i2c.c | 1 + > > drivers/iio/gyro/st_gyro_spi.c | 1 + > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 3 +- > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 1 + > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 1 + > > drivers/iio/magnetometer/st_magn_buffer.c | 4 --- > > drivers/iio/magnetometer/st_magn_core.c | 5 +-- > > drivers/iio/magnetometer/st_magn_i2c.c | 1 + > > drivers/iio/magnetometer/st_magn_spi.c | 1 + > > drivers/iio/pressure/st_pressure_buffer.c | 5 --- > > drivers/iio/pressure/st_pressure_core.c | 5 +-- > > drivers/iio/pressure/st_pressure_i2c.c | 1 + > > drivers/iio/pressure/st_pressure_spi.c | 1 + > > 56 files changed, 111 insertions(+), 103 deletions(-) > > >
On Mon, 2022-02-14 at 10:18 +0000, Jonathan Cameron wrote: > On Sun, 30 Jan 2022 20:01:28 +0000 > Jonathan Cameron <jic23@kernel.org> wrote: > > > On Sun, 16 Jan 2022 18:05:22 +0000 > > Jonathan Cameron <jic23@kernel.org> wrote: > > > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > Hi All, > > > > I'd appreciate it if someone has a chance to look at this set. > > Should be fairly simple to review as more or less mechanical > > changes > > other than the choice of naming for each namespace. > > I plan to pick this set up shortly on basis v1 got some review and > comments were all about the prefix. So hopefully everything else > is fine. > > However, if anyone does have time to sanity check it would be much > appreciated as I don't trust myself to not do something silly > (call it experience :) I did sanity check, didn't find any issue. Thanks, Srinivas > > Thanks, > > Jonathan > > > > > Thanks, > > > > Jonathan > > > > > > > > Changes since v1: > > > * Add IIO_ prefix to namespaces. > > > > > > https://lwn.net/Articles/760045/ provides a good overview of this > > > feature > > > and why it might be used. In this particular case we fall under > > > the multi > > > module case. For each group of modules, I've moved the exports > > > into > > > an independent namespace. > > > > > > Whilst I'm not entirely sure it is worth the noise of moving the > > > main > > > IIO exports into a namespace, it is definitely worthwhile for > > > these small > > > clusters of related modules (typically a core + i2c and spi > > > modules). > > > > > > I've just done those within drivers/accel (including all of st- > > > sensors as > > > I did not want to do that piecemeal) as an initial set to get > > > feedback on > > > what people think of the approach and in particular naming of the > > > namespaces. > > > > > > As you can see it is a straight forward change to makes so I'll > > > do the > > > rest of the IIO drivers once we are agreed on the generic > > > details. > > > Note that I'll be expecting this for any new cases of this > > > pattern going > > > forwards. > > > > > > Includes a small diversion in st-sensors where we had a bunch of > > > duplicated > > > MODULE_* macros for some of the core modules which were made up > > > of multiple > > > c files. > > > > > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de > > > Cc: Linus Walleij <linus.walleij@linaro.org> > > > Cc: Lucas Stankus <lucas.p.stankus@gmail.com> > > > Cc: Puranjay Mohan <puranjay12@gmail.com> > > > Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> > > > Cc: Mike Looijmans <mike.looijmans@topic.nl> > > > Cc: Sean Nyekjaer <sean@geanix.com> > > > Cc: Andy Shevchenko <andy.shevchenko@gmail.com> > > > Cc: Linus Walleij <linus.walleij@linaro.org> > > > Cc: Denis Ciocca <denis.ciocca@st.com> > > > > > > Jonathan Cameron (13): > > > iio:accel:mma9551_core: Move exports into IIO_MMA9551 namespace > > > iio:accel:mma7455_core: Move exports into IIO_MMA7455 namespace > > > iio:accel:kxsd9: Move exports into IIO_KDSD9 namespace > > > iio:accel:bma400: Move exports into IIO_BMA400 namespace > > > iio:accel:adxl313: Move exports into IIO_ADXL313 namespace > > > iio:accel:adxl345: Move exports into IIO_ADXL345 namespace > > > iio:accel:adxl355: Move exports into IIO_ADXL355 namespace > > > iio:accel:adxl372: Move exports into IIO_ADXL372 namespace > > > iio:accel:bmc150: Move exports into IIO_BMC150 namespace > > > iio:accel:bmi088: Move exports into IIO_BMI088 namespace > > > iio:accel:fxl8962af: Move exports into IIO_FXL8962AF namespace > > > iio:st-sensors: Remove duplicate MODULE_* > > > iio:st-sensors: Move exports into IIO_ST_SENSORS namespace > > > > > > drivers/iio/accel/adxl313_core.c | 6 ++-- > > > drivers/iio/accel/adxl313_i2c.c | 1 + > > > drivers/iio/accel/adxl313_spi.c | 1 + > > > drivers/iio/accel/adxl345_core.c | 2 +- > > > drivers/iio/accel/adxl345_i2c.c | 1 + > > > drivers/iio/accel/adxl345_spi.c | 1 + > > > drivers/iio/accel/adxl355_core.c | 6 ++-- > > > drivers/iio/accel/adxl355_i2c.c | 1 + > > > drivers/iio/accel/adxl355_spi.c | 1 + > > > drivers/iio/accel/adxl372.c | 4 +-- > > > drivers/iio/accel/adxl372_i2c.c | 1 + > > > drivers/iio/accel/adxl372_spi.c | 1 + > > > drivers/iio/accel/bma400_core.c | 6 ++-- > > > drivers/iio/accel/bma400_i2c.c | 1 + > > > drivers/iio/accel/bma400_spi.c | 1 + > > > drivers/iio/accel/bmc150-accel-core.c | 8 ++--- > > > drivers/iio/accel/bmc150-accel-i2c.c | 1 + > > > drivers/iio/accel/bmc150-accel-spi.c | 1 + > > > drivers/iio/accel/bmi088-accel-core.c | 8 ++--- > > > drivers/iio/accel/bmi088-accel-spi.c | 1 + > > > drivers/iio/accel/fxls8962af-core.c | 6 ++-- > > > drivers/iio/accel/fxls8962af-i2c.c | 1 + > > > drivers/iio/accel/fxls8962af-spi.c | 1 + > > > drivers/iio/accel/kxsd9-i2c.c | 1 + > > > drivers/iio/accel/kxsd9-spi.c | 1 + > > > drivers/iio/accel/kxsd9.c | 6 ++-- > > > drivers/iio/accel/mma7455_core.c | 6 ++-- > > > drivers/iio/accel/mma7455_i2c.c | 1 + > > > drivers/iio/accel/mma7455_spi.c | 1 + > > > drivers/iio/accel/mma9551.c | 1 + > > > drivers/iio/accel/mma9551_core.c | 36 +++++++++---- > > > ------ > > > drivers/iio/accel/mma9553.c | 1 + > > > drivers/iio/accel/st_accel_buffer.c | 5 --- > > > drivers/iio/accel/st_accel_core.c | 5 +-- > > > drivers/iio/accel/st_accel_i2c.c | 1 + > > > drivers/iio/accel/st_accel_spi.c | 1 + > > > .../iio/common/st_sensors/st_sensors_buffer.c | 7 +--- > > > .../iio/common/st_sensors/st_sensors_core.c | 28 +++++++------ > > > -- > > > .../iio/common/st_sensors/st_sensors_i2c.c | 2 +- > > > .../iio/common/st_sensors/st_sensors_spi.c | 2 +- > > > .../common/st_sensors/st_sensors_trigger.c | 9 ++--- > > > drivers/iio/gyro/st_gyro_buffer.c | 4 --- > > > drivers/iio/gyro/st_gyro_core.c | 5 +-- > > > drivers/iio/gyro/st_gyro_i2c.c | 1 + > > > drivers/iio/gyro/st_gyro_spi.c | 1 + > > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 3 +- > > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 1 + > > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 1 + > > > drivers/iio/magnetometer/st_magn_buffer.c | 4 --- > > > drivers/iio/magnetometer/st_magn_core.c | 5 +-- > > > drivers/iio/magnetometer/st_magn_i2c.c | 1 + > > > drivers/iio/magnetometer/st_magn_spi.c | 1 + > > > drivers/iio/pressure/st_pressure_buffer.c | 5 --- > > > drivers/iio/pressure/st_pressure_core.c | 5 +-- > > > drivers/iio/pressure/st_pressure_i2c.c | 1 + > > > drivers/iio/pressure/st_pressure_spi.c | 1 + > > > 56 files changed, 111 insertions(+), 103 deletions(-) > > > > > >
On Mon, 14 Feb 2022 07:40:24 -0800 srinivas pandruvada <srinivas.pandruvada@linux.intel.com> wrote: > On Mon, 2022-02-14 at 10:18 +0000, Jonathan Cameron wrote: > > On Sun, 30 Jan 2022 20:01:28 +0000 > > Jonathan Cameron <jic23@kernel.org> wrote: > > > > > On Sun, 16 Jan 2022 18:05:22 +0000 > > > Jonathan Cameron <jic23@kernel.org> wrote: > > > > > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > > > Hi All, > > > > > > I'd appreciate it if someone has a chance to look at this set. > > > Should be fairly simple to review as more or less mechanical > > > changes > > > other than the choice of naming for each namespace. > > > > I plan to pick this set up shortly on basis v1 got some review and > > comments were all about the prefix. So hopefully everything else > > is fine. > > > > However, if anyone does have time to sanity check it would be much > > appreciated as I don't trust myself to not do something silly > > (call it experience :) > I did sanity check, didn't find any issue. Thanks! Applied to the togreg branch of iio.git and pushed out as testing see if the autobuilders can find anything we missed. Jonathan > > Thanks, > Srinivas > > > > > Thanks, > > > > Jonathan > > > > > > > > Thanks, > > > > > > Jonathan > > > > > > > > > > > Changes since v1: > > > > * Add IIO_ prefix to namespaces. > > > > > > > > https://lwn.net/Articles/760045/ provides a good overview of this > > > > feature > > > > and why it might be used. In this particular case we fall under > > > > the multi > > > > module case. For each group of modules, I've moved the exports > > > > into > > > > an independent namespace. > > > > > > > > Whilst I'm not entirely sure it is worth the noise of moving the > > > > main > > > > IIO exports into a namespace, it is definitely worthwhile for > > > > these small > > > > clusters of related modules (typically a core + i2c and spi > > > > modules). > > > > > > > > I've just done those within drivers/accel (including all of st- > > > > sensors as > > > > I did not want to do that piecemeal) as an initial set to get > > > > feedback on > > > > what people think of the approach and in particular naming of the > > > > namespaces. > > > > > > > > As you can see it is a straight forward change to makes so I'll > > > > do the > > > > rest of the IIO drivers once we are agreed on the generic > > > > details. > > > > Note that I'll be expecting this for any new cases of this > > > > pattern going > > > > forwards. > > > > > > > > Includes a small diversion in st-sensors where we had a bunch of > > > > duplicated > > > > MODULE_* macros for some of the core modules which were made up > > > > of multiple > > > > c files. > > > > > > > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de > > > > Cc: Linus Walleij <linus.walleij@linaro.org> > > > > Cc: Lucas Stankus <lucas.p.stankus@gmail.com> > > > > Cc: Puranjay Mohan <puranjay12@gmail.com> > > > > Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> > > > > Cc: Mike Looijmans <mike.looijmans@topic.nl> > > > > Cc: Sean Nyekjaer <sean@geanix.com> > > > > Cc: Andy Shevchenko <andy.shevchenko@gmail.com> > > > > Cc: Linus Walleij <linus.walleij@linaro.org> > > > > Cc: Denis Ciocca <denis.ciocca@st.com> > > > > > > > > Jonathan Cameron (13): > > > > iio:accel:mma9551_core: Move exports into IIO_MMA9551 namespace > > > > iio:accel:mma7455_core: Move exports into IIO_MMA7455 namespace > > > > iio:accel:kxsd9: Move exports into IIO_KDSD9 namespace > > > > iio:accel:bma400: Move exports into IIO_BMA400 namespace > > > > iio:accel:adxl313: Move exports into IIO_ADXL313 namespace > > > > iio:accel:adxl345: Move exports into IIO_ADXL345 namespace > > > > iio:accel:adxl355: Move exports into IIO_ADXL355 namespace > > > > iio:accel:adxl372: Move exports into IIO_ADXL372 namespace > > > > iio:accel:bmc150: Move exports into IIO_BMC150 namespace > > > > iio:accel:bmi088: Move exports into IIO_BMI088 namespace > > > > iio:accel:fxl8962af: Move exports into IIO_FXL8962AF namespace > > > > iio:st-sensors: Remove duplicate MODULE_* > > > > iio:st-sensors: Move exports into IIO_ST_SENSORS namespace > > > > > > > > drivers/iio/accel/adxl313_core.c | 6 ++-- > > > > drivers/iio/accel/adxl313_i2c.c | 1 + > > > > drivers/iio/accel/adxl313_spi.c | 1 + > > > > drivers/iio/accel/adxl345_core.c | 2 +- > > > > drivers/iio/accel/adxl345_i2c.c | 1 + > > > > drivers/iio/accel/adxl345_spi.c | 1 + > > > > drivers/iio/accel/adxl355_core.c | 6 ++-- > > > > drivers/iio/accel/adxl355_i2c.c | 1 + > > > > drivers/iio/accel/adxl355_spi.c | 1 + > > > > drivers/iio/accel/adxl372.c | 4 +-- > > > > drivers/iio/accel/adxl372_i2c.c | 1 + > > > > drivers/iio/accel/adxl372_spi.c | 1 + > > > > drivers/iio/accel/bma400_core.c | 6 ++-- > > > > drivers/iio/accel/bma400_i2c.c | 1 + > > > > drivers/iio/accel/bma400_spi.c | 1 + > > > > drivers/iio/accel/bmc150-accel-core.c | 8 ++--- > > > > drivers/iio/accel/bmc150-accel-i2c.c | 1 + > > > > drivers/iio/accel/bmc150-accel-spi.c | 1 + > > > > drivers/iio/accel/bmi088-accel-core.c | 8 ++--- > > > > drivers/iio/accel/bmi088-accel-spi.c | 1 + > > > > drivers/iio/accel/fxls8962af-core.c | 6 ++-- > > > > drivers/iio/accel/fxls8962af-i2c.c | 1 + > > > > drivers/iio/accel/fxls8962af-spi.c | 1 + > > > > drivers/iio/accel/kxsd9-i2c.c | 1 + > > > > drivers/iio/accel/kxsd9-spi.c | 1 + > > > > drivers/iio/accel/kxsd9.c | 6 ++-- > > > > drivers/iio/accel/mma7455_core.c | 6 ++-- > > > > drivers/iio/accel/mma7455_i2c.c | 1 + > > > > drivers/iio/accel/mma7455_spi.c | 1 + > > > > drivers/iio/accel/mma9551.c | 1 + > > > > drivers/iio/accel/mma9551_core.c | 36 +++++++++---- > > > > ------ > > > > drivers/iio/accel/mma9553.c | 1 + > > > > drivers/iio/accel/st_accel_buffer.c | 5 --- > > > > drivers/iio/accel/st_accel_core.c | 5 +-- > > > > drivers/iio/accel/st_accel_i2c.c | 1 + > > > > drivers/iio/accel/st_accel_spi.c | 1 + > > > > .../iio/common/st_sensors/st_sensors_buffer.c | 7 +--- > > > > .../iio/common/st_sensors/st_sensors_core.c | 28 +++++++------ > > > > -- > > > > .../iio/common/st_sensors/st_sensors_i2c.c | 2 +- > > > > .../iio/common/st_sensors/st_sensors_spi.c | 2 +- > > > > .../common/st_sensors/st_sensors_trigger.c | 9 ++--- > > > > drivers/iio/gyro/st_gyro_buffer.c | 4 --- > > > > drivers/iio/gyro/st_gyro_core.c | 5 +-- > > > > drivers/iio/gyro/st_gyro_i2c.c | 1 + > > > > drivers/iio/gyro/st_gyro_spi.c | 1 + > > > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 3 +- > > > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 1 + > > > > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 1 + > > > > drivers/iio/magnetometer/st_magn_buffer.c | 4 --- > > > > drivers/iio/magnetometer/st_magn_core.c | 5 +-- > > > > drivers/iio/magnetometer/st_magn_i2c.c | 1 + > > > > drivers/iio/magnetometer/st_magn_spi.c | 1 + > > > > drivers/iio/pressure/st_pressure_buffer.c | 5 --- > > > > drivers/iio/pressure/st_pressure_core.c | 5 +-- > > > > drivers/iio/pressure/st_pressure_i2c.c | 1 + > > > > drivers/iio/pressure/st_pressure_spi.c | 1 + > > > > 56 files changed, 111 insertions(+), 103 deletions(-) > > > > > > > > > >
From: Jonathan Cameron <Jonathan.Cameron@huawei.com> Changes since v1: * Add IIO_ prefix to namespaces. https://lwn.net/Articles/760045/ provides a good overview of this feature and why it might be used. In this particular case we fall under the multi module case. For each group of modules, I've moved the exports into an independent namespace. Whilst I'm not entirely sure it is worth the noise of moving the main IIO exports into a namespace, it is definitely worthwhile for these small clusters of related modules (typically a core + i2c and spi modules). I've just done those within drivers/accel (including all of st-sensors as I did not want to do that piecemeal) as an initial set to get feedback on what people think of the approach and in particular naming of the namespaces. As you can see it is a straight forward change to makes so I'll do the rest of the IIO drivers once we are agreed on the generic details. Note that I'll be expecting this for any new cases of this pattern going forwards. Includes a small diversion in st-sensors where we had a bunch of duplicated MODULE_* macros for some of the core modules which were made up of multiple c files. Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Lucas Stankus <lucas.p.stankus@gmail.com> Cc: Puranjay Mohan <puranjay12@gmail.com> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Mike Looijmans <mike.looijmans@topic.nl> Cc: Sean Nyekjaer <sean@geanix.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Denis Ciocca <denis.ciocca@st.com> Jonathan Cameron (13): iio:accel:mma9551_core: Move exports into IIO_MMA9551 namespace iio:accel:mma7455_core: Move exports into IIO_MMA7455 namespace iio:accel:kxsd9: Move exports into IIO_KDSD9 namespace iio:accel:bma400: Move exports into IIO_BMA400 namespace iio:accel:adxl313: Move exports into IIO_ADXL313 namespace iio:accel:adxl345: Move exports into IIO_ADXL345 namespace iio:accel:adxl355: Move exports into IIO_ADXL355 namespace iio:accel:adxl372: Move exports into IIO_ADXL372 namespace iio:accel:bmc150: Move exports into IIO_BMC150 namespace iio:accel:bmi088: Move exports into IIO_BMI088 namespace iio:accel:fxl8962af: Move exports into IIO_FXL8962AF namespace iio:st-sensors: Remove duplicate MODULE_* iio:st-sensors: Move exports into IIO_ST_SENSORS namespace drivers/iio/accel/adxl313_core.c | 6 ++-- drivers/iio/accel/adxl313_i2c.c | 1 + drivers/iio/accel/adxl313_spi.c | 1 + drivers/iio/accel/adxl345_core.c | 2 +- drivers/iio/accel/adxl345_i2c.c | 1 + drivers/iio/accel/adxl345_spi.c | 1 + drivers/iio/accel/adxl355_core.c | 6 ++-- drivers/iio/accel/adxl355_i2c.c | 1 + drivers/iio/accel/adxl355_spi.c | 1 + drivers/iio/accel/adxl372.c | 4 +-- drivers/iio/accel/adxl372_i2c.c | 1 + drivers/iio/accel/adxl372_spi.c | 1 + drivers/iio/accel/bma400_core.c | 6 ++-- drivers/iio/accel/bma400_i2c.c | 1 + drivers/iio/accel/bma400_spi.c | 1 + drivers/iio/accel/bmc150-accel-core.c | 8 ++--- drivers/iio/accel/bmc150-accel-i2c.c | 1 + drivers/iio/accel/bmc150-accel-spi.c | 1 + drivers/iio/accel/bmi088-accel-core.c | 8 ++--- drivers/iio/accel/bmi088-accel-spi.c | 1 + drivers/iio/accel/fxls8962af-core.c | 6 ++-- drivers/iio/accel/fxls8962af-i2c.c | 1 + drivers/iio/accel/fxls8962af-spi.c | 1 + drivers/iio/accel/kxsd9-i2c.c | 1 + drivers/iio/accel/kxsd9-spi.c | 1 + drivers/iio/accel/kxsd9.c | 6 ++-- drivers/iio/accel/mma7455_core.c | 6 ++-- drivers/iio/accel/mma7455_i2c.c | 1 + drivers/iio/accel/mma7455_spi.c | 1 + drivers/iio/accel/mma9551.c | 1 + drivers/iio/accel/mma9551_core.c | 36 +++++++++---------- drivers/iio/accel/mma9553.c | 1 + drivers/iio/accel/st_accel_buffer.c | 5 --- drivers/iio/accel/st_accel_core.c | 5 +-- drivers/iio/accel/st_accel_i2c.c | 1 + drivers/iio/accel/st_accel_spi.c | 1 + .../iio/common/st_sensors/st_sensors_buffer.c | 7 +--- .../iio/common/st_sensors/st_sensors_core.c | 28 +++++++-------- .../iio/common/st_sensors/st_sensors_i2c.c | 2 +- .../iio/common/st_sensors/st_sensors_spi.c | 2 +- .../common/st_sensors/st_sensors_trigger.c | 9 ++--- drivers/iio/gyro/st_gyro_buffer.c | 4 --- drivers/iio/gyro/st_gyro_core.c | 5 +-- drivers/iio/gyro/st_gyro_i2c.c | 1 + drivers/iio/gyro/st_gyro_spi.c | 1 + drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 3 +- drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 1 + drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 1 + drivers/iio/magnetometer/st_magn_buffer.c | 4 --- drivers/iio/magnetometer/st_magn_core.c | 5 +-- drivers/iio/magnetometer/st_magn_i2c.c | 1 + drivers/iio/magnetometer/st_magn_spi.c | 1 + drivers/iio/pressure/st_pressure_buffer.c | 5 --- drivers/iio/pressure/st_pressure_core.c | 5 +-- drivers/iio/pressure/st_pressure_i2c.c | 1 + drivers/iio/pressure/st_pressure_spi.c | 1 + 56 files changed, 111 insertions(+), 103 deletions(-)