iio: hid-sensors: lighten the exported symbols by introducing IIO_HID namespace
Subsystems (3)
PATCH 1/1 iio: hid-sensors: lighten the exported symbols by introducing IIO_HID namespace
A namespace for exported symbols makes clear who is a provider and who is a consumer of the certain resources. Besides that, it doesn't pollute the common namespace.
---
Jonothan et al. This is just a work against HID IIO sensor drivers, I think that entire IIO can gain from namespaces. But I leave it for you to decide and how to proceed / convert.
Yes, due to nature of this (kind of) change it may not be split.
drivers/iio/accel/hid-sensor-accel-3d.c | 1 + .../hid-sensors/hid-sensor-attributes.c | 26 +++++++++---------- .../common/hid-sensors/hid-sensor-trigger.c | 9 ++++--- drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 + drivers/iio/humidity/hid-sensor-humidity.c | 1 + drivers/iio/light/hid-sensor-als.c | 1 + drivers/iio/light/hid-sensor-prox.c | 1 + drivers/iio/magnetometer/hid-sensor-magn-3d.c | 1 + drivers/iio/orientation/hid-sensor-incl-3d.c | 1 + drivers/iio/orientation/hid-sensor-rotation.c | 1 + .../position/hid-sensor-custom-intel-hinge.c | 1 + drivers/iio/pressure/hid-sensor-press.c | 1 + .../iio/temperature/hid-sensor-temperature.c | 1 + 13 files changed, 29 insertions(+), 17 deletions(-)
drivers/iio/accel/hid-sensor-accel-3d.c +1 -0
@@ -465,3 +465,4 @@ module_platform_driver(hid_accel_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Accel 3D" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +13 -13
@@ -176,7 +176,7 @@ s32 hid_sensor_read_poll_value(struct hid_sensor_common *st)return value; } -EXPORT_SYMBOL (hid_sensor_read_poll_value); +EXPORT_SYMBOL_NS (hid_sensor_read_poll_value,IIO_HID_ATTRIBUTES );int hid_sensor_read_samp_freq_value (struct hid_sensor_common *st,int *val1,int *val2)
@@ -203,7 +203,7 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,return IIO_VAL_INT_PLUS_MICRO ; } -EXPORT_SYMBOL (hid_sensor_read_samp_freq_value); +EXPORT_SYMBOL_NS (hid_sensor_read_samp_freq_value,IIO_HID );int hid_sensor_write_samp_freq_value (struct hid_sensor_common *st,int val1,int val2)
@@ -238,7 +238,7 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,return 0 ; } -EXPORT_SYMBOL (hid_sensor_write_samp_freq_value); +EXPORT_SYMBOL_NS (hid_sensor_write_samp_freq_value,IIO_HID );int hid_sensor_read_raw_hyst_value (struct hid_sensor_common *st,int *val1,int *val2)
@@ -261,7 +261,7 @@ int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,return IIO_VAL_INT_PLUS_MICRO ; } -EXPORT_SYMBOL (hid_sensor_read_raw_hyst_value); +EXPORT_SYMBOL_NS (hid_sensor_read_raw_hyst_value,IIO_HID );int hid_sensor_read_raw_hyst_rel_value (struct hid_sensor_common *st,int *val1,int *val2)
@@ -283,7 +283,7 @@ int hid_sensor_read_raw_hyst_rel_value(struct hid_sensor_common *st, int *val1,return IIO_VAL_INT_PLUS_MICRO ; } -EXPORT_SYMBOL (hid_sensor_read_raw_hyst_rel_value); +EXPORT_SYMBOL_NS (hid_sensor_read_raw_hyst_rel_value,IIO_HID ); int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
@@ -315,7 +315,7 @@ int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,return 0 ; } -EXPORT_SYMBOL (hid_sensor_write_raw_hyst_value); +EXPORT_SYMBOL_NS (hid_sensor_write_raw_hyst_value,IIO_HID );int hid_sensor_write_raw_hyst_rel_value (struct hid_sensor_common *st,int val1,int val2)
@@ -346,7 +346,7 @@ int hid_sensor_write_raw_hyst_rel_value(struct hid_sensor_common *st,return 0 ; } -EXPORT_SYMBOL (hid_sensor_write_raw_hyst_rel_value); +EXPORT_SYMBOL_NS (hid_sensor_write_raw_hyst_rel_value,IIO_HID );/* * This fuction applies the unit exponent to the scale.
@@ -430,14 +430,14 @@ int hid_sensor_format_scale(u32 usage_id,return IIO_VAL_INT_PLUS_NANO ; } -EXPORT_SYMBOL (hid_sensor_format_scale); +EXPORT_SYMBOL_NS (hid_sensor_format_scale,IIO_HID );int64_t hid_sensor_convert_timestamp (struct hid_sensor_common *st,int64_t raw_value) {return st->timestamp_ns_scale * raw_value; } -EXPORT_SYMBOL (hid_sensor_convert_timestamp); +EXPORT_SYMBOL_NS (hid_sensor_convert_timestamp,IIO_HID ); static int hid_sensor_get_reporting_interval(struct hid_sensor_hub_device *hsdev,
@@ -484,7 +484,7 @@ int hid_sensor_get_report_latency(struct hid_sensor_common *st)return value; } -EXPORT_SYMBOL (hid_sensor_get_report_latency); +EXPORT_SYMBOL_NS (hid_sensor_get_report_latency,IIO_HID_ATTRIBUTES );int hid_sensor_set_report_latency (struct hid_sensor_common *st,int latency_ms) {
@@ -492,13 +492,13 @@ int hid_sensor_set_report_latency(struct hid_sensor_common *st, int latency_ms) st->report_latency.index, sizeof(latency_ms), &latency_ms); } -EXPORT_SYMBOL (hid_sensor_set_report_latency); +EXPORT_SYMBOL_NS (hid_sensor_set_report_latency,IIO_HID_ATTRIBUTES );bool hid_sensor_batch_mode_supported (struct hid_sensor_common *st) {return st->report_latency.index >0 && st->report_latency.report_id >0 ; } -EXPORT_SYMBOL (hid_sensor_batch_mode_supported); +EXPORT_SYMBOL_NS (hid_sensor_batch_mode_supported,IIO_HID_ATTRIBUTES ); int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev, u32 usage_id,
@@ -590,7 +590,7 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,return 0 ; } -EXPORT_SYMBOL (hid_sensor_parse_common_attributes); +EXPORT_SYMBOL_NS (hid_sensor_parse_common_attributes,IIO_HID );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_DESCRIPTION ("HID Sensor common attribute processing" );
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +5 -4
@@ -150,7 +150,7 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)return 0 ; } -EXPORT_SYMBOL (hid_sensor_power_state); +EXPORT_SYMBOL_NS (hid_sensor_power_state,IIO_HID );int hid_sensor_power_state (struct hid_sensor_common *st,bool state) {
@@ -225,7 +225,7 @@ void hid_sensor_remove_trigger(struct iio_dev *indio_dev,iio_trigger_free (attrb->trigger);iio_triggered_buffer_cleanup (indio_dev); } -EXPORT_SYMBOL (hid_sensor_remove_trigger); +EXPORT_SYMBOL_NS (hid_sensor_remove_trigger,IIO_HID );static const struct iio_trigger_ops hid_sensor_trigger_ops = { .set_trigger_state = &hid_sensor_data_rdy_trigger_set_state,
@@ -291,7 +291,7 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,iio_triggered_buffer_cleanup (indio_dev);return ret; } -EXPORT_SYMBOL (hid_sensor_setup_trigger); +EXPORT_SYMBOL_NS (hid_sensor_setup_trigger,IIO_HID );static int __maybe_unused hid_sensor_suspend (struct device *dev) {
@@ -321,8 +321,9 @@ const struct dev_pm_ops hid_sensor_pm_ops = {SET_RUNTIME_PM_OPS (hid_sensor_suspend, hid_sensor_runtime_resume, NULL) }; -EXPORT_SYMBOL (hid_sensor_pm_ops); +EXPORT_SYMBOL_NS (hid_sensor_pm_ops,IIO_HID );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_DESCRIPTION ("HID Sensor trigger processing" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID_ATTRIBUTES );
drivers/iio/gyro/hid-sensor-gyro-3d.c +1 -0
@@ -400,3 +400,4 @@ module_platform_driver(hid_gyro_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Gyroscope 3D" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/humidity/hid-sensor-humidity.c +1 -0
@@ -295,3 +295,4 @@ module_platform_driver(hid_humidity_platform_driver);MODULE_DESCRIPTION ("HID Environmental humidity sensor" );MODULE_AUTHOR ("Song Hongyan <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/light/hid-sensor-als.c +1 -0
@@ -392,3 +392,4 @@ module_platform_driver(hid_als_platform_driver);MODULE_DESCRIPTION ("HID Sensor ALS" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/light/hid-sensor-prox.c +1 -0
@@ -350,3 +350,4 @@ module_platform_driver(hid_prox_platform_driver);MODULE_DESCRIPTION ("HID Sensor Proximity" );MODULE_AUTHOR ("Archana Patni <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/magnetometer/hid-sensor-magn-3d.c +1 -0
@@ -587,3 +587,4 @@ module_platform_driver(hid_magn_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Magnetometer 3D" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/orientation/hid-sensor-incl-3d.c +1 -0
@@ -425,3 +425,4 @@ module_platform_driver(hid_incl_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Inclinometer 3D" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/orientation/hid-sensor-rotation.c +1 -0
@@ -373,3 +373,4 @@ module_platform_driver(hid_dev_rot_platform_driver);MODULE_DESCRIPTION ("HID Sensor Device Rotation" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/position/hid-sensor-custom-intel-hinge.c +1 -0
@@ -376,3 +376,4 @@ module_platform_driver(hid_hinge_platform_driver);MODULE_DESCRIPTION ("HID Sensor INTEL Hinge" );MODULE_AUTHOR ("Ye Xiang <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/pressure/hid-sensor-press.c +1 -0
@@ -357,3 +357,4 @@ module_platform_driver(hid_press_platform_driver);MODULE_DESCRIPTION ("HID Sensor Pressure" );MODULE_AUTHOR ("Archana Patni <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );
drivers/iio/temperature/hid-sensor-temperature.c +1 -0
@@ -291,3 +291,4 @@ module_platform_driver(hid_temperature_platform_driver);MODULE_DESCRIPTION ("HID Environmental temperature sensor" );MODULE_AUTHOR ("Song Hongyan <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_HID );
Signature · 1 line
2.30.2
Jonathan Cameron
maintainerQuoted 5 lines · On Tue, 25 May 2021 16:21:19 +0300 Andy Shevchenko…
A namespace for exported symbols makes clear who is a provider and who is a consumer of the certain resources. Besides that, it doesn't pollute the common namespace.
Signed-off-by Andy Shevchenko <[email protected]>
I'm fine with this, but looking for input from Srinivas and Jiri before I apply it.
Quoted 5 lines
---
Jonothan et al. This is just a work against HID IIO sensor drivers, I think that entire IIO can gain from namespaces. But I leave it for you to decide and how to proceed / convert.
It's been on the todo list since Jon Corbetts recent LWN article pointing out how underused this feature is which reminded me of it's existence.
I agree in principle with doing it, but that is going to be a rather big single shot patch. One for early in a cycle I think.
We have a lot of multi-module drivers as well where this might have benefits and would be a rather more contained change.
Jonathan
Quoted 277 lines
Yes, due to nature of this (kind of) change it may not be split.
drivers/iio/accel/hid-sensor-accel-3d.c | 1 + .../hid-sensors/hid-sensor-attributes.c | 26 +++++++++---------- .../common/hid-sensors/hid-sensor-trigger.c | 9 ++++--- drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 + drivers/iio/humidity/hid-sensor-humidity.c | 1 + drivers/iio/light/hid-sensor-als.c | 1 + drivers/iio/light/hid-sensor-prox.c | 1 + drivers/iio/magnetometer/hid-sensor-magn-3d.c | 1 + drivers/iio/orientation/hid-sensor-incl-3d.c | 1 + drivers/iio/orientation/hid-sensor-rotation.c | 1 + .../position/hid-sensor-custom-intel-hinge.c | 1 + drivers/iio/pressure/hid-sensor-press.c | 1 + .../iio/temperature/hid-sensor-temperature.c | 1 + 13 files changed, 29 insertions(+), 17 deletions(-)drivers/iio/accel/hid-sensor-accel-3d.c +1
-0@@ -465,3 +465,4 @@ module_platform_driver(hid_accel_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Accel 3D" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/common/hid-sensors/hid-sensor-attributes.c +13
-13@@ -176,7 +176,7 @@ s32 hid_sensor_read_poll_value(struct hid_sensor_common *st)return value; } -EXPORT_SYMBOL (hid_sensor_read_poll_value); +EXPORT_SYMBOL_NS (hid_sensor_read_poll_value,IIO_HID_ATTRIBUTES );int hid_sensor_read_samp_freq_value (struct hid_sensor_common *st,int *val1,int *val2)@@ -203,7 +203,7 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,return IIO_VAL_INT_PLUS_MICRO ; } -EXPORT_SYMBOL (hid_sensor_read_samp_freq_value); +EXPORT_SYMBOL_NS (hid_sensor_read_samp_freq_value,IIO_HID );int hid_sensor_write_samp_freq_value (struct hid_sensor_common *st,int val1,int val2)@@ -238,7 +238,7 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,return 0 ; } -EXPORT_SYMBOL (hid_sensor_write_samp_freq_value); +EXPORT_SYMBOL_NS (hid_sensor_write_samp_freq_value,IIO_HID );int hid_sensor_read_raw_hyst_value (struct hid_sensor_common *st,int *val1,int *val2)@@ -261,7 +261,7 @@ int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,return IIO_VAL_INT_PLUS_MICRO ; } -EXPORT_SYMBOL (hid_sensor_read_raw_hyst_value); +EXPORT_SYMBOL_NS (hid_sensor_read_raw_hyst_value,IIO_HID );int hid_sensor_read_raw_hyst_rel_value (struct hid_sensor_common *st,int *val1,int *val2)@@ -283,7 +283,7 @@ int hid_sensor_read_raw_hyst_rel_value(struct hid_sensor_common *st, int *val1,return IIO_VAL_INT_PLUS_MICRO ; } -EXPORT_SYMBOL (hid_sensor_read_raw_hyst_rel_value); +EXPORT_SYMBOL_NS (hid_sensor_read_raw_hyst_rel_value,IIO_HID ); int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,@@ -315,7 +315,7 @@ int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,return 0 ; } -EXPORT_SYMBOL (hid_sensor_write_raw_hyst_value); +EXPORT_SYMBOL_NS (hid_sensor_write_raw_hyst_value,IIO_HID );int hid_sensor_write_raw_hyst_rel_value (struct hid_sensor_common *st,int val1,int val2)@@ -346,7 +346,7 @@ int hid_sensor_write_raw_hyst_rel_value(struct hid_sensor_common *st,return 0 ; } -EXPORT_SYMBOL (hid_sensor_write_raw_hyst_rel_value); +EXPORT_SYMBOL_NS (hid_sensor_write_raw_hyst_rel_value,IIO_HID );/* * This fuction applies the unit exponent to the scale. @@ -430,14 +430,14 @@ int hid_sensor_format_scale(u32 usage_id,return IIO_VAL_INT_PLUS_NANO ; } -EXPORT_SYMBOL (hid_sensor_format_scale); +EXPORT_SYMBOL_NS (hid_sensor_format_scale,IIO_HID );int64_t hid_sensor_convert_timestamp (struct hid_sensor_common *st,int64_t raw_value) {return st->timestamp_ns_scale * raw_value; } -EXPORT_SYMBOL (hid_sensor_convert_timestamp); +EXPORT_SYMBOL_NS (hid_sensor_convert_timestamp,IIO_HID ); static int hid_sensor_get_reporting_interval(struct hid_sensor_hub_device *hsdev,@@ -484,7 +484,7 @@ int hid_sensor_get_report_latency(struct hid_sensor_common *st)return value; } -EXPORT_SYMBOL (hid_sensor_get_report_latency); +EXPORT_SYMBOL_NS (hid_sensor_get_report_latency,IIO_HID_ATTRIBUTES );int hid_sensor_set_report_latency (struct hid_sensor_common *st,int latency_ms) {@@ -492,13 +492,13 @@ int hid_sensor_set_report_latency(struct hid_sensor_common *st, int latency_ms) st->report_latency.index, sizeof(latency_ms), &latency_ms); } -EXPORT_SYMBOL (hid_sensor_set_report_latency); +EXPORT_SYMBOL_NS (hid_sensor_set_report_latency,IIO_HID_ATTRIBUTES );bool hid_sensor_batch_mode_supported (struct hid_sensor_common *st) {return st->report_latency.index >0 && st->report_latency.report_id >0 ; } -EXPORT_SYMBOL (hid_sensor_batch_mode_supported); +EXPORT_SYMBOL_NS (hid_sensor_batch_mode_supported,IIO_HID_ATTRIBUTES ); int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev, u32 usage_id,@@ -590,7 +590,7 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,return 0 ; } -EXPORT_SYMBOL (hid_sensor_parse_common_attributes); +EXPORT_SYMBOL_NS (hid_sensor_parse_common_attributes,IIO_HID );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_DESCRIPTION ("HID Sensor common attribute processing" );drivers/iio/common/hid-sensors/hid-sensor-trigger.c +5
-4@@ -150,7 +150,7 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)return 0 ; } -EXPORT_SYMBOL (hid_sensor_power_state); +EXPORT_SYMBOL_NS (hid_sensor_power_state,IIO_HID );int hid_sensor_power_state (struct hid_sensor_common *st,bool state) {@@ -225,7 +225,7 @@ void hid_sensor_remove_trigger(struct iio_dev *indio_dev,iio_trigger_free (attrb->trigger);iio_triggered_buffer_cleanup (indio_dev); } -EXPORT_SYMBOL (hid_sensor_remove_trigger); +EXPORT_SYMBOL_NS (hid_sensor_remove_trigger,IIO_HID );static const struct iio_trigger_ops hid_sensor_trigger_ops = { .set_trigger_state = &hid_sensor_data_rdy_trigger_set_state,@@ -291,7 +291,7 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,iio_triggered_buffer_cleanup (indio_dev);return ret; } -EXPORT_SYMBOL (hid_sensor_setup_trigger); +EXPORT_SYMBOL_NS (hid_sensor_setup_trigger,IIO_HID );static int __maybe_unused hid_sensor_suspend (struct device *dev) {@@ -321,8 +321,9 @@ const struct dev_pm_ops hid_sensor_pm_ops = {SET_RUNTIME_PM_OPS (hid_sensor_suspend, hid_sensor_runtime_resume, NULL) }; -EXPORT_SYMBOL (hid_sensor_pm_ops); +EXPORT_SYMBOL_NS (hid_sensor_pm_ops,IIO_HID );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_DESCRIPTION ("HID Sensor trigger processing" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID_ATTRIBUTES );drivers/iio/gyro/hid-sensor-gyro-3d.c +1
-0@@ -400,3 +400,4 @@ module_platform_driver(hid_gyro_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Gyroscope 3D" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/humidity/hid-sensor-humidity.c +1
-0@@ -295,3 +295,4 @@ module_platform_driver(hid_humidity_platform_driver);MODULE_DESCRIPTION ("HID Environmental humidity sensor" );MODULE_AUTHOR ("Song Hongyan <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/light/hid-sensor-als.c +1
-0@@ -392,3 +392,4 @@ module_platform_driver(hid_als_platform_driver);MODULE_DESCRIPTION ("HID Sensor ALS" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/light/hid-sensor-prox.c +1
-0@@ -350,3 +350,4 @@ module_platform_driver(hid_prox_platform_driver);MODULE_DESCRIPTION ("HID Sensor Proximity" );MODULE_AUTHOR ("Archana Patni <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/magnetometer/hid-sensor-magn-3d.c +1
-0@@ -587,3 +587,4 @@ module_platform_driver(hid_magn_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Magnetometer 3D" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/orientation/hid-sensor-incl-3d.c +1
-0@@ -425,3 +425,4 @@ module_platform_driver(hid_incl_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Inclinometer 3D" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/orientation/hid-sensor-rotation.c +1
-0@@ -373,3 +373,4 @@ module_platform_driver(hid_dev_rot_platform_driver);MODULE_DESCRIPTION ("HID Sensor Device Rotation" );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/position/hid-sensor-custom-intel-hinge.c +1
-0@@ -376,3 +376,4 @@ module_platform_driver(hid_hinge_platform_driver);MODULE_DESCRIPTION ("HID Sensor INTEL Hinge" );MODULE_AUTHOR ("Ye Xiang <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/pressure/hid-sensor-press.c +1
-0@@ -357,3 +357,4 @@ module_platform_driver(hid_press_platform_driver);MODULE_DESCRIPTION ("HID Sensor Pressure" );MODULE_AUTHOR ("Archana Patni <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/temperature/hid-sensor-temperature.c +1
-0@@ -291,3 +291,4 @@ module_platform_driver(hid_temperature_platform_driver);MODULE_DESCRIPTION ("HID Environmental temperature sensor" );MODULE_AUTHOR ("Song Hongyan <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_HID );
Srinivas Pandruvada
maintainerQuoted 9 lines · Jonathan Cameron
Quoted 6 lines · On Tue, 25 May 2021 16:21:19 +0300 Andy Shevchenko…
A namespace for exported symbols makes clear who is a provider and who is
a consumer of the certain resources. Besides that, it doesn't pollute
the common namespace.
Quoted 5 lines
Quoted 1 line
Signed-off-by Andy Shevchenko <[email protected]>I'm fine with this, but looking for input from Srinivas and Jiri before
I apply it.
I see these names are using "IIO_HID" and "IIO_HID_ATTRIBUTES". Since they are only used in hid-sensors, may be explicitly define "HID_SENSOR_IIO". Also prefer only one name space.
Thanks,
Srinivas
Quoted 355 lines
Quoted 8 lines
---
Jonothan et al. This is just a work against HID IIO sensor drivers, I think
that entire IIO can gain from namespaces. But I leave it for you to decide and
how to proceed / convert.It's been on the todo list since Jon Corbetts recent LWN article pointing out
how underused this feature is which reminded me of it's existence.I agree in principle with doing it, but that is going to be a rather big
single shot patch. One for early in a cycle I think.We have a lot of multi-module drivers as well where this might have benefits
and would be a rather more contained change.Jonathan
Quoted 332 lines
Yes, due to nature of this (kind of) change it may not be split.
drivers/iio/accel/hid-sensor-accel-3d.c | 1 + .../hid-sensors/hid-sensor-attributes.c | 26 +++++++++---- ------ .../common/hid-sensors/hid-sensor-trigger.c | 9 ++++--- drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 + drivers/iio/humidity/hid-sensor-humidity.c | 1 + drivers/iio/light/hid-sensor-als.c | 1 + drivers/iio/light/hid-sensor-prox.c | 1 + drivers/iio/magnetometer/hid-sensor-magn-3d.c | 1 + drivers/iio/orientation/hid-sensor-incl-3d.c | 1 + drivers/iio/orientation/hid-sensor-rotation.c | 1 + .../position/hid-sensor-custom-intel-hinge.c | 1 + drivers/iio/pressure/hid-sensor-press.c | 1 + .../iio/temperature/hid-sensor-temperature.c | 1 + 13 files changed, 29 insertions(+), 17 deletions(-)drivers/iio/accel/hid-sensor-accel-3d.c +0
-0@@ -465,3 +465,4 @@module_platform_driver (hid_accel_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Accel 3D" ); MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/accel/hid-sensor-accel-3d.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1@@ -176,7 +176,7 @@ s32 hid_sensor_read_poll_value(struct hid_sensor_common *st)return value; } -EXPORT_SYMBOL (hid_sensor_read_poll_value); +EXPORT_SYMBOL_NS (hid_sensor_read_poll_value,IIO_HID_ATTRIBUTES ); int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1int *val1, int *val2)@@ -203,7 +203,7 @@ int hid_sensor_read_samp_freq_value(structhid_sensor_common *st, return IIO_VAL_INT_PLUS_MICRO; } -EXPORT_SYMBOL (hid_sensor_read_samp_freq_value); +EXPORT_SYMBOL_NS (hid_sensor_read_samp_freq_value,IIO_HID ); int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1int val1, int val2)@@ -238,7 +238,7 @@ int hid_sensor_write_samp_freq_value(structhid_sensor_common *st, return 0; } -EXPORT_SYMBOL (hid_sensor_write_samp_freq_value); +EXPORT_SYMBOL_NS (hid_sensor_write_samp_freq_value,IIO_HID ); int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1int *val1, int *val2)@@ -261,7 +261,7 @@ int hid_sensor_read_raw_hyst_value(structhid_sensor_common *st, return IIO_VAL_INT_PLUS_MICRO; } -EXPORT_SYMBOL (hid_sensor_read_raw_hyst_value); +EXPORT_SYMBOL_NS (hid_sensor_read_raw_hyst_value,IIO_HID ); int hid_sensor_read_raw_hyst_rel_value(struct hid_sensor_common*st, int *val1,
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1int *val2)@@ -283,7 +283,7 @@ int hid_sensor_read_raw_hyst_rel_value(struct hid_sensor_common *st, int *val1, return IIO_VAL_INT_PLUS_MICRO; } -EXPORT_SYMBOL (hid_sensor_read_raw_hyst_rel_value); +EXPORT_SYMBOL_NS (hid_sensor_read_raw_hyst_rel_value,IIO_HID );int hid_sensor_write_raw_hyst_value(struct
hid_sensor_common*st,drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1@@ -315,7 +315,7 @@ int hid_sensor_write_raw_hyst_value(structhid_sensor_common *st, return 0; } -EXPORT_SYMBOL (hid_sensor_write_raw_hyst_value); +EXPORT_SYMBOL_NS (hid_sensor_write_raw_hyst_value,IIO_HID ); int hid_sensor_write_raw_hyst_rel_value(struct hid_sensor_common*st,
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1int val1, int val2)@@ -346,7 +346,7 @@ int hid_sensor_write_raw_hyst_rel_value(structhid_sensor_common *st, return 0; } -EXPORT_SYMBOL (hid_sensor_write_raw_hyst_rel_value); +EXPORT_SYMBOL_NS (hid_sensor_write_raw_hyst_rel_value,IIO_HID );/* * This fuction applies the unit exponent to the scale.
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +2
-2@@ -430,14 +430,14 @@ int hid_sensor_format_scale(u32 usage_id,return IIO_VAL_INT_PLUS_NANO ; } -EXPORT_SYMBOL (hid_sensor_format_scale); +EXPORT_SYMBOL_NS (hid_sensor_format_scale,IIO_HID );int64_t hid_sensor_convert_timestamp (struct hid_sensor_common *st,int64_t raw_value) {return st->timestamp_ns_scale * raw_value; } -EXPORT_SYMBOL (hid_sensor_convert_timestamp); +EXPORT_SYMBOL_NS (hid_sensor_convert_timestamp,IIO_HID );static int hid_sensor_get_reporting_interval(struct hid_sensor_hub_device*hsdev,
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1@@ -484,7 +484,7 @@ int hid_sensor_get_report_latency(struct hid_sensor_common *st)return value; } -EXPORT_SYMBOL (hid_sensor_get_report_latency); +EXPORT_SYMBOL_NS (hid_sensor_get_report_latency,IIO_HID_ATTRIBUTES );int hid_sensor_set_report_latency(struct
hid_sensor_common*st,
intlatency_ms)
{drivers/iio/common/hid-sensors/hid-sensor-attributes.c +2
-2@@ -492,13 +492,13 @@ int hid_sensor_set_report_latency(struct hid_sensor_common *st, int latency_ms) st->report_latency.index, sizeof(latency_ms), &latency_ms); } -EXPORT_SYMBOL (hid_sensor_set_report_latency); +EXPORT_SYMBOL_NS (hid_sensor_set_report_latency,IIO_HID_ATTRIBUTES );bool hid_sensor_batch_mode_supported (struct hid_sensor_common *st) {return st->report_latency.index >0 && st- >report_latency.report_id > 0; } -EXPORT_SYMBOL (hid_sensor_batch_mode_supported); +EXPORT_SYMBOL_NS(hid_sensor_batch_mode_supported,
IIO_HID_ATTRIBUTES);int hid_sensor_parse_common_attributes(struct
hid_sensor_hub_device*hsdev,drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1u32 usage_id,@@ -590,7 +590,7 @@ int hid_sensor_parse_common_attributes(structhid_sensor_hub_device *hsdev, return 0; } -EXPORT_SYMBOL (hid_sensor_parse_common_attributes); +EXPORT_SYMBOL_NS (hid_sensor_parse_common_attributes,IIO_HID ); MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
MODULE_DESCRIPTION("HID Sensor common attribute processing");drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1
-1@@ -150,7 +150,7 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state) return 0; } -EXPORT_SYMBOL (hid_sensor_power_state); +EXPORT_SYMBOL_NS (hid_sensor_power_state,IIO_HID ); int hid_sensor_power_state(struct hid_sensor_common *st, boolstate)
{drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1
-1@@ -225,7 +225,7 @@ void hid_sensor_remove_trigger(struct iio_dev *indio_dev,iio_trigger_free (attrb->trigger);iio_triggered_buffer_cleanup (indio_dev); } -EXPORT_SYMBOL (hid_sensor_remove_trigger); +EXPORT_SYMBOL_NS (hid_sensor_remove_trigger,IIO_HID );static const struct iio_trigger_ops hid_sensor_trigger_ops = {drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1
-1.set_trigger_state = &hid_sensor_data_rdy_trigger_set_state,@@ -291,7 +291,7 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,iio_triggered_buffer_cleanup (indio_dev);return ret; } -EXPORT_SYMBOL (hid_sensor_setup_trigger); +EXPORT_SYMBOL_NS (hid_sensor_setup_trigger,IIO_HID );static int __maybe_unused hid_sensor_suspend (struct device *dev){
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +2
-1@@ -321,8 +321,9 @@ const struct dev_pm_ops hid_sensor_pm_ops = {SET_RUNTIME_PM_OPS (hid_sensor_suspend, hid_sensor_runtime_resume, NULL) }; -EXPORT_SYMBOL (hid_sensor_pm_ops); +EXPORT_SYMBOL_NS (hid_sensor_pm_ops,IIO_HID );MODULE_AUTHOR ("Srinivas Pandruvada <[email protected]> " );MODULE_DESCRIPTION ("HID Sensor trigger processing" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID_ATTRIBUTES );drivers/iio/gyro/hid-sensor-gyro-3d.c +0
-0@@ -400,3 +400,4 @@module_platform_driver (hid_gyro_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Gyroscope 3D" ); MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/gyro/hid-sensor-gyro-3d.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/humidity/hid-sensor-humidity.c +1
-0@@ -295,3 +295,4 @@module_platform_driver (hid_humidity_platform_driver);MODULE_DESCRIPTION ("HID Environmental humidity sensor" );MODULE_AUTHOR ("Song Hongyan <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/light/hid-sensor-als.c +0
-0@@ -392,3 +392,4 @@module_platform_driver (hid_als_platform_driver);MODULE_DESCRIPTION ("HID Sensor ALS" ); MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/light/hid-sensor-als.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/light/hid-sensor-prox.c +1
-0@@ -350,3 +350,4 @@module_platform_driver (hid_prox_platform_driver);MODULE_DESCRIPTION ("HID Sensor Proximity" );MODULE_AUTHOR ("Archana Patni <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/magnetometer/hid-sensor-magn-3d.c +0
-0@@ -587,3 +587,4 @@module_platform_driver (hid_magn_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Magnetometer 3D" ); MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/magnetometer/hid-sensor-magn-3d.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/orientation/hid-sensor-incl-3d.c +0
-0@@ -425,3 +425,4 @@module_platform_driver (hid_incl_3d_platform_driver);MODULE_DESCRIPTION ("HID Sensor Inclinometer 3D" ); MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/orientation/hid-sensor-incl-3d.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/orientation/hid-sensor-rotation.c +0
-0@@ -373,3 +373,4 @@module_platform_driver (hid_dev_rot_platform_driver);MODULE_DESCRIPTION ("HID Sensor Device Rotation" ); MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/orientation/hid-sensor-rotation.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/position/hid-sensor-custom-intel-hinge.c +1
-0@@ -376,3 +376,4 @@module_platform_driver (hid_hinge_platform_driver);MODULE_DESCRIPTION ("HID Sensor INTEL Hinge" );MODULE_AUTHOR ("Ye Xiang <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/pressure/hid-sensor-press.c +1
-0@@ -357,3 +357,4 @@module_platform_driver (hid_press_platform_driver);MODULE_DESCRIPTION ("HID Sensor Pressure" );MODULE_AUTHOR ("Archana Patni <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (IIO_HID );drivers/iio/temperature/hid-sensor-temperature.c +1
-0@@ -291,3 +291,4 @@module_platform_driver (hid_temperature_platform_driver);MODULE_DESCRIPTION ("HID Environmental temperature sensor" );MODULE_AUTHOR ("Song Hongyan <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (IIO_HID );
A message that is not in the archive (sent off-list or not yet received): CAHp75Vc6Q7QrQE3k3DoLkkzkztBh_q5+Sf461+BduAKohU+b8w@mail.gmail.com
Quoted 22 lines · Andy Shevchenko
Quoted 18 lines · Srinivas Pandruvada
Quoted 16 lines · Jonathan Cameron
Quoted 9 lines · On Tue, 25 May 2021 16:21:19 +0300 Andy Shevchenko…
A namespace for exported symbols makes clear who is a provider and
who is
a consumer of the certain resources. Besides that, it doesn't pollute
the common namespace.Signed-off-by: Andy Shevchenko
<[email protected]>I'm fine with this, but looking for input from Srinivas and Jiri before
I apply it.
Quoted 7 lines
Quoted 3 lines
I see these names are using "
IIO_HID" and "IIO_HID_ATTRIBUTES". Since they are only used in hid-sensors, may be explicitly defineI think we need to stick with a provider name which is IIO subsystem, HID driver. That’s my logic behind.
OK
Quoted 8 lines
Quoted 3 lines
"
HID_SENSOR_IIO". Also prefer only one name space.It may not be one namespace IIUC, because same module has to request and provide it at the same time, moreover, two C modules are exporting something, I dunno how it’s supposed to work.
I am fine with the changes.
Thanks,
Srinivas
Quoted 386 lines
Quoted 383 lines
Thanks,
SrinivasQuoted 378 lines
Quoted 10 lines
---
Jonothan et al. This is just a work against HID IIO sensor drivers,
I think
that entire IIO can gain from namespaces. But I leave it for you to
decide and
how to proceed / convert.It's been on the todo list since Jon Corbetts recent LWN article pointing out
how underused this feature is which reminded me of it's existence.I agree in principle with doing it, but that is going to be a rather
big
single shot patch. One for early in a cycle I think.We have a lot of multi-module drivers as well where this might have benefits
and would be a rather more contained change.Jonathan
Quoted 352 lines
Yes, due to nature of this (kind of) change it may not be split.
drivers/iio/accel/hid-sensor-accel-3d.c | 1 + .../hid-sensors/hid-sensor-attributes.c | 26 +++++++++--- -
------
.../common/hid-sensors/hid-sensor-trigger.c | 9 ++++--- drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 + drivers/iio/humidity/hid-sensor-humidity.c | 1 + drivers/iio/light/hid-sensor-als.c | 1 + drivers/iio/light/hid-sensor-prox.c | 1 +drivers/iio/magnetometer/hid-sensor-magn-3d.c| 1 + drivers/iio/orientation/hid-sensor-incl-3d.c | 1 +drivers/iio/orientation/hid-sensor-rotation.c| 1 + .../position/hid-sensor-custom-intel-hinge.c | 1 + drivers/iio/pressure/hid-sensor-press.c | 1 + .../iio/temperature/hid-sensor-temperature.c | 1 +13 files changed, 29 insertions(+), 17 deletions(-)drivers/iio/accel/hid-sensor-accel-3d.c +0
-0@@ -465,3 +465,4 @@module_platform_driver (hid_accel_3d_platform_driver); MODULE_DESCRIPTION("HID Sensor Accel 3D");MODULE_AUTHOR("Srinivas Pandruvada
<[email protected]>
");
MODULE_LICENSE("GPL");drivers/iio/accel/hid-sensor-accel-3d.c +1
-0+MODULE_IMPORT_NS (IIO_HID );(quoted diff) +0
-0
attributes.cb/drivers/iio/common/hid-sensors/hid-sensor-attributes.cindexcb52b4fd6bf7..a81a0b206af6100644drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -176,7 +176,7 @@ s32 hid_sensor_read_poll_value(struct hid_sensor_common *st)
return value;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_read_poll_value); +EXPORT_SYMBOL_NS(hid_sensor_read_poll_value,
IIO_HID_ATTRIBUTES);
int hid_sensor_read_samp_freq_value(structhid_sensor_common*st,
int *val1, int *val2)drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -203,7 +203,7 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,
returnIIO_VAL_INT_PLUS_MICRO;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_read_samp_freq_value); +EXPORT_SYMBOL_NS (hid_sensor_read_samp_freq_value,IIO_HID );
int hid_sensor_write_samp_freq_value(structhid_sensor_common*st,
int val1, int val2)drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -238,7 +238,7 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
return 0;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_write_samp_freq_value); +EXPORT_SYMBOL_NS (hid_sensor_write_samp_freq_value,IIO_HID );
int hid_sensor_read_raw_hyst_value(structhid_sensor_common*st,
int *val1, int *val2)drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -261,7 +261,7 @@ int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,
returnIIO_VAL_INT_PLUS_MICRO;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_read_raw_hyst_value); +EXPORT_SYMBOL_NS (hid_sensor_read_raw_hyst_value,IIO_HID );
int hid_sensor_read_raw_hyst_rel_value(structhid_sensor_common*st, int *val1,
int *val2)drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -283,7 +283,7 @@ int hid_sensor_read_raw_hyst_rel_value(struct hid_sensor_common *st, int *val1,
returnIIO_VAL_INT_PLUS_MICRO;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_read_raw_hyst_rel_value); +EXPORT_SYMBOL_NS (hid_sensor_read_raw_hyst_rel_value,IIO_HID );
int hid_sensor_write_raw_hyst_value(structhid_sensor_common*st,drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -315,7 +315,7 @@ int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
return 0;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_write_raw_hyst_value); +EXPORT_SYMBOL_NS (hid_sensor_write_raw_hyst_value,IIO_HID );
int hid_sensor_write_raw_hyst_rel_value(structhid_sensor_common
*st,
int val1, int val2)drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -346,7 +346,7 @@ inthid_sensor_write_raw_hyst_rel_value(struct
hid_sensor_common*st,
return 0;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_write_raw_hyst_rel_value); +EXPORT_SYMBOL_NS (hid_sensor_write_raw_hyst_rel_value,IIO_HID );
/*
* This fuction applies the unit exponent to the scale.drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -430,14 +430,14 @@ int hid_sensor_format_scale(u32 usage_id,
returnIIO_VAL_INT_PLUS_NANO;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_format_scale); +EXPORT_SYMBOL_NS (hid_sensor_format_scale,IIO_HID );
int64_thid_sensor_convert_timestamp(structhid_sensor_common*st,
int64_traw_value) {
returnst->timestamp_ns_scale*raw_value;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_convert_timestamp); +EXPORT_SYMBOL_NS (hid_sensor_convert_timestamp,IIO_HID );
static
int hid_sensor_get_reporting_interval(structhid_sensor_hub_device
*hsdev,drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -484,7 +484,7 @@ int hid_sensor_get_report_latency(struct hid_sensor_common *st)
return value;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_get_report_latency); +EXPORT_SYMBOL_NS(hid_sensor_get_report_latency,
IIO_HID_ATTRIBUTES);
inthid_sensor_set_report_latency(struct hid_sensor_common *st, int latency_ms)
{drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1@@ -492,13 +492,13 @@ int hid_sensor_set_report_latency(struct hid_sensor_common *st, int latency_ms) st->report_latency.index, sizeof(latency_ms), &latency_ms); } -EXPORT_SYMBOL (hid_sensor_set_report_latency); +EXPORT_SYMBOL_NS (hid_sensor_set_report_latency,IIO_HID_ATTRIBUTES );
boolhid_sensor_batch_mode_supported(struct hid_sensor_common *st)
{
returnst->report_latency.index> 0 && st-Quoted 1 line
report_latency.report_id > 0;
}
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_batch_mode_supported); +EXPORT_SYMBOL_NS(hid_sensor_batch_mode_supported,
IIO_HID_ATTRIBUTES);
int hid_sensor_parse_common_attributes(structhid_sensor_hub_device*hsdev,
u32usage_id,drivers/iio/common/hid-sensors/hid-sensor-attributes.c +0
-0@@ -590,7 +590,7 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
return 0;
}drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1
-1-EXPORT_SYMBOL (hid_sensor_parse_common_attributes); +EXPORT_SYMBOL_NS (hid_sensor_parse_common_attributes,IIO_HID );
MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>
");
MODULE_DESCRIPTION("HID Sensor common attribute processing");drivers/iio/common/hid-sensors/hid-sensor-trigger.c +0
-0@@ -150,7 +150,7 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
return 0;
}drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1
-1-EXPORT_SYMBOL (hid_sensor_power_state); +EXPORT_SYMBOL_NS (hid_sensor_power_state,IIO_HID );
inthid_sensor_power_state(struct hid_sensor_common *st, bool state)
{drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1
-1@@ -225,7 +225,7 @@ void hid_sensor_remove_trigger(struct iio_dev *indio_dev, iio_trigger_free(attrb->trigger); iio_triggered_buffer_cleanup(indio_dev); } -EXPORT_SYMBOL (hid_sensor_remove_trigger); +EXPORT_SYMBOL_NS (hid_sensor_remove_trigger,IIO_HID );
static const structiio_trigger_opshid_sensor_trigger_ops= { .set_trigger_state =&hid_sensor_data_rdy_trigger_set_state,drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1
-1@@ -291,7 +291,7 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, iio_triggered_buffer_cleanup(indio_dev); return ret; } -EXPORT_SYMBOL (hid_sensor_setup_trigger); +EXPORT_SYMBOL_NS (hid_sensor_setup_trigger,IIO_HID );
static int__maybe_unusedhid_sensor_suspend(struct device *dev)
{drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1
-1@@ -321,8 +321,9 @@ const struct dev_pm_ops hid_sensor_pm_ops = { SET_RUNTIME_PM_OPS(hid_sensor_suspend, hid_sensor_runtime_resume, NULL) }; -EXPORT_SYMBOL (hid_sensor_pm_ops); +EXPORT_SYMBOL_NS (hid_sensor_pm_ops,IIO_HID );
MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>
");
MODULE_DESCRIPTION("HID Sensor trigger processing");MODULE_LICENSE("GPL");drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1
-0+MODULE_IMPORT_NS (IIO_HID_ATTRIBUTES );drivers/iio/gyro/hid-sensor-gyro-3d.c +0
-0@@ -400,3 +400,4 @@module_platform_driver (hid_gyro_3d_platform_driver); MODULE_DESCRIPTION("HID Sensor Gyroscope 3D");MODULE_AUTHOR("Srinivas Pandruvada
<[email protected]>
");
MODULE_LICENSE("GPL");drivers/iio/gyro/hid-sensor-gyro-3d.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/humidity/hid-sensor-humidity.c +0
-0@@ -295,3 +295,4 @@module_platform_driver (hid_humidity_platform_driver); MODULE_DESCRIPTION("HID Environmental humidity sensor"); MODULE_AUTHOR("Song Hongyan <[email protected]>");
MODULE_LICENSE("GPL v2");drivers/iio/humidity/hid-sensor-humidity.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/light/hid-sensor-als.c +0
-0@@ -392,3 +392,4 @@module_platform_driver (hid_als_platform_driver); MODULE_DESCRIPTION("HID Sensor ALS");MODULE_AUTHOR("Srinivas Pandruvada
<[email protected]>
");
MODULE_LICENSE("GPL");drivers/iio/light/hid-sensor-als.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/light/hid-sensor-prox.c +0
-0@@ -350,3 +350,4 @@module_platform_driver (hid_prox_platform_driver); MODULE_DESCRIPTION("HID Sensor Proximity"); MODULE_AUTHOR("Archana Patni <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/light/hid-sensor-prox.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/magnetometer/hid-sensor-magn-3d.c +0
-0@@ -587,3 +587,4 @@module_platform_driver (hid_magn_3d_platform_driver); MODULE_DESCRIPTION("HID Sensor Magnetometer 3D");MODULE_AUTHOR("Srinivas Pandruvada
<[email protected]>
");
MODULE_LICENSE("GPL");drivers/iio/magnetometer/hid-sensor-magn-3d.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/orientation/hid-sensor-incl-3d.c +0
-0@@ -425,3 +425,4 @@module_platform_driver (hid_incl_3d_platform_driver); MODULE_DESCRIPTION("HID Sensor Inclinometer 3D");MODULE_AUTHOR("Srinivas Pandruvada <
[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/orientation/hid-sensor-incl-3d.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/orientation/hid-sensor-rotation.c +0
-0@@ -373,3 +373,4 @@module_platform_driver (hid_dev_rot_platform_driver); MODULE_DESCRIPTION("HID Sensor Device Rotation");MODULE_AUTHOR("Srinivas Pandruvada <
[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/orientation/hid-sensor-rotation.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/position/hid-sensor-custom-intel-hinge.c +0
-0@@ -376,3 +376,4 @@module_platform_driver (hid_hinge_platform_driver); MODULE_DESCRIPTION("HID Sensor INTEL Hinge"); MODULE_AUTHOR("Ye Xiang <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/position/hid-sensor-custom-intel-hinge.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/pressure/hid-sensor-press.c +0
-0@@ -357,3 +357,4 @@module_platform_driver (hid_press_platform_driver); MODULE_DESCRIPTION("HID Sensor Pressure"); MODULE_AUTHOR("Archana Patni <[email protected]>");
MODULE_LICENSE("GPL");drivers/iio/pressure/hid-sensor-press.c +1
-0+MODULE_IMPORT_NS (IIO_HID );drivers/iio/temperature/hid-sensor-temperature.c +0
-0@@ -291,3 +291,4 @@module_platform_driver (hid_temperature_platform_driver); MODULE_DESCRIPTION("HID Environmental temperature sensor"); MODULE_AUTHOR("Song Hongyan <[email protected]>");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS(IIO_HID);