Add export symbol namespace PL_CHROMEOS
Subsystems (19)
cover Add export symbol namespace PL_CHROMEOS
Add a symbol namespace for functions exported by the plaform chromeos subsystem.
Add depenencies for all drivers using these function.
'make nsdeps' is used to fix the dependencies.
Gwendal Grignou (17):
plaform: chrome: Add PL_CHROMEOS export symbol namespace iio:cros_ec_sensors: Add PL_CHROMEOS dependency platform/chrome: Add PL_CHROMEOS dependency
power_supply: chromeos: Add PL_CHROMEOS dependency
rtc: wilco: Add PL_CHROMEOS dependency
mfd: cros_ec_dev: Add PL_CHROMEOS dependency
platform: chrome: Add PL_CHROMEOS dependency
rtc: cros_ec: Add PL_CHROMEOS dependency
extcon: cros_ec: Add PL_CHROMEOS dependency
HID: google: Add PL_CHROMEOS dependency
i2c: cros-ec-tunnel: Add PL_CHROMEOS dependency
Input: cros_ec_keyb - Add PL_CHROMEOS dependency
media: cros-ec-cec: Add PL_CHROMEOS dependency
power: supply: PCHG: Add PL_CHROMEOS dependency
pwm: cros-ec: Add PL_CHROMEOS dependency
regulator: cros-ec-regulator: Add PL_CHROMEOS dependency
ASoC: cros_ec_codec: Add PL_CHROMEOS dependency
drivers/extcon/extcon-usbc-cros-ec.c | 1 + drivers/hid/hid-google-hammer.c | 1 + drivers/i2c/busses/i2c-cros-ec-tunnel.c | 1 + .../cros_ec_sensors/cros_ec_sensors_core.c | 1 + drivers/iio/proximity/cros_ec_mkbp_proximity.c | 1 + drivers/input/keyboard/cros_ec_keyb.c | 1 + .../media/cec/platform/cros-ec/cros-ec-cec.c | 1 + drivers/mfd/cros_ec_dev.c | 1 + drivers/platform/chrome/cros_ec.c | 1 + drivers/platform/chrome/cros_ec_chardev.c | 1 + drivers/platform/chrome/cros_ec_debugfs.c | 1 + drivers/platform/chrome/cros_ec_i2c.c | 1 + drivers/platform/chrome/cros_ec_ishtp.c | 1 + drivers/platform/chrome/cros_ec_lightbar.c | 1 + drivers/platform/chrome/cros_ec_lpc.c | 1 + drivers/platform/chrome/cros_ec_proto.c | 18 +++++++++--------- drivers/platform/chrome/cros_ec_rpmsg.c | 1 + drivers/platform/chrome/cros_ec_sensorhub.c | 1 + .../platform/chrome/cros_ec_sensorhub_ring.c | 4 ++-- drivers/platform/chrome/cros_ec_spi.c | 1 + drivers/platform/chrome/cros_ec_sysfs.c | 1 + drivers/platform/chrome/cros_ec_typec.c | 1 + drivers/platform/chrome/cros_ec_vbc.c | 1 + drivers/platform/chrome/cros_usbpd_logger.c | 1 + drivers/platform/chrome/cros_usbpd_notify.c | 5 +++-- drivers/platform/chrome/wilco_ec/debugfs.c | 1 + drivers/platform/chrome/wilco_ec/mailbox.c | 2 +- drivers/platform/chrome/wilco_ec/properties.c | 8 ++++---- drivers/platform/chrome/wilco_ec/telemetry.c | 1 + drivers/power/supply/cros_peripheral_charger.c | 1 + drivers/power/supply/cros_usbpd-charger.c | 1 + drivers/power/supply/wilco-charger.c | 1 + drivers/pwm/pwm-cros-ec.c | 1 + drivers/regulator/cros-ec-regulator.c | 1 + drivers/rtc/rtc-cros-ec.c | 1 + drivers/rtc/rtc-wilco-ec.c | 1 + sound/soc/codecs/cros_ec_codec.c | 1 + 37 files changed, 51 insertions(+), 18 deletions(-)
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 1/17 plaform: chrome: Add PL_CHROMEOS export symbol namespace
Add PL_CHROMEOS to hold functions exposed by the platform chromeos subsystem:
for i in EXPORT_SYMBOL_GPL EXPORT_SYMBOL; do
sed -i "s/$i(\([^)]*\)/$i_NS(\1, PL_CHROMEOS/"
$(grep -lr $i drivers/platform/chrome/)
done
--- drivers/platform/chrome/cros_ec_proto.c | 18 +++++++++--------- .../platform/chrome/cros_ec_sensorhub_ring.c | 4 ++-- drivers/platform/chrome/cros_usbpd_notify.c | 4 ++-- drivers/platform/chrome/wilco_ec/mailbox.c | 2 +- drivers/platform/chrome/wilco_ec/properties.c | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-)
drivers/platform/chrome/cros_ec_proto.c +9 -9
@@ -189,7 +189,7 @@ int cros_ec_prepare_tx(struct cros_ec_device *ec_dev,return EC_MSG_TX_PROTO_BYTES + msg->outsize; } -EXPORT_SYMBOL (cros_ec_prepare_tx); +EXPORT_SYMBOL_NS (cros_ec_prepare_tx,PL_CHROMEOS );/** * cros_ec_check_result() - Check ec_msg->result.
@@ -217,7 +217,7 @@ int cros_ec_check_result(struct cros_ec_device *ec_dev,return 0 ; } } -EXPORT_SYMBOL (cros_ec_check_result); +EXPORT_SYMBOL_NS (cros_ec_check_result,PL_CHROMEOS );/* * cros_ec_get_host_event_wake_mask
@@ -557,7 +557,7 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev)kfree (proto_msg);return ret; } -EXPORT_SYMBOL (cros_ec_query_all); +EXPORT_SYMBOL_NS (cros_ec_query_all,PL_CHROMEOS );/** * cros_ec_cmd_xfer_status() - Send a command to the ChromeOS EC.
@@ -625,7 +625,7 @@ int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,return ret; } -EXPORT_SYMBOL (cros_ec_cmd_xfer_status); +EXPORT_SYMBOL_NS (cros_ec_cmd_xfer_status,PL_CHROMEOS ); static int get_next_event_xfer(struct cros_ec_device *ec_dev, struct cros_ec_command *msg,
@@ -767,7 +767,7 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev,return ret; } -EXPORT_SYMBOL (cros_ec_get_next_event); +EXPORT_SYMBOL_NS (cros_ec_get_next_event,PL_CHROMEOS );/** * cros_ec_get_host_event() - Return a mask of event set by the ChromeOS EC.
@@ -797,7 +797,7 @@ u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev)return host_event; } -EXPORT_SYMBOL (cros_ec_get_host_event); +EXPORT_SYMBOL_NS (cros_ec_get_host_event,PL_CHROMEOS );/** * cros_ec_check_features() - Test for the presence of EC features
@@ -830,7 +830,7 @@ bool cros_ec_check_features(struct cros_ec_dev *ec, int feature)return !!(features->flags[feature /32 ] &EC_FEATURE_MASK_0 (feature)); } -EXPORT_SYMBOL_GPL (cros_ec_check_features); +EXPORT_SYMBOL_NS_GPL (cros_ec_check_features,PL_CHROMEOS );/** * cros_ec_get_sensor_count() - Return the number of MEMS sensors supported.
@@ -896,7 +896,7 @@ int cros_ec_get_sensor_count(struct cros_ec_dev *ec) }return sensor_count; } -EXPORT_SYMBOL_GPL (cros_ec_get_sensor_count); +EXPORT_SYMBOL_NS_GPL (cros_ec_get_sensor_count,PL_CHROMEOS );/** * cros_ec_command - Send a command to the EC.
@@ -944,4 +944,4 @@ int cros_ec_command(struct cros_ec_device *ec_dev,kfree (msg);return ret; } -EXPORT_SYMBOL_GPL (cros_ec_command); +EXPORT_SYMBOL_NS_GPL (cros_ec_command,PL_CHROMEOS );
drivers/platform/chrome/cros_ec_sensorhub_ring.c +2 -2
@@ -86,7 +86,7 @@ int cros_ec_sensorhub_register_push_data(struct cros_ec_sensorhub *sensorhub,return 0 ; } -EXPORT_SYMBOL_GPL (cros_ec_sensorhub_register_push_data); +EXPORT_SYMBOL_NS_GPL (cros_ec_sensorhub_register_push_data,PL_CHROMEOS );void cros_ec_sensorhub_unregister_push_data (struct cros_ec_sensorhub *sensorhub,u8 sensor_num)
@@ -94,7 +94,7 @@ void cros_ec_sensorhub_unregister_push_data(struct cros_ec_sensorhub *sensorhub, sensorhub->push_data[sensor_num].indio_dev =NULL ; sensorhub->push_data[sensor_num].push_data_cb =NULL ; } -EXPORT_SYMBOL_GPL (cros_ec_sensorhub_unregister_push_data); +EXPORT_SYMBOL_NS_GPL (cros_ec_sensorhub_unregister_push_data,PL_CHROMEOS );/** * cros_ec_sensorhub_ring_fifo_enable() - Enable or disable interrupt generation
drivers/platform/chrome/cros_usbpd_notify.c +2 -2
@@ -38,7 +38,7 @@ int cros_usbpd_register_notify(struct notifier_block *nb)return blocking_notifier_chain_register (&cros_usbpd_notifier_list, nb); } -EXPORT_SYMBOL_GPL (cros_usbpd_register_notify); +EXPORT_SYMBOL_NS_GPL (cros_usbpd_register_notify,PL_CHROMEOS );/** * cros_usbpd_unregister_notify - Unregister notifier callback for PD events.
@@ -51,7 +51,7 @@ void cros_usbpd_unregister_notify(struct notifier_block *nb) {blocking_notifier_chain_unregister (&cros_usbpd_notifier_list, nb); } -EXPORT_SYMBOL_GPL (cros_usbpd_unregister_notify); +EXPORT_SYMBOL_NS_GPL (cros_usbpd_unregister_notify,PL_CHROMEOS );static void cros_usbpd_get_event_and_notify (struct device *dev,struct cros_ec_device *ec_dev)
drivers/platform/chrome/wilco_ec/mailbox.c +1 -1
@@ -212,4 +212,4 @@ int wilco_ec_mailbox(struct wilco_ec_device *ec, struct wilco_ec_message *msg)return ret; } -EXPORT_SYMBOL_GPL (wilco_ec_mailbox); +EXPORT_SYMBOL_NS_GPL (wilco_ec_mailbox,PL_CHROMEOS );
drivers/platform/chrome/wilco_ec/properties.c +4 -4
@@ -76,7 +76,7 @@ int wilco_ec_get_property(struct wilco_ec_device *ec,return 0 ; } -EXPORT_SYMBOL_GPL (wilco_ec_get_property); +EXPORT_SYMBOL_NS_GPL (wilco_ec_get_property,PL_CHROMEOS );int wilco_ec_set_property (struct wilco_ec_device *ec,struct wilco_ec_property_msg *prop_msg)
@@ -99,7 +99,7 @@ int wilco_ec_set_property(struct wilco_ec_device *ec,return 0 ; } -EXPORT_SYMBOL_GPL (wilco_ec_set_property); +EXPORT_SYMBOL_NS_GPL (wilco_ec_set_property,PL_CHROMEOS );int wilco_ec_get_byte_property (struct wilco_ec_device *ec,u32 property_id,u8 *val)
@@ -119,7 +119,7 @@ int wilco_ec_get_byte_property(struct wilco_ec_device *ec, u32 property_id,return 0 ; } -EXPORT_SYMBOL_GPL (wilco_ec_get_byte_property); +EXPORT_SYMBOL_NS_GPL (wilco_ec_get_byte_property,PL_CHROMEOS );int wilco_ec_set_byte_property (struct wilco_ec_device *ec,u32 property_id,u8 val)
@@ -132,4 +132,4 @@ int wilco_ec_set_byte_property(struct wilco_ec_device *ec, u32 property_id,return wilco_ec_set_property (ec, &msg); } -EXPORT_SYMBOL_GPL (wilco_ec_set_byte_property); +EXPORT_SYMBOL_NS_GPL (wilco_ec_set_byte_property,PL_CHROMEOS );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 2/17 iio:cros_ec_sensors: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 1 + drivers/iio/proximity/cros_ec_mkbp_proximity.c | 1 + 2 files changed, 2 insertions(+)
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c +1 -0
@@ -851,3 +851,4 @@ EXPORT_SYMBOL_GPL(cros_ec_sensors_pm_ops);MODULE_DESCRIPTION ("ChromeOS EC sensor hub core functions" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
drivers/iio/proximity/cros_ec_mkbp_proximity.c +1 -0
@@ -268,4 +268,5 @@ static struct platform_driver cros_ec_mkbp_proximity_driver = {module_platform_driver (cros_ec_mkbp_proximity_driver);MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC MKBP proximity sensor driver" );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 3/17 platform/chrome: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/platform/chrome/cros_ec_sensorhub.c | 1 + drivers/platform/chrome/cros_ec_typec.c | 1 + drivers/platform/chrome/cros_usbpd_notify.c | 1 + drivers/platform/chrome/wilco_ec/debugfs.c | 1 + drivers/platform/chrome/wilco_ec/telemetry.c | 1 + 5 files changed, 5 insertions(+)
drivers/platform/chrome/cros_ec_sensorhub.c +1 -0
@@ -261,3 +261,4 @@ MODULE_ALIAS("platform:" DRV_NAME);MODULE_AUTHOR ("Gwendal Grignou <[email protected]>" );MODULE_DESCRIPTION ("ChromeOS EC MEMS Sensor Hub Driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
drivers/platform/chrome/cros_ec_typec.c +1 -0
@@ -1167,3 +1167,4 @@ module_platform_driver(cros_typec_driver);MODULE_AUTHOR ("Prashant Malani <[email protected]>" );MODULE_DESCRIPTION ("Chrome OS EC Type C control" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
drivers/platform/chrome/cros_usbpd_notify.c +1 -0
@@ -256,6 +256,7 @@ module_init(cros_usbpd_notify_init);module_exit (cros_usbpd_notify_exit);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS power delivery notifier device" );MODULE_AUTHOR ("Jon Flatley <[email protected]>" );MODULE_ALIAS ("platform:" DRV_NAME );
drivers/platform/chrome/wilco_ec/debugfs.c +1 -0
@@ -282,4 +282,5 @@ module_platform_driver(wilco_ec_debugfs_driver);MODULE_ALIAS ("platform:" DRV_NAME );MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("Wilco EC debugfs driver" );
drivers/platform/chrome/wilco_ec/telemetry.c +1 -0
@@ -469,4 +469,5 @@ module_exit(telem_module_exit);MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_DESCRIPTION ("Wilco EC telemetry driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 4/17 power_supply: chromeos: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/power/supply/cros_usbpd-charger.c | 1 + drivers/power/supply/wilco-charger.c | 1 + 2 files changed, 2 insertions(+)
drivers/power/supply/cros_usbpd-charger.c +1 -0
@@ -722,5 +722,6 @@ static struct platform_driver cros_usbpd_charger_driver = {module_platform_driver (cros_usbpd_charger_driver);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC USBPD charger" );MODULE_ALIAS ("platform:" DRV_NAME );
drivers/power/supply/wilco-charger.c +1 -0
@@ -189,4 +189,5 @@ module_platform_driver(wilco_charge_driver);MODULE_ALIAS ("platform:" DRV_NAME );MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("Wilco EC charge control driver" );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 5/17 rtc: wilco: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/rtc/rtc-wilco-ec.c | 1 + 1 file changed, 1 insertion(+)
drivers/rtc/rtc-wilco-ec.c +1 -0
@@ -191,4 +191,5 @@ module_platform_driver(wilco_ec_rtc_driver);MODULE_ALIAS ("platform:rtc-wilco-ec" );MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("Wilco EC RTC driver" );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 6/17 mfd: cros_ec_dev: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/mfd/cros_ec_dev.c | 1 + 1 file changed, 1 insertion(+)
drivers/mfd/cros_ec_dev.c +1 -0
@@ -330,3 +330,4 @@ MODULE_AUTHOR("Bill Richardson <[email protected]>");MODULE_DESCRIPTION ("Userspace interface to the Chrome OS Embedded Controller" );MODULE_VERSION ("1.0" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 7/17 platform: chrome: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/platform/chrome/cros_ec.c | 1 + drivers/platform/chrome/cros_ec_chardev.c | 1 + drivers/platform/chrome/cros_ec_debugfs.c | 1 + drivers/platform/chrome/cros_ec_i2c.c | 1 + drivers/platform/chrome/cros_ec_ishtp.c | 1 + drivers/platform/chrome/cros_ec_lightbar.c | 1 + drivers/platform/chrome/cros_ec_lpc.c | 1 + drivers/platform/chrome/cros_ec_rpmsg.c | 1 + drivers/platform/chrome/cros_ec_spi.c | 1 + drivers/platform/chrome/cros_ec_sysfs.c | 1 + drivers/platform/chrome/cros_ec_vbc.c | 1 + drivers/platform/chrome/cros_usbpd_logger.c | 1 + 12 files changed, 12 insertions(+)
drivers/platform/chrome/cros_ec.c +1 -0
@@ -398,4 +398,5 @@ EXPORT_SYMBOL(cros_ec_resume);#endif MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC core driver" );
drivers/platform/chrome/cros_ec_chardev.c +1 -0
@@ -416,3 +416,4 @@ MODULE_ALIAS("platform:" DRV_NAME);MODULE_AUTHOR ("Enric Balletbo i Serra <[email protected]>" );MODULE_DESCRIPTION ("ChromeOS EC Miscellaneous Character Driver" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
drivers/platform/chrome/cros_ec_debugfs.c +1 -0
@@ -526,5 +526,6 @@ static struct platform_driver cros_ec_debugfs_driver = {module_platform_driver (cros_ec_debugfs_driver);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("Debug logs for ChromeOS EC" );MODULE_ALIAS ("platform:" DRV_NAME );
drivers/platform/chrome/cros_ec_i2c.c +1 -0
@@ -373,4 +373,5 @@ static struct i2c_driver cros_ec_driver = {module_i2c_driver (cros_ec_driver);MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("I2C interface for ChromeOS Embedded Controller" );
drivers/platform/chrome/cros_ec_ishtp.c +1 -0
@@ -794,3 +794,4 @@ MODULE_DESCRIPTION("ChromeOS EC ISHTP Client Driver");MODULE_AUTHOR ("Rushikesh S Kadam <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
drivers/platform/chrome/cros_ec_lightbar.c +1 -0
@@ -609,5 +609,6 @@ static struct platform_driver cros_ec_lightbar_driver = {module_platform_driver (cros_ec_lightbar_driver);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("Expose the Chromebook Pixel's lightbar to userspace" );MODULE_ALIAS ("platform:" DRV_NAME );
drivers/platform/chrome/cros_ec_lpc.c +1 -0
@@ -597,4 +597,5 @@ module_init(cros_ec_lpc_init);module_exit (cros_ec_lpc_exit);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC LPC driver" );
drivers/platform/chrome/cros_ec_rpmsg.c +1 -0
@@ -304,4 +304,5 @@ static struct rpmsg_driver cros_ec_driver_rpmsg = {module_rpmsg_driver (cros_ec_driver_rpmsg);MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC multi function device (rpmsg)" );
drivers/platform/chrome/cros_ec_spi.c +1 -0
@@ -838,4 +838,5 @@ static struct spi_driver cros_ec_driver_spi = {module_spi_driver (cros_ec_driver_spi);MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("SPI interface for ChromeOS Embedded Controller" );
drivers/platform/chrome/cros_ec_sysfs.c +1 -0
@@ -368,5 +368,6 @@ static struct platform_driver cros_ec_sysfs_driver = {module_platform_driver (cros_ec_sysfs_driver);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("Expose the ChromeOS EC through sysfs" );MODULE_ALIAS ("platform:" DRV_NAME );
drivers/platform/chrome/cros_ec_vbc.c +1 -0
@@ -142,5 +142,6 @@ static struct platform_driver cros_ec_vbc_driver = {module_platform_driver (cros_ec_vbc_driver);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("Expose the vboot context nvram to userspace" );MODULE_ALIAS ("platform:" DRV_NAME );
drivers/platform/chrome/cros_usbpd_logger.c +1 -0
@@ -263,5 +263,6 @@ static struct platform_driver cros_usbpd_logger_driver = {module_platform_driver (cros_usbpd_logger_driver);MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("Logging driver for ChromeOS EC USBPD Charger." );MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 8/17 rtc: cros_ec: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/rtc/rtc-cros-ec.c | 1 + 1 file changed, 1 insertion(+)
drivers/rtc/rtc-cros-ec.c +1 -0
@@ -397,4 +397,5 @@ module_platform_driver(cros_ec_rtc_driver);MODULE_DESCRIPTION ("RTC driver for Chrome OS ECs" );MODULE_AUTHOR ("Stephen Barber <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 9/17 extcon: cros_ec: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/extcon/extcon-usbc-cros-ec.c | 1 + 1 file changed, 1 insertion(+)
drivers/extcon/extcon-usbc-cros-ec.c +1 -0
@@ -540,3 +540,4 @@ module_platform_driver(extcon_cros_ec_driver);MODULE_DESCRIPTION ("ChromeOS Embedded Controller extcon driver" );MODULE_AUTHOR ("Benson Leung <[email protected]>" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 10/17 HID: google: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/hid/hid-google-hammer.c | 1 + 1 file changed, 1 insertion(+)
drivers/hid/hid-google-hammer.c +1 -0
@@ -640,3 +640,4 @@ static void __exit hammer_exit(void)module_exit (hammer_exit);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 11/17 i2c: cros-ec-tunnel: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 1 + 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-cros-ec-tunnel.c +1 -0
@@ -317,5 +317,6 @@ static struct platform_driver ec_i2c_tunnel_driver = {module_platform_driver (ec_i2c_tunnel_driver);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("EC I2C tunnel driver" );MODULE_ALIAS ("platform:cros-ec-i2c-tunnel" );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 12/17 Input: cros_ec_keyb - Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/input/keyboard/cros_ec_keyb.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/keyboard/cros_ec_keyb.c +1 -0
@@ -741,5 +741,6 @@ static struct platform_driver cros_ec_keyb_driver = {module_platform_driver (cros_ec_keyb_driver);MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC keyboard driver" );MODULE_ALIAS ("platform:cros-ec-keyb" );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 13/17 media: cros-ec-cec: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/cec/platform/cros-ec/cros-ec-cec.c +1 -0
@@ -352,4 +352,5 @@ module_platform_driver(cros_ec_cec_driver);MODULE_DESCRIPTION ("CEC driver for ChromeOS ECs" );MODULE_AUTHOR ("Neil Armstrong <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 14/17 power: supply: PCHG: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/power/supply/cros_peripheral_charger.c | 1 + 1 file changed, 1 insertion(+)
drivers/power/supply/cros_peripheral_charger.c +1 -0
@@ -382,5 +382,6 @@ static struct platform_driver cros_pchg_driver = {module_platform_driver (cros_pchg_driver);MODULE_LICENSE ("GPL" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC peripheral device charger" );MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 15/17 pwm: cros-ec: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/pwm/pwm-cros-ec.c | 1 + 1 file changed, 1 insertion(+)
drivers/pwm/pwm-cros-ec.c +1 -0
@@ -306,3 +306,4 @@ module_platform_driver(cros_ec_pwm_driver);MODULE_ALIAS ("platform:cros-ec-pwm" );MODULE_DESCRIPTION ("ChromeOS EC PWM driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 16/17 regulator: cros-ec-regulator: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- drivers/regulator/cros-ec-regulator.c | 1 + 1 file changed, 1 insertion(+)
drivers/regulator/cros-ec-regulator.c +1 -0
@@ -252,5 +252,6 @@ static struct platform_driver cros_ec_regulator_driver = {module_platform_driver (cros_ec_regulator_driver);MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC controlled regulator" );MODULE_AUTHOR ("Pi-Hsun Shih <[email protected]>" );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
PATCH 17/17 ASoC: cros_ec_codec: Add PL_CHROMEOS dependency
In reply to Gwendal GrignouUse 'make nsdeps' to add missing dependencies.
--- sound/soc/codecs/cros_ec_codec.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/cros_ec_codec.c +1 -0
@@ -1062,6 +1062,7 @@ static struct platform_driver cros_ec_codec_platform_driver = {module_platform_driver (cros_ec_codec_platform_driver);MODULE_LICENSE ("GPL v2" ); +MODULE_IMPORT_NS (PL_CHROMEOS );MODULE_DESCRIPTION ("ChromeOS EC codec driver" );MODULE_AUTHOR ("Cheng-Yi Chiang <[email protected]>" );MODULE_ALIAS ("platform:cros-ec-codec" );
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
Hi Gwendal,
Quoted 3 lines · Gwendal Grignou
Add a symbol namespace for functions exported by the plaform chromeos subsystem.
It would be great to explain why this is needed/desirable. What are the benefits of introducing this namespace? What problem are you trying to solve?
Quoted 9 lines
Add depenencies for all drivers using these function.
'make nsdeps' is used to fix the dependencies.
Signed-off-by Gwendal Grignou <[email protected]>Gwendal Grignou (17):
plaform: chrome: AddPL_CHROMEOSexport symbol namespace iio:cros_ec_sensors: AddPL_CHROMEOSdependency
I wonder if ordering patches this way breaks compilation (patches should be structured in such a way that one need not apply entire series to get to buildable kernel). Isn't putting symbols into new namespace makes them unavailable to modules unless they explicitly import it?
Thanks.
Signature · 1 line
Dmitry
Quoted 11 lines · Dmitry Torokhov
Hi Gwendal,
Quoted 3 lines · Gwendal Grignou
Add a symbol namespace for functions exported by the plaform chromeos subsystem.
It would be great to explain why this is needed/desirable. What are the benefits of introducing this namespace? What problem are you trying to solve?
The issue came when reviewing an iio sensor
(https://www.spinics.net/lists/linux-iio/msg66280.html). I wanted to be ahead of the curve (for once).
Quoted 11 lines
Quoted 10 lines
Add depenencies for all drivers using these function.
'make nsdeps' is used to fix the dependencies.
Signed-off-by Gwendal Grignou <[email protected]>Gwendal Grignou (17):
plaform: chrome: AddPL_CHROMEOSexport symbol namespace iio:cros_ec_sensors: AddPL_CHROMEOSdependency
Quoted 5 lines
I wonder if ordering patches this way breaks compilation (patches should be structured in such a way that one need not apply entire series to get to buildable kernel). Isn't putting symbols into new namespace makes them unavailable to modules unless they explicitly import it?
From https://www.kernel.org/doc/html/latest/core-api/symbol-namespaces.html#loading-modules-that-use-namespaced-symbols,
since MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is set by default, this
is just a warning at load time.
Gwendal.
Quoted 5 lines
Thanks.
--
Dmitry
Mauro Carvalho Chehab
maintainerEm Wed, 5 Jan 2022 20:26:36 -0800
Gwendal Grignou <[email protected]> escreveu:
Quoted 9 lines · Dmitry Torokhov
Quoted 8 lines
Hi Gwendal,
Quoted 3 lines · Gwendal Grignou
Add a symbol namespace for functions exported by the plaform chromeos subsystem.
Quoted 6 lines
Quoted 3 lines
It would be great to explain why this is needed/desirable. What are the benefits of introducing this namespace? What problem are you trying to solve?
The issue came when reviewing an iio sensor
(https://www.spinics.net/lists/linux-iio/msg66280.html). I wanted to be ahead of the curve (for once).
Patch 01 should clearly document the reason why this is needed. Yet, see below.
While I see value on using namespaces, we should have extra care when this is used for kAPIs designed for a product/system. I mean, what prevents that the affected drivers won't support some day different non-ChromeOS products? We have a media driver originally written to work with the One Laptop Per Children hardware, that used some product-specific kAPIs, that were extended a couple years later to cover different types of hardware.
What happens if some day, a driver introduced to be used on a ChromeOS hardware would also be used by a non-ChromeOS hardware? This could become messy as times goes by.
Instead, IMO, it would make sense to have per-subsystem namespaces. So, for instance, placing iio under an IIO-specific namespace (and the same for other subsystems) makes more sense on my eyes, as the namespace boundary will be clearer, and an IIO driver will always be IIO, no matter on what hardware such driver would be used.
Thanks,
Mauro
Quoted 35 lines · Mauro Carvalho Chehab
Em Wed, 5 Jan 2022 20:26:36 -0800
Gwendal Grignou <[email protected]> escreveu:Quoted 9 lines · Dmitry Torokhov
Quoted 8 lines
Hi Gwendal,
Quoted 3 lines · Gwendal Grignou
Add a symbol namespace for functions exported by the plaform chromeos subsystem.
Quoted 6 lines
Quoted 3 lines
It would be great to explain why this is needed/desirable. What are the benefits of introducing this namespace? What problem are you trying to solve?
The issue came when reviewing an iio sensor
(https://www.spinics.net/lists/linux-iio/msg66280.html). I wanted to be ahead of the curve (for once).Patch 01 should clearly document the reason why this is needed. Yet, see below.
While I see value on using namespaces, we should have extra care when this is used for kAPIs designed for a product/system. I mean, what prevents that the affected drivers won't support some day different non-ChromeOS products? We have a media driver originally written to work with the One Laptop Per Children hardware, that used some product-specific kAPIs, that were extended a couple years later to cover different types of hardware.
What happens if some day, a driver introduced to be used on a ChromeOS hardware would also be used by a non-ChromeOS hardware? This could become messy as times goes by.
Quoted 6 lines
Instead, IMO, it would make sense to have per-subsystem namespaces. So, for instance, placing iio under an IIO-specific namespace (and the same for other subsystems) makes more sense on my eyes, as the namespace boundary will be clearer, and an IIO driver will always be IIO, no matter on what hardware such driver would be used.
I based this patchset on the current/future use in the IIO subsystem, where the namespaces are used for small subsystem like HID, IIO_HID_ATTRIBUTES, or code shared among sensors drivers of the same vendor (LTC2497, more to come).
Since the usage of namespace in the kernel is not clearly defined yet, I wait for the dust to settle and more usage to emerge before tuning this patchset.
Thanks,
Gwendal.
Quoted 3 lines
Thanks,
Mauro
Jonathan Cameron
maintainerQuoted 32 lines · On Mon, 10 Jan 2022 01:31:23 -0800 Gwendal Grignou <[email protected]> wrote:
Quoted 31 lines · Mauro Carvalho Chehab
Em Wed, 5 Jan 2022 20:26:36 -0800
Gwendal Grignou <[email protected]> escreveu:Quoted 9 lines · Dmitry Torokhov
Quoted 8 lines
Hi Gwendal,
Quoted 3 lines · Gwendal Grignou
Add a symbol namespace for functions exported by the plaform chromeos subsystem.
Quoted 6 lines
Quoted 3 lines
It would be great to explain why this is needed/desirable. What are the benefits of introducing this namespace? What problem are you trying to solve?
The issue came when reviewing an iio sensor
(https://www.spinics.net/lists/linux-iio/msg66280.html). I wanted to be ahead of the curve (for once).Patch 01 should clearly document the reason why this is needed. Yet, see below.
While I see value on using namespaces, we should have extra care when this is used for kAPIs designed for a product/system. I mean, what prevents that the affected drivers won't support some day different non-ChromeOS products? We have a media driver originally written to work with the One Laptop Per Children hardware, that used some product-specific kAPIs, that were extended a couple years later to cover different types of hardware.
Quoted 3 lines
Quoted 3 lines
What happens if some day, a driver introduced to be used on a ChromeOS hardware would also be used by a non-ChromeOS hardware? This could become messy as times goes by.
Hi Mauro,
I'm not sure I see why this case is a problem or any worse than the namespacing that already exists in the function names. We name a lot of stuff after first device that used it and some of it lives for ever. Sure, sometime it makes sense to rename when something becomes more generic, but we can do that here as needed.
Quoted 11 lines
Quoted 7 lines
Instead, IMO, it would make sense to have per-subsystem namespaces. So, for instance, placing iio under an IIO-specific namespace (and the same for other subsystems) makes more sense on my eyes, as the namespace boundary will be clearer, and an IIO driver will always be IIO, no matter on what hardware such driver would be used.
I based this patchset on the current/future use in the IIO subsystem, where the namespaces are used for small subsystem like HID,
IIO_HID_ATTRIBUTES, or code shared among sensors drivers of the same vendor (LTC2497, more to come).
Not particularly intended to be vendor based, more library module and client of library cases. Obviously it's relatively rare for multiple vendors to produce IIO devices that are sufficiently compatible to share code beyond the IIO core, but it does happen. In that particular case the library is called LTC2497 as it was the first part to use it it and there wasn't a sensible generic name. Vast majority of IIO cases will be a core module exporting stuff to i2c and spi specific modules.
We have drivers named after a particular part that support parts from multiple vendors of many different names. So in a similar fashion I'm not that worried about having some future driver have to include one of the namespaces that is named after some other part. Perhaps the issue here is that the chromeos platform stuff has a name tightly coupled to a somewhat 'generic' but also somewhat closed hardware ecosystem?
(Not really relevant here but I do longer term plan to move the main IIO core into a namespace, but focusing on the smaller cases first as I think both are valid).
So I'm in support of this series but maybe you are right in waiting for the dust to settle :) Note I'd also like to see an IIO_CHROMEOS or similar NS for the symbols exported by cros_ec_sensors_core.c.
Eventually I'd expect some of the IIO chromeos modules to have MODULE_IMPORT_NS(IIO); MODULE_IMPORT_NS(IIO_CHROMEOS); MODULE_IMPORT_NS(PL_CHROMEOS);
and probably some others...
Jonathan
Quoted 9 lines
Since the usage of namespace in the kernel is not clearly defined yet, I wait for the dust to settle and more usage to emerge before tuning this patchset.
Thanks,
Gwendal.Quoted 3 lines
Thanks,
Mauro