2nd set of IIO export namespaces
Subsystems (11)
Jonathan Cameron
maintainercover 2nd set of IIO export namespaces
From: Jonathan Cameron <[email protected]>
Whilst I'm still looking for additional review on the first set, I'll take the quiet as meaning no one objects and send out a second set. Note that I don't have anyone cc'd on some of these because I couldn't immediately figure out who was still active and familiar with the drivers. As these should be simple to review, please take a look at as many as you have time for!
Here's the reasoning as per the first set cover letter. Note that we have some clashes with patches that I'd like to clean up the handling of dev_pm_ops and CONFIG_PM* guards so for now I've dropped those cases from this series.
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.
Jonathan Cameron (16):
iio:adc:ad_sigma_delta: Move exports into IIO_AD_SIGMA_DELTA namespace iio:adc:ad7091r: Move exports into IIO_AD7091R namespace. iio:adc:ad76060: Move exports into IIO_AD7606 namespace. iio:common:meas-spec: Move exports into IIO_MEAS_SPEC_SENSORS iio:common:ssp_sensors: Move exports into IIO_SSP_SENSORS namespace iio:dac:ad5592r: Move exports into IIO_AD5592R namespace iio:dac:ad5686: Move exports into IIO_AD5686 namespace iio:imu:adis: Move exports into IIO_ADISLIB namespace iio:pressure:zpa2326: Move exports into IIO_ZPA2326 namespace iio:pressure:ms5611: Move exports into IIO_MS5611 namespace iio:pressure:mpl115: Move exports into IIO_MPL115 namespace iio:magnetometer:rm3100: Move exports to IIO_RM3100 namespace iio:magnetometer:bmc150: Move exports to IIO_BMC150_MAGN namespace iio:magnetometer:hmc5843: Move exports to IIO_HMC5843 namespace iio:light:st_uvis25: Move exports to IIO_UVIS25 namespace iio:chemical:bme680: Move exports to IIO_BME680 namespace
drivers/iio/accel/adis16201.c | 1 + drivers/iio/accel/adis16209.c | 1 + drivers/iio/accel/ssp_accel_sensor.c | 1 + drivers/iio/adc/ad7091r-base.c | 4 ++-- drivers/iio/adc/ad7091r5.c | 1 + drivers/iio/adc/ad7124.c | 1 + drivers/iio/adc/ad7192.c | 1 + drivers/iio/adc/ad7606.c | 4 ++-- drivers/iio/adc/ad7606_par.c | 1 + drivers/iio/adc/ad7606_spi.c | 1 + drivers/iio/adc/ad7780.c | 1 + drivers/iio/adc/ad7791.c | 1 + drivers/iio/adc/ad7793.c | 1 + drivers/iio/adc/ad_sigma_delta.c | 20 ++++++++-------- drivers/iio/chemical/bme680_core.c | 4 ++-- drivers/iio/chemical/bme680_i2c.c | 1 + drivers/iio/chemical/bme680_spi.c | 1 + .../iio/common/ms_sensors/ms_sensors_i2c.c | 24 +++++++++---------- drivers/iio/common/ssp_sensors/ssp_dev.c | 10 ++++---- drivers/iio/common/ssp_sensors/ssp_iio.c | 7 +++--- drivers/iio/dac/ad5592r-base.c | 4 ++-- drivers/iio/dac/ad5592r.c | 1 + drivers/iio/dac/ad5593r.c | 1 + drivers/iio/dac/ad5686-spi.c | 1 + drivers/iio/dac/ad5686.c | 4 ++-- drivers/iio/dac/ad5696-i2c.c | 1 + drivers/iio/gyro/adis16136.c | 1 + drivers/iio/gyro/adis16260.c | 1 + drivers/iio/gyro/ssp_gyro_sensor.c | 1 + drivers/iio/humidity/htu21.c | 1 + drivers/iio/imu/adis.c | 20 ++++++++-------- drivers/iio/imu/adis16400.c | 1 + drivers/iio/imu/adis16460.c | 1 + drivers/iio/imu/adis16475.c | 1 + drivers/iio/imu/adis16480.c | 1 + drivers/iio/imu/adis_buffer.c | 4 ++-- drivers/iio/imu/adis_trigger.c | 2 +- drivers/iio/light/st_uvis25_core.c | 4 ++-- drivers/iio/light/st_uvis25_i2c.c | 1 + drivers/iio/light/st_uvis25_spi.c | 1 + drivers/iio/magnetometer/bmc150_magn.c | 8 +++---- drivers/iio/magnetometer/bmc150_magn_i2c.c | 1 + drivers/iio/magnetometer/bmc150_magn_spi.c | 1 + drivers/iio/magnetometer/hmc5843_core.c | 8 +++---- drivers/iio/magnetometer/hmc5843_i2c.c | 1 + drivers/iio/magnetometer/hmc5843_spi.c | 1 + drivers/iio/magnetometer/rm3100-core.c | 8 +++---- drivers/iio/magnetometer/rm3100-i2c.c | 1 + drivers/iio/magnetometer/rm3100-spi.c | 1 + drivers/iio/pressure/mpl115.c | 2 +- drivers/iio/pressure/mpl115_i2c.c | 1 + drivers/iio/pressure/mpl115_spi.c | 1 + drivers/iio/pressure/ms5611_core.c | 4 ++-- drivers/iio/pressure/ms5611_i2c.c | 1 + drivers/iio/pressure/ms5611_spi.c | 1 + drivers/iio/pressure/ms5637.c | 1 + drivers/iio/pressure/zpa2326.c | 12 +++++----- drivers/iio/pressure/zpa2326_i2c.c | 1 + drivers/iio/pressure/zpa2326_spi.c | 1 + drivers/iio/temperature/tsys01.c | 1 + drivers/iio/temperature/tsys02d.c | 1 + drivers/staging/iio/accel/adis16203.c | 1 + drivers/staging/iio/accel/adis16240.c | 1 + 63 files changed, 121 insertions(+), 76 deletions(-)
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 1/16 iio:adc:ad_sigma_delta: Move exports into IIO_AD_SIGMA_DELTA namespace
From: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the core/library functions into a specific namespace and import that into the various specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/adc/ad7124.c | 1 + drivers/iio/adc/ad7192.c | 1 + drivers/iio/adc/ad7780.c | 1 + drivers/iio/adc/ad7791.c | 1 + drivers/iio/adc/ad7793.c | 1 + drivers/iio/adc/ad_sigma_delta.c | 20 ++++++++++---------- 6 files changed, 15 insertions(+), 10 deletions(-)
drivers/iio/adc/ad7124.c +1 -0
@@ -970,3 +970,4 @@ module_spi_driver(ad71124_driver);MODULE_AUTHOR ("Stefan Popa <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7124 SPI driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_AD_SIGMA_DELTA );
drivers/iio/adc/ad7192.c +1 -0
@@ -1048,3 +1048,4 @@ module_spi_driver(ad7192_driver);MODULE_AUTHOR ("Michael Hennerich <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7190, AD7192, AD7193, AD7195 ADC" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD_SIGMA_DELTA );
drivers/iio/adc/ad7780.c +1 -0
@@ -375,3 +375,4 @@ module_spi_driver(ad7780_driver);MODULE_AUTHOR ("Michael Hennerich <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7780 and similar ADCs" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD_SIGMA_DELTA );
drivers/iio/adc/ad7791.c +1 -0
@@ -474,3 +474,4 @@ module_spi_driver(ad7791_driver);MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7787/AD7788/AD7789/AD7790/AD7791 ADC driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD_SIGMA_DELTA );
drivers/iio/adc/ad7793.c +1 -0
@@ -867,3 +867,4 @@ module_spi_driver(ad7793_driver);MODULE_AUTHOR ("Michael Hennerich <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7793 and similar ADCs" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD_SIGMA_DELTA );
drivers/iio/adc/ad_sigma_delta.c +10 -10
@@ -42,7 +42,7 @@ void ad_sd_set_comm(struct ad_sigma_delta *sigma_delta, uint8_t comm)* to select the channel */ sigma_delta->comm = comm &AD_SD_COMM_CHAN_MASK ; } -EXPORT_SYMBOL_GPL (ad_sd_set_comm); +EXPORT_SYMBOL_NS_GPL (ad_sd_set_comm,IIO_AD_SIGMA_DELTA );/** * ad_sd_write_reg() - Write a register
@@ -94,7 +94,7 @@ int ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,return ret; } -EXPORT_SYMBOL_GPL (ad_sd_write_reg); +EXPORT_SYMBOL_NS_GPL (ad_sd_write_reg,IIO_AD_SIGMA_DELTA );static int ad_sd_read_reg_raw (struct ad_sigma_delta *sigma_delta,unsigned int reg,unsigned int size,uint8_t *val)
@@ -171,7 +171,7 @@ int ad_sd_read_reg(struct ad_sigma_delta *sigma_delta, out:return ret; } -EXPORT_SYMBOL_GPL (ad_sd_read_reg); +EXPORT_SYMBOL_NS_GPL (ad_sd_read_reg,IIO_AD_SIGMA_DELTA );/** * ad_sd_reset() - Reset the serial interface
@@ -199,7 +199,7 @@ int ad_sd_reset(struct ad_sigma_delta *sigma_delta,return ret; } -EXPORT_SYMBOL_GPL (ad_sd_reset); +EXPORT_SYMBOL_NS_GPL (ad_sd_reset,IIO_AD_SIGMA_DELTA );int ad_sd_calibrate (struct ad_sigma_delta *sigma_delta,unsigned int mode,unsigned int channel)
@@ -238,7 +238,7 @@ int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta,return ret; } -EXPORT_SYMBOL_GPL (ad_sd_calibrate); +EXPORT_SYMBOL_NS_GPL (ad_sd_calibrate,IIO_AD_SIGMA_DELTA );/** * ad_sd_calibrate_all() - Performs channel calibration
@@ -262,7 +262,7 @@ int ad_sd_calibrate_all(struct ad_sigma_delta *sigma_delta,return 0 ; } -EXPORT_SYMBOL_GPL (ad_sd_calibrate_all); +EXPORT_SYMBOL_NS_GPL (ad_sd_calibrate_all,IIO_AD_SIGMA_DELTA );/** * ad_sigma_delta_single_conversion() - Performs a single data conversion
@@ -337,7 +337,7 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,return IIO_VAL_INT ; } -EXPORT_SYMBOL_GPL (ad_sigma_delta_single_conversion); +EXPORT_SYMBOL_NS_GPL (ad_sigma_delta_single_conversion,IIO_AD_SIGMA_DELTA );static int ad_sd_buffer_postenable (struct iio_dev *indio_dev) {
@@ -465,7 +465,7 @@ int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig)return 0 ; } -EXPORT_SYMBOL_GPL (ad_sd_validate_trigger); +EXPORT_SYMBOL_NS_GPL (ad_sd_validate_trigger,IIO_AD_SIGMA_DELTA );static int devm_ad_sd_probe_trigger (struct device *dev,struct iio_dev *indio_dev) {
@@ -524,7 +524,7 @@ int devm_ad_sd_setup_buffer_and_trigger(struct device *dev, struct iio_dev *indireturn devm_ad_sd_probe_trigger (dev, indio_dev); } -EXPORT_SYMBOL_GPL (devm_ad_sd_setup_buffer_and_trigger); +EXPORT_SYMBOL_NS_GPL (devm_ad_sd_setup_buffer_and_trigger,IIO_AD_SIGMA_DELTA );/** * ad_sd_init() - Initializes a ad_sigma_delta struct
@@ -545,7 +545,7 @@ int ad_sd_init(struct ad_sigma_delta *sigma_delta, struct iio_dev *indio_dev,return 0 ; } -EXPORT_SYMBOL_GPL (ad_sd_init); +EXPORT_SYMBOL_NS_GPL (ad_sd_init,IIO_AD_SIGMA_DELTA );MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices Sigma-Delta ADCs" );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 2/16 iio:adc:ad7091r: Move exports into IIO_AD7091R namespace.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the core/library functions into a specific namespace and import that into the various specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
An alternative here would be to conclude that we are unlikely to see support for the other ad7091r parts in the near future and just merge the two modules into one supporting just the i2c -5 variant.
--- drivers/iio/adc/ad7091r-base.c | 4 ++-- drivers/iio/adc/ad7091r5.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/iio/adc/ad7091r-base.c +2 -2
@@ -260,7 +260,7 @@ int ad7091r_probe(struct device *dev, const char *name,return devm_iio_device_register (dev, iio_dev); } -EXPORT_SYMBOL_GPL (ad7091r_probe); +EXPORT_SYMBOL_NS_GPL (ad7091r_probe,IIO_AD7091R );static bool ad7091r_writeable_reg (struct device *dev,unsigned int reg) {
@@ -290,7 +290,7 @@ const struct regmap_config ad7091r_regmap_config = { .writeable_reg = ad7091r_writeable_reg, .volatile_reg = ad7091r_volatile_reg, }; -EXPORT_SYMBOL_GPL (ad7091r_regmap_config); +EXPORT_SYMBOL_NS_GPL (ad7091r_regmap_config,IIO_AD7091R );MODULE_AUTHOR ("Beniamin Bia <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7091Rx multi-channel converters" );
drivers/iio/adc/ad7091r5.c +1 -0
@@ -111,3 +111,4 @@ module_i2c_driver(ad7091r5_driver);MODULE_AUTHOR ("Beniamin Bia <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7091R5 multi-channel ADC driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD7091R );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 3/16 iio:adc:ad76060: Move exports into IIO_AD7606 namespace.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the core/library functions into a specific namespace and import that into the various bus specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/adc/ad7606.c | 4 ++-- drivers/iio/adc/ad7606_par.c | 1 + drivers/iio/adc/ad7606_spi.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)
drivers/iio/adc/ad7606.c +2 -2
@@ -693,7 +693,7 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,return devm_iio_device_register (dev, indio_dev); } -EXPORT_SYMBOL_GPL (ad7606_probe); +EXPORT_SYMBOL_NS_GPL (ad7606_probe,IIO_AD7606 );#ifdef CONFIG_PM_SLEEP
@@ -725,7 +725,7 @@ static int ad7606_resume(struct device *dev) }SIMPLE_DEV_PM_OPS (ad7606_pm_ops, ad7606_suspend, ad7606_resume); -EXPORT_SYMBOL_GPL (ad7606_pm_ops); +EXPORT_SYMBOL_NS_GPL (ad7606_pm_ops,IIO_AD7606 );#endif
drivers/iio/adc/ad7606_par.c +1 -0
@@ -101,3 +101,4 @@ module_platform_driver(ad7606_driver);MODULE_AUTHOR ("Michael Hennerich <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7606 ADC" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD7606 );
drivers/iio/adc/ad7606_spi.c +1 -0
@@ -362,3 +362,4 @@ module_spi_driver(ad7606_driver);MODULE_AUTHOR ("Michael Hennerich <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7606 ADC" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD7606 );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 4/16 iio:common:meas-spec: Move exports into IIO_MEAS_SPEC_SENSORS
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
The obvious choice of ms_sensors felt rather too likely to clash with other namespaces introduced in future, hence the longer abbreviation.
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the various specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- .../iio/common/ms_sensors/ms_sensors_i2c.c | 24 +++++++++---------- drivers/iio/humidity/htu21.c | 1 + drivers/iio/pressure/ms5637.c | 1 + drivers/iio/temperature/tsys01.c | 1 + drivers/iio/temperature/tsys02d.c | 1 + 5 files changed, 16 insertions(+), 12 deletions(-)
drivers/iio/common/ms_sensors/ms_sensors_i2c.c +12 -12
@@ -58,7 +58,7 @@ int ms_sensors_reset(void *cli, u8 cmd, unsigned int delay)return 0 ; } -EXPORT_SYMBOL (ms_sensors_reset); +EXPORT_SYMBOL_NS (ms_sensors_reset,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_read_prom_word() - PROM word read function
@@ -84,7 +84,7 @@ int ms_sensors_read_prom_word(void *cli, int cmd, u16 *word)return 0 ; } -EXPORT_SYMBOL (ms_sensors_read_prom_word); +EXPORT_SYMBOL_NS (ms_sensors_read_prom_word,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_convert_and_read() - ADC conversion & read function
@@ -130,7 +130,7 @@ int ms_sensors_convert_and_read(void *cli, u8 conv, u8 rd,dev_err (&client->dev,"Unable to make sensor adc conversion\n" );return ret; } -EXPORT_SYMBOL (ms_sensors_convert_and_read); +EXPORT_SYMBOL_NS (ms_sensors_convert_and_read,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_crc_valid() - CRC check function
@@ -248,7 +248,7 @@ int ms_sensors_read_serial(struct i2c_client *client, u64 *sn)return 0 ; } -EXPORT_SYMBOL (ms_sensors_read_serial); +EXPORT_SYMBOL_NS (ms_sensors_read_serial,IIO_MEAS_SPEC_SENSORS );static int ms_sensors_read_config_reg (struct i2c_client *client,u8 *config_reg)
@@ -299,7 +299,7 @@ ssize_t ms_sensors_write_resolution(struct ms_ht_dev *dev_data,MS_SENSORS_CONFIG_REG_WRITE , config_reg); } -EXPORT_SYMBOL (ms_sensors_write_resolution); +EXPORT_SYMBOL_NS (ms_sensors_write_resolution,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_show_battery_low() - Show device battery low indicator
@@ -326,7 +326,7 @@ ssize_t ms_sensors_show_battery_low(struct ms_ht_dev *dev_data,return sysfs_emit (buf,"%d\n" , (config_reg &0x40 ) >>6 ); } -EXPORT_SYMBOL (ms_sensors_show_battery_low); +EXPORT_SYMBOL_NS (ms_sensors_show_battery_low,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_show_heater() - Show device heater
@@ -353,7 +353,7 @@ ssize_t ms_sensors_show_heater(struct ms_ht_dev *dev_data,return sysfs_emit (buf,"%d\n" , (config_reg &0x4 ) >>2 ); } -EXPORT_SYMBOL (ms_sensors_show_heater); +EXPORT_SYMBOL_NS (ms_sensors_show_heater,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_write_heater() - Write device heater
@@ -401,7 +401,7 @@ ssize_t ms_sensors_write_heater(struct ms_ht_dev *dev_data,return len; } -EXPORT_SYMBOL (ms_sensors_write_heater); +EXPORT_SYMBOL_NS (ms_sensors_write_heater,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_ht_read_temperature() - Read temperature
@@ -442,7 +442,7 @@ int ms_sensors_ht_read_temperature(struct ms_ht_dev *dev_data,return 0 ; } -EXPORT_SYMBOL (ms_sensors_ht_read_temperature); +EXPORT_SYMBOL_NS (ms_sensors_ht_read_temperature,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_ht_read_humidity() - Read humidity
@@ -485,7 +485,7 @@ int ms_sensors_ht_read_humidity(struct ms_ht_dev *dev_data,return 0 ; } -EXPORT_SYMBOL (ms_sensors_ht_read_humidity); +EXPORT_SYMBOL_NS (ms_sensors_ht_read_humidity,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_tp_crc4() - Calculate PROM CRC for
@@ -602,7 +602,7 @@ int ms_sensors_tp_read_prom(struct ms_tp_dev *dev_data)return 0 ; } -EXPORT_SYMBOL (ms_sensors_tp_read_prom); +EXPORT_SYMBOL_NS (ms_sensors_tp_read_prom,IIO_MEAS_SPEC_SENSORS );/** * ms_sensors_read_temp_and_pressure() - read temp and pressure
@@ -688,7 +688,7 @@ int ms_sensors_read_temp_and_pressure(struct ms_tp_dev *dev_data,return 0 ; } -EXPORT_SYMBOL (ms_sensors_read_temp_and_pressure); +EXPORT_SYMBOL_NS (ms_sensors_read_temp_and_pressure,IIO_MEAS_SPEC_SENSORS );MODULE_DESCRIPTION ("Measurement-Specialties common i2c driver" );MODULE_AUTHOR ("William Markezana <[email protected]>" );
drivers/iio/humidity/htu21.c +1 -0
@@ -258,3 +258,4 @@ MODULE_DESCRIPTION("Measurement-Specialties htu21 temperature and humidity driveMODULE_AUTHOR ("William Markezana <[email protected]>" );MODULE_AUTHOR ("Ludovic Tancerel <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_MEAS_SPEC_SENSORS );
drivers/iio/pressure/ms5637.c +1 -0
@@ -252,3 +252,4 @@ MODULE_DESCRIPTION("Measurement-Specialties ms5637 temperature & pressure driverMODULE_AUTHOR ("William Markezana <[email protected]>" );MODULE_AUTHOR ("Ludovic Tancerel <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_MEAS_SPEC_SENSORS );
drivers/iio/temperature/tsys01.c +1 -0
@@ -233,3 +233,4 @@ MODULE_DESCRIPTION("Measurement-Specialties tsys01 temperature driver");MODULE_AUTHOR ("William Markezana <[email protected]>" );MODULE_AUTHOR ("Ludovic Tancerel <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_MEAS_SPEC_SENSORS );
drivers/iio/temperature/tsys02d.c +1 -0
@@ -187,3 +187,4 @@ MODULE_DESCRIPTION("Measurement-Specialties tsys02d temperature driver");MODULE_AUTHOR ("William Markezana <[email protected]>" );MODULE_AUTHOR ("Ludovic Tancerel <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_MEAS_SPEC_SENSORS );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 5/16 iio:common:ssp_sensors: Move exports into IIO_SSP_SENSORS namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the various specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
Both the exports used between the two common modules and the individual drivers are moved to a single namespace as greater granularity does not feel useful.
--- drivers/iio/accel/ssp_accel_sensor.c | 1 + drivers/iio/common/ssp_sensors/ssp_dev.c | 10 +++++----- drivers/iio/common/ssp_sensors/ssp_iio.c | 7 ++++--- drivers/iio/gyro/ssp_gyro_sensor.c | 1 + 4 files changed, 11 insertions(+), 8 deletions(-)
drivers/iio/accel/ssp_accel_sensor.c +1 -0
@@ -142,3 +142,4 @@ module_platform_driver(ssp_accel_driver);MODULE_AUTHOR ("Karol Wrona <[email protected]>" );MODULE_DESCRIPTION ("Samsung sensorhub accelerometers driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_SSP_SENSORS );
drivers/iio/common/ssp_sensors/ssp_dev.c +5 -5
@@ -204,7 +204,7 @@ u32 ssp_get_sensor_delay(struct ssp_data *data, enum ssp_sensor_type type) {return data->delay_buf[type]; } -EXPORT_SYMBOL (ssp_get_sensor_delay); +EXPORT_SYMBOL_NS (ssp_get_sensor_delay,IIO_SSP_SENSORS );/** * ssp_enable_sensor() - enables data acquisition for sensor
@@ -266,7 +266,7 @@ int ssp_enable_sensor(struct ssp_data *data, enum ssp_sensor_type type, derror:return ret; } -EXPORT_SYMBOL (ssp_enable_sensor); +EXPORT_SYMBOL_NS (ssp_enable_sensor,IIO_SSP_SENSORS );/** * ssp_change_delay() - changes data acquisition for sensor
@@ -297,7 +297,7 @@ int ssp_change_delay(struct ssp_data *data, enum ssp_sensor_type type,return 0 ; } -EXPORT_SYMBOL (ssp_change_delay); +EXPORT_SYMBOL_NS (ssp_change_delay,IIO_SSP_SENSORS );/** * ssp_disable_sensor() - disables sensor
@@ -334,7 +334,7 @@ int ssp_disable_sensor(struct ssp_data *data, enum ssp_sensor_type type)return 0 ; } -EXPORT_SYMBOL (ssp_disable_sensor); +EXPORT_SYMBOL_NS (ssp_disable_sensor,IIO_SSP_SENSORS );static irqreturn_t ssp_irq_thread_fn (int irq,void *dev_id) {
@@ -490,7 +490,7 @@ void ssp_register_consumer(struct iio_dev *indio_dev, enum ssp_sensor_type type) data->sensor_devs[type] = indio_dev; } -EXPORT_SYMBOL (ssp_register_consumer); +EXPORT_SYMBOL_NS (ssp_register_consumer,IIO_SSP_SENSORS );static int ssp_probe (struct spi_device *spi) {
drivers/iio/common/ssp_sensors/ssp_iio.c +4 -3
@@ -32,7 +32,7 @@ int ssp_common_buffer_postenable(struct iio_dev *indio_dev)return ssp_enable_sensor (data, spd->type,ssp_get_sensor_delay (data, spd->type)); } -EXPORT_SYMBOL (ssp_common_buffer_postenable); +EXPORT_SYMBOL_NS (ssp_common_buffer_postenable,IIO_SSP_SENSORS );/** * ssp_common_buffer_postdisable() - generic postdisable callback for ssp buffer
@@ -55,7 +55,7 @@ int ssp_common_buffer_postdisable(struct iio_dev *indio_dev)return ret; } -EXPORT_SYMBOL (ssp_common_buffer_postdisable); +EXPORT_SYMBOL_NS (ssp_common_buffer_postdisable,IIO_SSP_SENSORS );/** * ssp_common_process_data() - Common process data callback for ssp sensors
@@ -91,8 +91,9 @@ int ssp_common_process_data(struct iio_dev *indio_dev, void *buf,return iio_push_to_buffers_with_timestamp (indio_dev, spd->buffer, calculated_time); } -EXPORT_SYMBOL (ssp_common_process_data); +EXPORT_SYMBOL_NS (ssp_common_process_data,IIO_SSP_SENSORS );MODULE_AUTHOR ("Karol Wrona <[email protected]>" );MODULE_DESCRIPTION ("Samsung sensorhub commons" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_SSP_SENSORS );
drivers/iio/gyro/ssp_gyro_sensor.c +1 -0
@@ -142,3 +142,4 @@ module_platform_driver(ssp_gyro_driver);MODULE_AUTHOR ("Karol Wrona <[email protected]>" );MODULE_DESCRIPTION ("Samsung sensorhub gyroscopes driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_SSP_SENSORS );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 6/16 iio:dac:ad5592r: Move exports into IIO_AD5592R namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the various specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/dac/ad5592r-base.c | 4 ++-- drivers/iio/dac/ad5592r.c | 1 + drivers/iio/dac/ad5593r.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)
drivers/iio/dac/ad5592r-base.c +2 -2
@@ -661,7 +661,7 @@ int ad5592r_probe(struct device *dev, const char *name,return ret; } -EXPORT_SYMBOL_GPL (ad5592r_probe); +EXPORT_SYMBOL_NS_GPL (ad5592r_probe,IIO_AD5592R );void ad5592r_remove (struct device *dev) {
@@ -675,7 +675,7 @@ void ad5592r_remove(struct device *dev)if (st->reg)regulator_disable (st->reg); } -EXPORT_SYMBOL_GPL (ad5592r_remove); +EXPORT_SYMBOL_NS_GPL (ad5592r_remove,IIO_AD5592R );MODULE_AUTHOR ("Paul Cercueil <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD5592R multi-channel converters" );
drivers/iio/dac/ad5592r.c +1 -0
@@ -170,3 +170,4 @@ module_spi_driver(ad5592r_spi_driver);MODULE_AUTHOR ("Paul Cercueil <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD5592R multi-channel converters" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD5592R );
drivers/iio/dac/ad5593r.c +1 -0
@@ -137,3 +137,4 @@ module_i2c_driver(ad5593r_driver);MODULE_AUTHOR ("Paul Cercueil <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD5593R multi-channel converters" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD5592R );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 7/16 iio:dac:ad5686: Move exports into IIO_AD5686 namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Note these are used in the related ad5696-i2c drivers as well as the more obviously connected ad5686-spi driver.
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the various specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/dac/ad5686-spi.c | 1 + drivers/iio/dac/ad5686.c | 4 ++-- drivers/iio/dac/ad5696-i2c.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)
drivers/iio/dac/ad5686-spi.c +1 -0
@@ -137,3 +137,4 @@ module_spi_driver(ad5686_spi_driver);MODULE_AUTHOR ("Stefan Popa <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD5686 and similar multi-channel DACs" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD5686 );
drivers/iio/dac/ad5686.c +2 -2
@@ -536,7 +536,7 @@ int ad5686_probe(struct device *dev,regulator_disable (st->reg);return ret; } -EXPORT_SYMBOL_GPL (ad5686_probe); +EXPORT_SYMBOL_NS_GPL (ad5686_probe,IIO_AD5686 );void ad5686_remove (struct device *dev) {
@@ -547,7 +547,7 @@ void ad5686_remove(struct device *dev)if (!IS_ERR (st->reg))regulator_disable (st->reg); } -EXPORT_SYMBOL_GPL (ad5686_remove); +EXPORT_SYMBOL_NS_GPL (ad5686_remove,IIO_AD5686 );MODULE_AUTHOR ("Michael Hennerich <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD5686/85/84 DAC" );
drivers/iio/dac/ad5696-i2c.c +1 -0
@@ -125,3 +125,4 @@ module_i2c_driver(ad5686_i2c_driver);MODULE_AUTHOR ("Stefan Popa <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD5686 and similar multi-channel DACs" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD5686 );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 8/16 iio:imu:adis: Move exports into IIO_ADISLIB namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unneessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the various specific device drivers that use them.
--- drivers/iio/accel/adis16201.c | 1 + drivers/iio/accel/adis16209.c | 1 + drivers/iio/gyro/adis16136.c | 1 + drivers/iio/gyro/adis16260.c | 1 + drivers/iio/imu/adis.c | 20 ++++++++++---------- drivers/iio/imu/adis16400.c | 1 + drivers/iio/imu/adis16460.c | 1 + drivers/iio/imu/adis16475.c | 1 + drivers/iio/imu/adis16480.c | 1 + drivers/iio/imu/adis_buffer.c | 4 ++-- drivers/iio/imu/adis_trigger.c | 2 +- drivers/staging/iio/accel/adis16203.c | 1 + drivers/staging/iio/accel/adis16240.c | 1 + 13 files changed, 23 insertions(+), 13 deletions(-)
drivers/iio/accel/adis16201.c +1 -0
@@ -300,3 +300,4 @@ MODULE_AUTHOR("Barry Song <[email protected]>");MODULE_DESCRIPTION ("Analog Devices ADIS16201 Dual-Axis Digital Inclinometer and Accelerometer" );MODULE_LICENSE ("GPL v2" );MODULE_ALIAS ("spi:adis16201" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/iio/accel/adis16209.c +1 -0
@@ -310,3 +310,4 @@ MODULE_AUTHOR("Barry Song <[email protected]>");MODULE_DESCRIPTION ("Analog Devices ADIS16209 Dual-Axis Digital Inclinometer and Accelerometer" );MODULE_LICENSE ("GPL v2" );MODULE_ALIAS ("spi:adis16209" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/iio/gyro/adis16136.c +1 -0
@@ -591,3 +591,4 @@ module_spi_driver(adis16136_driver);MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices ADIS16133/ADIS16135/ADIS16136 gyroscope driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/iio/gyro/adis16260.c +1 -0
@@ -433,3 +433,4 @@ module_spi_driver(adis16260_driver);MODULE_AUTHOR ("Barry Song <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices ADIS16260/5 Digital Gyroscope Sensor" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/iio/imu/adis.c +10 -10
@@ -121,7 +121,7 @@ int __adis_write_reg(struct adis *adis, unsigned int reg, unsigned int value,return ret; } -EXPORT_SYMBOL_GPL (__adis_write_reg); +EXPORT_SYMBOL_NS_GPL (__adis_write_reg,IIO_ADISLIB );/** * __adis_read_reg() - read N bytes from register (unlocked version)
@@ -218,7 +218,7 @@ int __adis_read_reg(struct adis *adis, unsigned int reg, unsigned int *val,return ret; } -EXPORT_SYMBOL_GPL (__adis_read_reg); +EXPORT_SYMBOL_NS_GPL (__adis_read_reg,IIO_ADISLIB );/** * __adis_update_bits_base() - ADIS Update bits function - Unlocked version * @adis: The adis device
@@ -243,7 +243,7 @@ int __adis_update_bits_base(struct adis *adis, unsigned int reg, const u32 mask,return __adis_write_reg (adis, reg, __val, size); } -EXPORT_SYMBOL_GPL (__adis_update_bits_base); +EXPORT_SYMBOL_NS_GPL (__adis_update_bits_base,IIO_ADISLIB );#ifdef CONFIG_DEBUG_FS
@@ -265,7 +265,7 @@ int adis_debugfs_reg_access(struct iio_dev *indio_dev, unsigned int reg, return adis_write_reg_16(adis, reg, writeval); } -EXPORT_SYMBOL (adis_debugfs_reg_access); +EXPORT_SYMBOL_NS (adis_debugfs_reg_access,IIO_ADISLIB );#endif
@@ -314,7 +314,7 @@ int adis_enable_irq(struct adis *adis, bool enable)mutex_unlock (&adis->state_lock);return ret; } -EXPORT_SYMBOL (adis_enable_irq); +EXPORT_SYMBOL_NS (adis_enable_irq,IIO_ADISLIB );/** * __adis_check_status() - Check the device for error conditions (unlocked)
@@ -346,7 +346,7 @@ int __adis_check_status(struct adis *adis)return -EIO ; } -EXPORT_SYMBOL_GPL (__adis_check_status); +EXPORT_SYMBOL_NS_GPL (__adis_check_status,IIO_ADISLIB );/** * __adis_reset() - Reset the device (unlocked version)
@@ -370,7 +370,7 @@ int __adis_reset(struct adis *adis)return 0 ; } -EXPORT_SYMBOL_GPL (__adis_reset); +EXPORT_SYMBOL_NS_GPL (__adis_reset,IIO_ADIS_LIB );static int adis_self_test (struct adis *adis) {
@@ -461,7 +461,7 @@ int __adis_initial_startup(struct adis *adis)return 0 ; } -EXPORT_SYMBOL_GPL (__adis_initial_startup); +EXPORT_SYMBOL_NS_GPL (__adis_initial_startup,IIO_ADISLIB );/** * adis_single_conversion() - Performs a single sample conversion
@@ -509,7 +509,7 @@ int adis_single_conversion(struct iio_dev *indio_dev,mutex_unlock (&adis->state_lock);return ret; } -EXPORT_SYMBOL_GPL (adis_single_conversion); +EXPORT_SYMBOL_NS_GPL (adis_single_conversion,IIO_ADISLIB );/** * adis_init() - Initialize adis device structure
@@ -546,7 +546,7 @@ int adis_init(struct adis *adis, struct iio_dev *indio_dev,return 0 ; } -EXPORT_SYMBOL_GPL (adis_init); +EXPORT_SYMBOL_NS_GPL (adis_init,IIO_ADISLIB );MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>" );
drivers/iio/imu/adis16400.c +1 -0
@@ -1240,3 +1240,4 @@ module_spi_driver(adis16400_driver);MODULE_AUTHOR ("Manuel Stahl <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices ADIS16400/5 IMU SPI driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/iio/imu/adis16460.c +1 -0
@@ -428,3 +428,4 @@ module_spi_driver(adis16460_driver);MODULE_AUTHOR ("Dragos Bogdan <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices ADIS16460 IMU driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/iio/imu/adis16475.c +1 -0
@@ -1365,3 +1365,4 @@ module_spi_driver(adis16475_driver);MODULE_AUTHOR ("Nuno Sa <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices ADIS16475 IMU driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/iio/imu/adis16480.c +1 -0
@@ -1533,3 +1533,4 @@ module_spi_driver(adis16480_driver);MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices ADIS16480 IMU driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/iio/imu/adis_buffer.c +2 -2
@@ -124,7 +124,7 @@ int adis_update_scan_mode(struct iio_dev *indio_dev,return 0 ; } -EXPORT_SYMBOL_GPL (adis_update_scan_mode); +EXPORT_SYMBOL_NS_GPL (adis_update_scan_mode,IIO_ADISLIB );static irqreturn_t adis_trigger_handler (int irq,void *p) {
@@ -212,5 +212,5 @@ devm_adis_setup_buffer_and_trigger(struct adis *adis, struct iio_dev *indio_dev,return devm_add_action_or_reset (&adis->spi->dev, adis_buffer_cleanup, adis); } -EXPORT_SYMBOL_GPL (devm_adis_setup_buffer_and_trigger); +EXPORT_SYMBOL_NS_GPL (devm_adis_setup_buffer_and_trigger,IIO_ADISLIB );
drivers/iio/imu/adis_trigger.c +1 -1
@@ -87,5 +87,5 @@ int devm_adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)return devm_iio_trigger_register (&adis->spi->dev, adis->trig); } -EXPORT_SYMBOL_GPL (devm_adis_probe_trigger); +EXPORT_SYMBOL_NS_GPL (devm_adis_probe_trigger,IIO_ADISLIB );
drivers/staging/iio/accel/adis16203.c +1 -0
@@ -312,3 +312,4 @@ MODULE_AUTHOR("Barry Song <[email protected]>");MODULE_DESCRIPTION ("Analog Devices ADIS16203 Programmable 360 Degrees Inclinometer" );MODULE_LICENSE ("GPL v2" );MODULE_ALIAS ("spi:adis16203" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
drivers/staging/iio/accel/adis16240.c +1 -0
@@ -440,3 +440,4 @@ MODULE_AUTHOR("Barry Song <[email protected]>");MODULE_DESCRIPTION ("Analog Devices Programmable Impact Sensor and Recorder" );MODULE_LICENSE ("GPL v2" );MODULE_ALIAS ("spi:adis16240" ); +MODULE_IMPORT_NS (IIO_ADISLIB );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 9/16 iio:pressure:zpa2326: Move exports into IIO_ZPA2326 namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the bus specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/pressure/zpa2326.c | 12 ++++++------ drivers/iio/pressure/zpa2326_i2c.c | 1 + drivers/iio/pressure/zpa2326_spi.c | 1 + 3 files changed, 8 insertions(+), 6 deletions(-)
drivers/iio/pressure/zpa2326.c +6 -6
@@ -162,7 +162,7 @@ bool zpa2326_isreg_writeable(struct device *dev, unsigned int reg)return false; } } -EXPORT_SYMBOL_GPL (zpa2326_isreg_writeable); +EXPORT_SYMBOL_NS_GPL (zpa2326_isreg_writeable,IIO_ZPA2326 );bool zpa2326_isreg_readable (struct device *dev,unsigned int reg) {
@@ -191,7 +191,7 @@ bool zpa2326_isreg_readable(struct device *dev, unsigned int reg)return false; } } -EXPORT_SYMBOL_GPL (zpa2326_isreg_readable); +EXPORT_SYMBOL_NS_GPL (zpa2326_isreg_readable,IIO_ZPA2326 );bool zpa2326_isreg_precious (struct device *dev,unsigned int reg) {
@@ -204,7 +204,7 @@ bool zpa2326_isreg_precious(struct device *dev, unsigned int reg)return false; } } -EXPORT_SYMBOL_GPL (zpa2326_isreg_precious); +EXPORT_SYMBOL_NS_GPL (zpa2326_isreg_precious,IIO_ZPA2326 );/** * zpa2326_enable_device() - Enable device, i.e. get out of low power mode.
@@ -649,7 +649,7 @@ const struct dev_pm_ops zpa2326_pm_ops = {SET_RUNTIME_PM_OPS (zpa2326_runtime_suspend, zpa2326_runtime_resume, NULL) }; -EXPORT_SYMBOL_GPL (zpa2326_pm_ops); +EXPORT_SYMBOL_NS_GPL (zpa2326_pm_ops,IIO_ZPA2326 );/** * zpa2326_resume() - Request the PM layer to power supply the device.
@@ -1698,7 +1698,7 @@ int zpa2326_probe(struct device *parent,return err; } -EXPORT_SYMBOL_GPL (zpa2326_probe); +EXPORT_SYMBOL_NS_GPL (zpa2326_probe,IIO_ZPA2326 );void zpa2326_remove (const struct device *parent) {
@@ -1709,7 +1709,7 @@ void zpa2326_remove(const struct device *parent)zpa2326_sleep (indio_dev);zpa2326_power_off (indio_dev,iio_priv (indio_dev)); } -EXPORT_SYMBOL_GPL (zpa2326_remove); +EXPORT_SYMBOL_NS_GPL (zpa2326_remove,IIO_ZPA2326 );MODULE_AUTHOR ("Gregor Boirie <[email protected]>" );MODULE_DESCRIPTION ("Core driver for Murata ZPA2326 pressure sensor" );
drivers/iio/pressure/zpa2326_i2c.c +1 -0
@@ -87,3 +87,4 @@ module_i2c_driver(zpa2326_i2c_driver);MODULE_AUTHOR ("Gregor Boirie <[email protected]>" );MODULE_DESCRIPTION ("I2C driver for Murata ZPA2326 pressure sensor" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_ZPA2326 );
drivers/iio/pressure/zpa2326_spi.c +1 -0
@@ -91,3 +91,4 @@ module_spi_driver(zpa2326_spi_driver);MODULE_AUTHOR ("Gregor Boirie <[email protected]>" );MODULE_DESCRIPTION ("SPI driver for Murata ZPA2326 pressure sensor" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_ZPA2326 );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 10/16 iio:pressure:ms5611: Move exports into IIO_MS5611 namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the bus specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/pressure/ms5611_core.c | 4 ++-- drivers/iio/pressure/ms5611_i2c.c | 1 + drivers/iio/pressure/ms5611_spi.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)
drivers/iio/pressure/ms5611_core.c +2 -2
@@ -471,7 +471,7 @@ int ms5611_probe(struct iio_dev *indio_dev, struct device *dev,ms5611_fini (indio_dev);return ret; } -EXPORT_SYMBOL (ms5611_probe); +EXPORT_SYMBOL_NS (ms5611_probe,IIO_MS5611 );void ms5611_remove (struct iio_dev *indio_dev) {
@@ -479,7 +479,7 @@ void ms5611_remove(struct iio_dev *indio_dev)iio_triggered_buffer_cleanup (indio_dev);ms5611_fini (indio_dev); } -EXPORT_SYMBOL (ms5611_remove); +EXPORT_SYMBOL_NS (ms5611_remove,IIO_MS5611 );MODULE_AUTHOR ("Tomasz Duszynski <[email protected]>" );MODULE_DESCRIPTION ("MS5611 core driver" );
drivers/iio/pressure/ms5611_i2c.c +1 -0
@@ -140,3 +140,4 @@ module_i2c_driver(ms5611_driver);MODULE_AUTHOR ("Tomasz Duszynski <[email protected]>" );MODULE_DESCRIPTION ("MS5611 i2c driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_MS5611 );
drivers/iio/pressure/ms5611_spi.c +1 -0
@@ -142,3 +142,4 @@ module_spi_driver(ms5611_driver);MODULE_AUTHOR ("Tomasz Duszynski <[email protected]>" );MODULE_DESCRIPTION ("MS5611 spi driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_MS5611 );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 11/16 iio:pressure:mpl115: Move exports into IIO_MPL115 namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the bus specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/pressure/mpl115.c | 2 +- drivers/iio/pressure/mpl115_i2c.c | 1 + drivers/iio/pressure/mpl115_spi.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
drivers/iio/pressure/mpl115.c +1 -1
@@ -187,7 +187,7 @@ int mpl115_probe(struct device *dev, const char *name,return devm_iio_device_register (dev, indio_dev); } -EXPORT_SYMBOL_GPL (mpl115_probe); +EXPORT_SYMBOL_NS_GPL (mpl115_probe,IIO_MPL115 );MODULE_AUTHOR ("Peter Meerwald <[email protected]>" );MODULE_DESCRIPTION ("Freescale MPL115 pressure/temperature driver" );
drivers/iio/pressure/mpl115_i2c.c +1 -0
@@ -62,3 +62,4 @@ module_i2c_driver(mpl115_i2c_driver);MODULE_AUTHOR ("Peter Meerwald <[email protected]>" );MODULE_DESCRIPTION ("Freescale MPL115A2 pressure/temperature driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_MPL115 );
drivers/iio/pressure/mpl115_spi.c +1 -0
@@ -101,3 +101,4 @@ module_spi_driver(mpl115_spi_driver);MODULE_AUTHOR ("Akinobu Mita <[email protected]>" );MODULE_DESCRIPTION ("Freescale MPL115A1 pressure/temperature driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_MPL115 );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 12/16 iio:magnetometer:rm3100: Move exports to IIO_RM3100 namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the bus specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/magnetometer/rm3100-core.c | 8 ++++---- drivers/iio/magnetometer/rm3100-i2c.c | 1 + drivers/iio/magnetometer/rm3100-spi.c | 1 + 3 files changed, 6 insertions(+), 4 deletions(-)
drivers/iio/magnetometer/rm3100-core.c +4 -4
@@ -100,7 +100,7 @@ const struct regmap_access_table rm3100_readable_table = { .yes_ranges = rm3100_readable_ranges, .n_yes_ranges = ARRAY_SIZE(rm3100_readable_ranges), }; -EXPORT_SYMBOL_GPL (rm3100_readable_table); +EXPORT_SYMBOL_NS_GPL (rm3100_readable_table,IIO_RM3100 );static const struct regmap_range rm3100_writable_ranges[] = {regmap_reg_range (RM3100_W_REG_START ,RM3100_W_REG_END ),
@@ -110,7 +110,7 @@ const struct regmap_access_table rm3100_writable_table = { .yes_ranges = rm3100_writable_ranges, .n_yes_ranges = ARRAY_SIZE(rm3100_writable_ranges), }; -EXPORT_SYMBOL_GPL (rm3100_writable_table); +EXPORT_SYMBOL_NS_GPL (rm3100_writable_table,IIO_RM3100 );static const struct regmap_range rm3100_volatile_ranges[] = {regmap_reg_range (RM3100_V_REG_START ,RM3100_V_REG_END ),
@@ -120,7 +120,7 @@ const struct regmap_access_table rm3100_volatile_table = { .yes_ranges = rm3100_volatile_ranges, .n_yes_ranges = ARRAY_SIZE(rm3100_volatile_ranges), }; -EXPORT_SYMBOL_GPL (rm3100_volatile_table); +EXPORT_SYMBOL_NS_GPL (rm3100_volatile_table,IIO_RM3100 );static irqreturn_t rm3100_thread_fn (int irq,void *d) {
@@ -607,7 +607,7 @@ int rm3100_common_probe(struct device *dev, struct regmap *regmap, int irq)return devm_iio_device_register (dev, indio_dev); } -EXPORT_SYMBOL_GPL (rm3100_common_probe); +EXPORT_SYMBOL_NS_GPL (rm3100_common_probe,IIO_RM3100 );MODULE_AUTHOR ("Song Qiang <[email protected]>" );MODULE_DESCRIPTION ("PNI RM3100 3-axis magnetometer i2c driver" );
drivers/iio/magnetometer/rm3100-i2c.c +1 -0
@@ -52,3 +52,4 @@ module_i2c_driver(rm3100_driver);MODULE_AUTHOR ("Song Qiang <[email protected]>" );MODULE_DESCRIPTION ("PNI RM3100 3-axis magnetometer i2c driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_RM3100 );
drivers/iio/magnetometer/rm3100-spi.c +1 -0
@@ -62,3 +62,4 @@ module_spi_driver(rm3100_driver);MODULE_AUTHOR ("Song Qiang <[email protected]>" );MODULE_DESCRIPTION ("PNI RM3100 3-axis magnetometer spi driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_RM3100 );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 13/16 iio:magnetometer:bmc150: Move exports to IIO_BMC150_MAGN namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the bus specific device drivers that use them.
Note the MAGN postfix here is reflecting that this driver is only responsible for part of the BMC150 device.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/magnetometer/bmc150_magn.c | 8 ++++---- drivers/iio/magnetometer/bmc150_magn_i2c.c | 1 + drivers/iio/magnetometer/bmc150_magn_spi.c | 1 + 3 files changed, 6 insertions(+), 4 deletions(-)
drivers/iio/magnetometer/bmc150_magn.c +4 -4
@@ -226,7 +226,7 @@ const struct regmap_config bmc150_magn_regmap_config = { .writeable_reg = bmc150_magn_is_writeable_reg, .volatile_reg = bmc150_magn_is_volatile_reg, }; -EXPORT_SYMBOL (bmc150_magn_regmap_config); +EXPORT_SYMBOL_NS (bmc150_magn_regmap_config,IIO_BMC150_MAGN ); static int bmc150_magn_set_power_mode(struct bmc150_magn_data *data, enum bmc150_magn_power_modes mode,
@@ -982,7 +982,7 @@ int bmc150_magn_probe(struct device *dev, struct regmap *regmap,bmc150_magn_set_power_mode (data,BMC150_MAGN_POWER_MODE_SUSPEND , true);return ret; } -EXPORT_SYMBOL (bmc150_magn_probe); +EXPORT_SYMBOL_NS (bmc150_magn_probe,IIO_BMC150_MAGN );int bmc150_magn_remove (struct device *dev) {
@@ -1009,7 +1009,7 @@ int bmc150_magn_remove(struct device *dev)regulator_bulk_disable (ARRAY_SIZE (data->regulators), data->regulators);return 0 ; } -EXPORT_SYMBOL (bmc150_magn_remove); +EXPORT_SYMBOL_NS (bmc150_magn_remove,IIO_BMC150_MAGN );#ifdef CONFIG_PM static int bmc150_magn_runtime_suspend (struct device *dev)
@@ -1077,7 +1077,7 @@ const struct dev_pm_ops bmc150_magn_pm_ops = {SET_RUNTIME_PM_OPS (bmc150_magn_runtime_suspend, bmc150_magn_runtime_resume, NULL) }; -EXPORT_SYMBOL (bmc150_magn_pm_ops); +EXPORT_SYMBOL_NS (bmc150_magn_pm_ops,IIO_BMC150_MAGN );MODULE_AUTHOR ("Irina Tirdea <[email protected]>" );MODULE_LICENSE ("GPL v2" );
drivers/iio/magnetometer/bmc150_magn_i2c.c +1 -0
@@ -80,3 +80,4 @@ module_i2c_driver(bmc150_magn_driver);MODULE_AUTHOR ("Daniel Baluta <[email protected]" );MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("BMC150 I2C magnetometer driver" ); +MODULE_IMPORT_NS (IIO_BMC150_MAGN );
drivers/iio/magnetometer/bmc150_magn_spi.c +1 -0
@@ -66,3 +66,4 @@ module_spi_driver(bmc150_magn_spi_driver);MODULE_AUTHOR ("Daniel Baluta <[email protected]" );MODULE_DESCRIPTION ("BMC150 magnetometer SPI driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_BMC150_MAGN );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 14/16 iio:magnetometer:hmc5843: Move exports to IIO_HMC5843 namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the bus specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/magnetometer/hmc5843_core.c | 8 ++++---- drivers/iio/magnetometer/hmc5843_i2c.c | 1 + drivers/iio/magnetometer/hmc5843_spi.c | 1 + 3 files changed, 6 insertions(+), 4 deletions(-)
drivers/iio/magnetometer/hmc5843_core.c +4 -4
@@ -608,14 +608,14 @@ int hmc5843_common_suspend(struct device *dev)return hmc5843_set_mode (iio_priv (dev_get_drvdata (dev)),HMC5843_MODE_SLEEP ); } -EXPORT_SYMBOL (hmc5843_common_suspend); +EXPORT_SYMBOL_NS (hmc5843_common_suspend,IIO_HMC5843 );int hmc5843_common_resume (struct device *dev) {return hmc5843_set_mode (iio_priv (dev_get_drvdata (dev)),HMC5843_MODE_CONVERSION_CONTINUOUS ); } -EXPORT_SYMBOL (hmc5843_common_resume); +EXPORT_SYMBOL_NS (hmc5843_common_resume,IIO_HMC5843 );int hmc5843_common_probe (struct device *dev,struct regmap *regmap,enum hmc5843_ids id,const char *name)
@@ -669,7 +669,7 @@ int hmc5843_common_probe(struct device *dev, struct regmap *regmap,hmc5843_set_mode (iio_priv (indio_dev),HMC5843_MODE_SLEEP );return ret; } -EXPORT_SYMBOL (hmc5843_common_probe); +EXPORT_SYMBOL_NS (hmc5843_common_probe,IIO_HMC5843 );void hmc5843_common_remove (struct device *dev) {
@@ -681,7 +681,7 @@ void hmc5843_common_remove(struct device *dev)/* sleep mode to save power */ hmc5843_set_mode (iio_priv (indio_dev),HMC5843_MODE_SLEEP ); } -EXPORT_SYMBOL (hmc5843_common_remove); +EXPORT_SYMBOL_NS (hmc5843_common_remove,IIO_HMC5843 );MODULE_AUTHOR ("Shubhrajyoti Datta <[email protected]>" );MODULE_DESCRIPTION ("HMC5843/5883/5883L/5983 core driver" );
drivers/iio/magnetometer/hmc5843_i2c.c +1 -0
@@ -105,3 +105,4 @@ module_i2c_driver(hmc5843_driver);MODULE_AUTHOR ("Josef Gajdusek <[email protected]>" );MODULE_DESCRIPTION ("HMC5843/5883/5883L/5983 i2c driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HMC5843 );
drivers/iio/magnetometer/hmc5843_spi.c +1 -0
@@ -102,3 +102,4 @@ module_spi_driver(hmc5843_driver);MODULE_AUTHOR ("Josef Gajdusek <[email protected]>" );MODULE_DESCRIPTION ("HMC5983 SPI driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HMC5843 );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 15/16 iio:light:st_uvis25: Move exports to IIO_UVIS25 namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the bus specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/light/st_uvis25_core.c | 4 ++-- drivers/iio/light/st_uvis25_i2c.c | 1 + drivers/iio/light/st_uvis25_spi.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)
drivers/iio/light/st_uvis25_core.c +2 -2
@@ -323,7 +323,7 @@ int st_uvis25_probe(struct device *dev, int irq, struct regmap *regmap)return devm_iio_device_register (dev, iio_dev); } -EXPORT_SYMBOL (st_uvis25_probe); +EXPORT_SYMBOL_NS (st_uvis25_probe,IIO_UVIS25 );static int __maybe_unused st_uvis25_suspend (struct device *dev) {
@@ -349,7 +349,7 @@ static int __maybe_unused st_uvis25_resume(struct device *dev)const struct dev_pm_ops st_uvis25_pm_ops = {SET_SYSTEM_SLEEP_PM_OPS (st_uvis25_suspend, st_uvis25_resume) }; -EXPORT_SYMBOL (st_uvis25_pm_ops); +EXPORT_SYMBOL_NS (st_uvis25_pm_ops,IIO_UVIS25 );MODULE_AUTHOR ("Lorenzo Bianconi <[email protected]>" );MODULE_DESCRIPTION ("STMicroelectronics uvis25 sensor driver" );
drivers/iio/light/st_uvis25_i2c.c +1 -0
@@ -66,3 +66,4 @@ module_i2c_driver(st_uvis25_driver);MODULE_AUTHOR ("Lorenzo Bianconi <[email protected]>" );MODULE_DESCRIPTION ("STMicroelectronics uvis25 i2c driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_UVIS25 );
drivers/iio/light/st_uvis25_spi.c +1 -0
@@ -66,3 +66,4 @@ module_spi_driver(st_uvis25_driver);MODULE_AUTHOR ("Lorenzo Bianconi <[email protected]>" );MODULE_DESCRIPTION ("STMicroelectronics uvis25 spi driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_UVIS25 );
Signature · 1 line
2.35.1
Jonathan Cameron
maintainerPATCH 16/16 iio:chemical:bme680: Move exports to IIO_BME680 namespace
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the bus specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
--- drivers/iio/chemical/bme680_core.c | 4 ++-- drivers/iio/chemical/bme680_i2c.c | 1 + drivers/iio/chemical/bme680_spi.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)
drivers/iio/chemical/bme680_core.c +2 -2
@@ -81,7 +81,7 @@ const struct regmap_config bme680_regmap_config = { .volatile_table = &bme680_volatile_table, .cache_type = REGCACHE_RBTREE, }; -EXPORT_SYMBOL (bme680_regmap_config); +EXPORT_SYMBOL_NS (bme680_regmap_config,IIO_BME680 );static const struct iio_chan_spec bme680_channels[] = { {
@@ -957,7 +957,7 @@ int bme680_core_probe(struct device *dev, struct regmap *regmap,return devm_iio_device_register (dev, indio_dev); } -EXPORT_SYMBOL_GPL (bme680_core_probe); +EXPORT_SYMBOL_NS_GPL (bme680_core_probe,IIO_BME680 );MODULE_AUTHOR ("Himanshu Jha <[email protected]>" );MODULE_DESCRIPTION ("Bosch BME680 Driver" );
drivers/iio/chemical/bme680_i2c.c +1 -0
@@ -60,3 +60,4 @@ module_i2c_driver(bme680_i2c_driver);MODULE_AUTHOR ("Himanshu Jha <[email protected]>" );MODULE_DESCRIPTION ("BME680 I2C driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_BME680 );
drivers/iio/chemical/bme680_spi.c +1 -0
@@ -163,3 +163,4 @@ module_spi_driver(bme680_spi_driver);MODULE_AUTHOR ("Himanshu Jha <[email protected]>" );MODULE_DESCRIPTION ("Bosch BME680 SPI driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_BME680 );
Signature · 1 line
2.35.1
Quoted 28 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Whilst I'm still looking for additional review on the first set, I'll take the quiet as meaning no one objects and send out a second set. Note that I don't have anyone cc'd on some of these because I couldn't immediately figure out who was still active and familiar with the drivers. As these should be simple to review, please take a look at as many as you have time for!
Here's the reasoning as per the first set cover letter. Note that we have some clashes with patches that I'd like to clean up the handling of
dev_pm_opsand CONFIG_PM* guards so for now I've dropped those cases from this series.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.
Quoted 8 lines
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.
I briefly looked at the series and found no drastical issues (hope CI will find, if any), so
Quoted 99 lines
Cc Himanshu Jha <[email protected]>Cc Song Qiang <[email protected]>Cc Tomasz Duszynski <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Song Bao Hua (Barry Song) <[email protected]>Cc Paul Cercueil <[email protected]>Cc Alexandre Belloni <[email protected]>Cc William Markezana <[email protected]>Cc Ludovic Tancerel <[email protected]>Cc Renato Lui Geh <[email protected]>Cc Michael Hennerich <[email protected]>Jonathan Cameron (16):
iio:adc:ad_sigma_delta: Move exports intoIIO_AD_SIGMA_DELTAnamespace iio:adc:ad7091r: Move exports intoIIO_AD7091Rnamespace. iio:adc:ad76060: Move exports intoIIO_AD7606namespace. iio:common:meas-spec: Move exports intoIIO_MEAS_SPEC_SENSORSiio:common:ssp_sensors: Move exports intoIIO_SSP_SENSORSnamespace iio:dac:ad5592r: Move exports intoIIO_AD5592Rnamespace iio:dac:ad5686: Move exports intoIIO_AD5686namespace iio:imu:adis: Move exports intoIIO_ADISLIBnamespace iio:pressure:zpa2326: Move exports intoIIO_ZPA2326namespace iio:pressure:ms5611: Move exports intoIIO_MS5611namespace iio:pressure:mpl115: Move exports intoIIO_MPL115namespace iio:magnetometer:rm3100: Move exports toIIO_RM3100namespace iio:magnetometer:bmc150: Move exports toIIO_BMC150_MAGNnamespace iio:magnetometer:hmc5843: Move exports toIIO_HMC5843namespace iio:light:st_uvis25: Move exports toIIO_UVIS25namespace iio:chemical:bme680: Move exports toIIO_BME680namespacedrivers/iio/accel/adis16201.c | 1 + drivers/iio/accel/adis16209.c | 1 + drivers/iio/accel/ssp_accel_sensor.c | 1 + drivers/iio/adc/ad7091r-base.c | 4 ++-- drivers/iio/adc/ad7091r5.c | 1 + drivers/iio/adc/ad7124.c | 1 + drivers/iio/adc/ad7192.c | 1 + drivers/iio/adc/ad7606.c | 4 ++-- drivers/iio/adc/ad7606_par.c | 1 + drivers/iio/adc/ad7606_spi.c | 1 + drivers/iio/adc/ad7780.c | 1 + drivers/iio/adc/ad7791.c | 1 + drivers/iio/adc/ad7793.c | 1 + drivers/iio/adc/ad_sigma_delta.c | 20 ++++++++-------- drivers/iio/chemical/bme680_core.c | 4 ++-- drivers/iio/chemical/bme680_i2c.c | 1 + drivers/iio/chemical/bme680_spi.c | 1 + .../iio/common/ms_sensors/ms_sensors_i2c.c | 24 +++++++++---------- drivers/iio/common/ssp_sensors/ssp_dev.c | 10 ++++---- drivers/iio/common/ssp_sensors/ssp_iio.c | 7 +++--- drivers/iio/dac/ad5592r-base.c | 4 ++-- drivers/iio/dac/ad5592r.c | 1 + drivers/iio/dac/ad5593r.c | 1 + drivers/iio/dac/ad5686-spi.c | 1 + drivers/iio/dac/ad5686.c | 4 ++-- drivers/iio/dac/ad5696-i2c.c | 1 + drivers/iio/gyro/adis16136.c | 1 + drivers/iio/gyro/adis16260.c | 1 + drivers/iio/gyro/ssp_gyro_sensor.c | 1 + drivers/iio/humidity/htu21.c | 1 + drivers/iio/imu/adis.c | 20 ++++++++-------- drivers/iio/imu/adis16400.c | 1 + drivers/iio/imu/adis16460.c | 1 + drivers/iio/imu/adis16475.c | 1 + drivers/iio/imu/adis16480.c | 1 + drivers/iio/imu/adis_buffer.c | 4 ++-- drivers/iio/imu/adis_trigger.c | 2 +- drivers/iio/light/st_uvis25_core.c | 4 ++-- drivers/iio/light/st_uvis25_i2c.c | 1 + drivers/iio/light/st_uvis25_spi.c | 1 + drivers/iio/magnetometer/bmc150_magn.c | 8 +++---- drivers/iio/magnetometer/bmc150_magn_i2c.c | 1 + drivers/iio/magnetometer/bmc150_magn_spi.c | 1 + drivers/iio/magnetometer/hmc5843_core.c | 8 +++---- drivers/iio/magnetometer/hmc5843_i2c.c | 1 + drivers/iio/magnetometer/hmc5843_spi.c | 1 + drivers/iio/magnetometer/rm3100-core.c | 8 +++---- drivers/iio/magnetometer/rm3100-i2c.c | 1 + drivers/iio/magnetometer/rm3100-spi.c | 1 + drivers/iio/pressure/mpl115.c | 2 +- drivers/iio/pressure/mpl115_i2c.c | 1 + drivers/iio/pressure/mpl115_spi.c | 1 + drivers/iio/pressure/ms5611_core.c | 4 ++-- drivers/iio/pressure/ms5611_i2c.c | 1 + drivers/iio/pressure/ms5611_spi.c | 1 + drivers/iio/pressure/ms5637.c | 1 + drivers/iio/pressure/zpa2326.c | 12 +++++----- drivers/iio/pressure/zpa2326_i2c.c | 1 + drivers/iio/pressure/zpa2326_spi.c | 1 + drivers/iio/temperature/tsys01.c | 1 + drivers/iio/temperature/tsys02d.c | 1 + drivers/staging/iio/accel/adis16203.c | 1 + drivers/staging/iio/accel/adis16240.c | 1 + 63 files changed, 121 insertions(+), 76 deletions(-)--
2.35.1
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 9 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Whilst I'm still looking for additional review on the first set, I'll take the quiet as meaning no one objects and send out a second set. Note that I don't have anyone cc'd on some of these because I couldn't immediately figure out who was still active and familiar with the drivers. As these should be simple to review, please take a look at as many as you have time for!
I created a script [1] for myself with some heuristics which showed to work quite well for me.
[1]: https://github.com/andy-shev/home-bin-tools/blob/master/ge2maintainer.sh
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 02/16] iio:adc:ad7091r: Move exports into IIO_AD7091R namespace.
In reply to Jonathan CameronHi Jonathan,
Quoted 11 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the core/library functions into a specific namespace and import that into the various specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
An alternative here would be to conclude that we are unlikely to see support for the other ad7091r parts in the near future and just merge the two modules into one supporting just the i2c -5 variant.
Unlikely in the near future, yes. I wouldn't totally close the door but it's not in our short-term plans.
If you think it's better to merge the two modules into one in the meantime - fine with me.
Quoted 2 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Paul Cercueil <[email protected]>
Otherwise:
Cheers,
-Paul
Quoted 44 lines
--- drivers/iio/adc/ad7091r-base.c | 4 ++-- drivers/iio/adc/ad7091r5.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)drivers/iio/adc/ad7091r-base.c +1
-1@@ -260,7 +260,7 @@ int ad7091r_probe(struct device *dev, const char *name, return devm_iio_device_register(dev, iio_dev); } -EXPORT_SYMBOL_GPL (ad7091r_probe); +EXPORT_SYMBOL_NS_GPL (ad7091r_probe,IIO_AD7091R ); static bool ad7091r_writeable_reg(struct device *dev, unsigned intreg)
{drivers/iio/adc/ad7091r-base.c +1
-1@@ -290,7 +290,7 @@ const struct regmap_config ad7091r_regmap_config = { .writeable_reg = ad7091r_writeable_reg, .volatile_reg = ad7091r_volatile_reg, }; -EXPORT_SYMBOL_GPL (ad7091r_regmap_config); +EXPORT_SYMBOL_NS_GPL (ad7091r_regmap_config,IIO_AD7091R );MODULE_AUTHOR ("Beniamin Bia <[email protected]>" );MODULE_DESCRIPTION("Analog Devices AD7091Rx multi-channel
converters");drivers/iio/adc/ad7091r5.c +1
-1@@ -111,3 +111,4 @@ module_i2c_driver(ad7091r5_driver);MODULE_AUTHOR ("Beniamin Bia <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD7091R5 multi-channel ADC driver");MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD7091R ); --2.35.1
Re: [PATCH 06/16] iio:dac:ad5592r: Move exports into IIO_AD5592R namespace
In reply to Jonathan CameronQuoted 10 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
In order to avoid unnecessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the various specific device drivers that use them.
For more information see https://lwn.net/Articles/760045/
Signed-off-by Jonathan Cameron <[email protected]>Cc Paul Cercueil <[email protected]>
Cheers,
-Paul
Quoted 53 lines
--- drivers/iio/dac/ad5592r-base.c | 4 ++-- drivers/iio/dac/ad5592r.c | 1 + drivers/iio/dac/ad5593r.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)drivers/iio/dac/ad5592r-base.c +1
-1@@ -661,7 +661,7 @@ int ad5592r_probe(struct device *dev, const char *name, return ret; } -EXPORT_SYMBOL_GPL (ad5592r_probe); +EXPORT_SYMBOL_NS_GPL (ad5592r_probe,IIO_AD5592R );void ad5592r_remove (struct device *dev){
drivers/iio/dac/ad5592r-base.c +1
-1@@ -675,7 +675,7 @@ void ad5592r_remove(struct device *dev)if (st->reg)regulator_disable (st->reg); } -EXPORT_SYMBOL_GPL (ad5592r_remove); +EXPORT_SYMBOL_NS_GPL (ad5592r_remove,IIO_AD5592R );MODULE_AUTHOR ("Paul Cercueil <[email protected]>" ); MODULE_DESCRIPTION("Analog Devices AD5592R multi-channelconverters");
drivers/iio/dac/ad5592r.c +1
-0@@ -170,3 +170,4 @@ module_spi_driver(ad5592r_spi_driver);MODULE_AUTHOR ("Paul Cercueil <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD5592R multi-channel converters");MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD5592R );drivers/iio/dac/ad5593r.c +1
-1@@ -137,3 +137,4 @@ module_i2c_driver(ad5593r_driver);MODULE_AUTHOR ("Paul Cercueil <[email protected]>" );MODULE_DESCRIPTION ("Analog Devices AD5593R multi-channel converters");MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_AD5592R ); --2.35.1
Jonathan Cameron
maintainerQuoted 34 lines · On Mon, 31 Jan 2022 12:50:32 +0200 Andy Shevchenko <[email protected]>…
Quoted 33 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Whilst I'm still looking for additional review on the first set, I'll take the quiet as meaning no one objects and send out a second set. Note that I don't have anyone cc'd on some of these because I couldn't immediately figure out who was still active and familiar with the drivers. As these should be simple to review, please take a look at as many as you have time for!
Here's the reasoning as per the first set cover letter. Note that we have some clashes with patches that I'd like to clean up the handling of
dev_pm_opsand CONFIG_PM* guards so for now I've dropped those cases from this series.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.
Quoted 7 lines
Quoted 3 lines
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.
I briefly looked at the series and found no drastical issues (hope CI will find, if any), so
Reviewed-by Andy Shevchenko <[email protected]>
Thanks
Series applied to the togreg branch of iio.git and pushed out as testing to see if CI can find anything.
Thanks,
Jonathan
Quoted 102 lines
Quoted 100 lines
Cc Himanshu Jha <[email protected]>Cc Song Qiang <[email protected]>Cc Tomasz Duszynski <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Song Bao Hua (Barry Song) <[email protected]>Cc Paul Cercueil <[email protected]>Cc Alexandre Belloni <[email protected]>Cc William Markezana <[email protected]>Cc Ludovic Tancerel <[email protected]>Cc Renato Lui Geh <[email protected]>Cc Michael Hennerich <[email protected]>Jonathan Cameron (16):
iio:adc:ad_sigma_delta: Move exports intoIIO_AD_SIGMA_DELTAnamespace iio:adc:ad7091r: Move exports intoIIO_AD7091Rnamespace. iio:adc:ad76060: Move exports intoIIO_AD7606namespace. iio:common:meas-spec: Move exports intoIIO_MEAS_SPEC_SENSORSiio:common:ssp_sensors: Move exports intoIIO_SSP_SENSORSnamespace iio:dac:ad5592r: Move exports intoIIO_AD5592Rnamespace iio:dac:ad5686: Move exports intoIIO_AD5686namespace iio:imu:adis: Move exports intoIIO_ADISLIBnamespace iio:pressure:zpa2326: Move exports intoIIO_ZPA2326namespace iio:pressure:ms5611: Move exports intoIIO_MS5611namespace iio:pressure:mpl115: Move exports intoIIO_MPL115namespace iio:magnetometer:rm3100: Move exports toIIO_RM3100namespace iio:magnetometer:bmc150: Move exports toIIO_BMC150_MAGNnamespace iio:magnetometer:hmc5843: Move exports toIIO_HMC5843namespace iio:light:st_uvis25: Move exports toIIO_UVIS25namespace iio:chemical:bme680: Move exports toIIO_BME680namespacedrivers/iio/accel/adis16201.c | 1 + drivers/iio/accel/adis16209.c | 1 + drivers/iio/accel/ssp_accel_sensor.c | 1 + drivers/iio/adc/ad7091r-base.c | 4 ++-- drivers/iio/adc/ad7091r5.c | 1 + drivers/iio/adc/ad7124.c | 1 + drivers/iio/adc/ad7192.c | 1 + drivers/iio/adc/ad7606.c | 4 ++-- drivers/iio/adc/ad7606_par.c | 1 + drivers/iio/adc/ad7606_spi.c | 1 + drivers/iio/adc/ad7780.c | 1 + drivers/iio/adc/ad7791.c | 1 + drivers/iio/adc/ad7793.c | 1 + drivers/iio/adc/ad_sigma_delta.c | 20 ++++++++-------- drivers/iio/chemical/bme680_core.c | 4 ++-- drivers/iio/chemical/bme680_i2c.c | 1 + drivers/iio/chemical/bme680_spi.c | 1 + .../iio/common/ms_sensors/ms_sensors_i2c.c | 24 +++++++++---------- drivers/iio/common/ssp_sensors/ssp_dev.c | 10 ++++---- drivers/iio/common/ssp_sensors/ssp_iio.c | 7 +++--- drivers/iio/dac/ad5592r-base.c | 4 ++-- drivers/iio/dac/ad5592r.c | 1 + drivers/iio/dac/ad5593r.c | 1 + drivers/iio/dac/ad5686-spi.c | 1 + drivers/iio/dac/ad5686.c | 4 ++-- drivers/iio/dac/ad5696-i2c.c | 1 + drivers/iio/gyro/adis16136.c | 1 + drivers/iio/gyro/adis16260.c | 1 + drivers/iio/gyro/ssp_gyro_sensor.c | 1 + drivers/iio/humidity/htu21.c | 1 + drivers/iio/imu/adis.c | 20 ++++++++-------- drivers/iio/imu/adis16400.c | 1 + drivers/iio/imu/adis16460.c | 1 + drivers/iio/imu/adis16475.c | 1 + drivers/iio/imu/adis16480.c | 1 + drivers/iio/imu/adis_buffer.c | 4 ++-- drivers/iio/imu/adis_trigger.c | 2 +- drivers/iio/light/st_uvis25_core.c | 4 ++-- drivers/iio/light/st_uvis25_i2c.c | 1 + drivers/iio/light/st_uvis25_spi.c | 1 + drivers/iio/magnetometer/bmc150_magn.c | 8 +++---- drivers/iio/magnetometer/bmc150_magn_i2c.c | 1 + drivers/iio/magnetometer/bmc150_magn_spi.c | 1 + drivers/iio/magnetometer/hmc5843_core.c | 8 +++---- drivers/iio/magnetometer/hmc5843_i2c.c | 1 + drivers/iio/magnetometer/hmc5843_spi.c | 1 + drivers/iio/magnetometer/rm3100-core.c | 8 +++---- drivers/iio/magnetometer/rm3100-i2c.c | 1 + drivers/iio/magnetometer/rm3100-spi.c | 1 + drivers/iio/pressure/mpl115.c | 2 +- drivers/iio/pressure/mpl115_i2c.c | 1 + drivers/iio/pressure/mpl115_spi.c | 1 + drivers/iio/pressure/ms5611_core.c | 4 ++-- drivers/iio/pressure/ms5611_i2c.c | 1 + drivers/iio/pressure/ms5611_spi.c | 1 + drivers/iio/pressure/ms5637.c | 1 + drivers/iio/pressure/zpa2326.c | 12 +++++----- drivers/iio/pressure/zpa2326_i2c.c | 1 + drivers/iio/pressure/zpa2326_spi.c | 1 + drivers/iio/temperature/tsys01.c | 1 + drivers/iio/temperature/tsys02d.c | 1 + drivers/staging/iio/accel/adis16203.c | 1 + drivers/staging/iio/accel/adis16240.c | 1 + 63 files changed, 121 insertions(+), 76 deletions(-)--
2.35.1