platform/chrome: provide ID table for avoiding fallback match
Subsystems (8)
Tzung-Bi Shih
maintainercover platform/chrome: provide ID table for avoiding fallback match
Inspired by [1]. Turn all MODULE_ALIAS() in ChromeOS EC platform drivers into proper platform_device_id table and MODULE_DEVICE_TABLE().
The series is basically looking for drivers from:
- struct mfd_cell in drivers/mfd/cros_ec_dev.c.
- grep -R MODULE_ALIAS drivers/platform/chrome/.
Tzung-Bi Shih (18):
media: platform: cros-ec: provide ID table for avoiding fallback match
gpio: cros-ec: provide ID table for avoiding fallback match
rtc: cros-ec: provide ID table for avoiding fallback match platform/chrome: cros_ec_sensorhub: provide ID table for avoiding
fallback match
power: supply: cros_usbpd: provide ID table for avoiding fallback
match
platform/chrome: cros_usbpd_logger: provide ID table for avoiding
fallback match
platform/chrome: cros_usbpd_notify: provide ID table for avoiding
fallback match
platform/chrome: cros_ec_chardev: provide ID table for avoiding
fallback match
platform/chrome: cros_ec_debugfs: provide ID table for avoiding
fallback match
platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback
match
power: supply: cros_pchg: provide ID table for avoiding fallback match platform/chrome: cros_ec_lightbar: provide ID table for avoiding
fallback match
platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback
match
platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding
fallback match
platform/chrome: wilco_ec: telemetry: provide ID table for avoiding
fallback match
platform/chrome: wilco_ec: debugfs: provide ID table for avoiding
fallback match
platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS platform/chrome/wilco_ec: core: provide ID table for avoiding fallback
match
drivers/gpio/gpio-cros-ec.c | 8 ++++++++ drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 9 ++++++++- drivers/platform/chrome/cros_ec_chardev.c | 9 ++++++++- drivers/platform/chrome/cros_ec_debugfs.c | 9 ++++++++- drivers/platform/chrome/cros_ec_lightbar.c | 9 ++++++++- drivers/platform/chrome/cros_ec_sensorhub.c | 9 ++++++++- drivers/platform/chrome/cros_ec_sysfs.c | 9 ++++++++- drivers/platform/chrome/cros_ec_vbc.c | 9 ++++++++- drivers/platform/chrome/cros_kbd_led_backlight.c | 11 +++++++++-- drivers/platform/chrome/cros_usbpd_logger.c | 9 ++++++++- drivers/platform/chrome/cros_usbpd_notify.c | 9 ++++++++- drivers/platform/chrome/wilco_ec/core.c | 9 ++++++++- drivers/platform/chrome/wilco_ec/debugfs.c | 9 ++++++++- drivers/platform/chrome/wilco_ec/event.c | 1 - drivers/platform/chrome/wilco_ec/telemetry.c | 9 ++++++++- drivers/power/supply/cros_peripheral_charger.c | 11 +++++++++-- drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++-- drivers/rtc/rtc-cros-ec.c | 9 ++++++++- 18 files changed, 139 insertions(+), 20 deletions(-)
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 1/18 media: platform: cros-ec: provide ID table for avoiding fallback match
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/media/cec/platform/cros-ec/cros-ec-cec.c +8 -1
@@ -8,6 +8,7 @@#include <linux/kernel.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/platform_device.h> #include <linux/dmi.h> #include <linux/pci.h>
@@ -573,6 +574,12 @@ static void cros_ec_cec_remove(struct platform_device *pdev) } } +static const struct platform_device_id cros_ec_cec_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_cec_id); +static struct platform_driver cros_ec_cec_driver = { .probe = cros_ec_cec_probe, .remove_new = cros_ec_cec_remove,
@@ -580,6 +587,7 @@ static struct platform_driver cros_ec_cec_driver = { .name = DRV_NAME, .pm = &cros_ec_cec_pm_ops, }, + .id_table = cros_ec_cec_id, };module_platform_driver (cros_ec_cec_driver);
@@ -587,4 +595,3 @@ module_platform_driver(cros_ec_cec_driver);MODULE_DESCRIPTION ("CEC driver for ChromeOS ECs" );MODULE_AUTHOR ("Neil Armstrong <[email protected]>" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 2/18 gpio: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match. Also allow automatic module loading by adding MODULE_DEVICE_TABLE().
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/gpio/gpio-cros-ec.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpio/gpio-cros-ec.c +8 -0
@@ -12,6 +12,7 @@#include <linux/errno.h> #include <linux/gpio/driver.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h>
@@ -197,11 +198,18 @@ static int cros_ec_gpio_probe(struct platform_device *pdev)return devm_gpiochip_add_data (dev, gc, cros_ec); } +static const struct platform_device_id cros_ec_gpio_id[] = { + {"cros-ec-gpio" ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_gpio_id); +static struct platform_driver cros_ec_gpio_driver = { .probe = cros_ec_gpio_probe, .driver = { .name ="cros-ec-gpio" , }, + .id_table = cros_ec_gpio_id, };module_platform_driver (cros_ec_gpio_driver);
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 3/18 rtc: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/rtc/rtc-cros-ec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/rtc/rtc-cros-ec.c +8 -1
@@ -5,6 +5,7 @@// Author: Stephen Barber <[email protected]> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h>
@@ -392,6 +393,12 @@ static void cros_ec_rtc_remove(struct platform_device *pdev)dev_err (dev,"failed to unregister notifier\n" ); } +static const struct platform_device_id cros_ec_rtc_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_rtc_id); +static struct platform_driver cros_ec_rtc_driver = { .probe = cros_ec_rtc_probe, .remove_new = cros_ec_rtc_remove,
@@ -399,6 +406,7 @@ static struct platform_driver cros_ec_rtc_driver = { .name = DRV_NAME, .pm = &cros_ec_rtc_pm_ops, }, + .id_table = cros_ec_rtc_id, };module_platform_driver (cros_ec_rtc_driver);
@@ -406,4 +414,3 @@ 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_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 4/18 platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/cros_ec_sensorhub.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_sensorhub.c +8 -1
@@ -8,6 +8,7 @@#include <linux/init.h> #include <linux/device.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h>
@@ -247,17 +248,23 @@ static SIMPLE_DEV_PM_OPS(cros_ec_sensorhub_pm_ops, cros_ec_sensorhub_suspend, cros_ec_sensorhub_resume); +static const struct platform_device_id cros_ec_sensorhub_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_sensorhub_id); +static struct platform_driver cros_ec_sensorhub_driver = { .driver = { .name =DRV_NAME , .pm = &cros_ec_sensorhub_pm_ops, }, .probe = cros_ec_sensorhub_probe, + .id_table = cros_ec_sensorhub_id, };module_platform_driver (cros_ec_sensorhub_driver); -MODULE_ALIAS ("platform:" DRV_NAME );MODULE_AUTHOR ("Gwendal Grignou <[email protected]>" );MODULE_DESCRIPTION ("ChromeOS EC MEMS Sensor Hub Driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 5/18 power: supply: cros_usbpd: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/power/supply/cros_usbpd-charger.c +9 -2
@@ -5,6 +5,7 @@* Copyright (c) 2014 - 2018 Google, Inc */ +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h>
@@ -711,16 +712,22 @@ static int cros_usbpd_charger_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL, cros_usbpd_charger_resume); +static const struct platform_device_id cros_usbpd_charger_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_usbpd_charger_id); +static struct platform_driver cros_usbpd_charger_driver = { .driver = { .name =DRV_NAME , .pm = &cros_usbpd_charger_pm_ops, }, - .probe = cros_usbpd_charger_probe + .probe = cros_usbpd_charger_probe, + .id_table = cros_usbpd_charger_id, };module_platform_driver (cros_usbpd_charger_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("ChromeOS EC USBPD charger" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 6/18 platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/cros_usbpd_logger.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_usbpd_logger.c +8 -1
@@ -7,6 +7,7 @@#include <linux/ktime.h> #include <linux/math64.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h>
@@ -249,6 +250,12 @@ static int __maybe_unused cros_usbpd_logger_suspend(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_logger_pm_ops, cros_usbpd_logger_suspend, cros_usbpd_logger_resume); +static const struct platform_device_id cros_usbpd_logger_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_usbpd_logger_id); +static struct platform_driver cros_usbpd_logger_driver = { .driver = { .name =DRV_NAME ,
@@ -256,10 +263,10 @@ static struct platform_driver cros_usbpd_logger_driver = { }, .probe = cros_usbpd_logger_probe, .remove_new = cros_usbpd_logger_remove, + .id_table = cros_usbpd_logger_id, };module_platform_driver (cros_usbpd_logger_driver);MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("Logging driver for ChromeOS EC USBPD Charger." ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 7/18 platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/cros_usbpd_notify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_usbpd_notify.c +8 -1
@@ -6,6 +6,7 @@*/ #include <linux/acpi.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_proto.h> #include <linux/platform_data/cros_usbpd_notify.h>
@@ -218,12 +219,19 @@ static void cros_usbpd_notify_remove_plat(struct platform_device *pdev) &pdnotify->nb); } +static const struct platform_device_id cros_usbpd_notify_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_usbpd_notify_id); +static struct platform_driver cros_usbpd_notify_plat_driver = { .driver = { .name =DRV_NAME , }, .probe = cros_usbpd_notify_probe_plat, .remove_new = cros_usbpd_notify_remove_plat, + .id_table = cros_usbpd_notify_id, };static int __init cros_usbpd_notify_init (void )
@@ -258,4 +266,3 @@ module_exit(cros_usbpd_notify_exit);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("ChromeOS power delivery notifier device" );MODULE_AUTHOR ("Jon Flatley <[email protected]>" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 8/18 platform/chrome: cros_ec_chardev: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/cros_ec_chardev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_chardev.c +8 -1
@@ -14,6 +14,7 @@#include <linux/device.h> #include <linux/fs.h> #include <linux/miscdevice.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/notifier.h> #include <linux/platform_data/cros_ec_chardev.h>
@@ -403,17 +404,23 @@ static void cros_ec_chardev_remove(struct platform_device *pdev)misc_deregister (&data->misc); } +static const struct platform_device_id cros_ec_chardev_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_chardev_id); +static struct platform_driver cros_ec_chardev_driver = { .driver = { .name =DRV_NAME , }, .probe = cros_ec_chardev_probe, .remove_new = cros_ec_chardev_remove, + .id_table = cros_ec_chardev_id, };module_platform_driver (cros_ec_chardev_driver); -MODULE_ALIAS ("platform:" DRV_NAME );MODULE_AUTHOR ("Enric Balletbo i Serra <[email protected]>" );MODULE_DESCRIPTION ("ChromeOS EC Miscellaneous Character Driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 9/18 platform/chrome: cros_ec_debugfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/cros_ec_debugfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_debugfs.c +8 -1
@@ -7,6 +7,7 @@#include <linux/debugfs.h> #include <linux/delay.h> #include <linux/fs.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/platform_data/cros_ec_commands.h>
@@ -564,6 +565,12 @@ static int __maybe_unused cros_ec_debugfs_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_debugfs_pm_ops, cros_ec_debugfs_suspend, cros_ec_debugfs_resume); +static const struct platform_device_id cros_ec_debugfs_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_debugfs_id); +static struct platform_driver cros_ec_debugfs_driver = { .driver = { .name =DRV_NAME ,
@@ -572,10 +579,10 @@ static struct platform_driver cros_ec_debugfs_driver = { }, .probe = cros_ec_debugfs_probe, .remove_new = cros_ec_debugfs_remove, + .id_table = cros_ec_debugfs_id, };module_platform_driver (cros_ec_debugfs_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Debug logs for ChromeOS EC" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 10/18 platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/cros_ec_sysfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_sysfs.c +8 -1
@@ -8,6 +8,7 @@#include <linux/device.h> #include <linux/fs.h> #include <linux/kobject.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h>
@@ -347,16 +348,22 @@ static void cros_ec_sysfs_remove(struct platform_device *pd)sysfs_remove_group (&ec_dev->class_dev.kobj, &cros_ec_attr_group); } +static const struct platform_device_id cros_ec_sysfs_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_sysfs_id); +static struct platform_driver cros_ec_sysfs_driver = { .driver = { .name =DRV_NAME , }, .probe = cros_ec_sysfs_probe, .remove_new = cros_ec_sysfs_remove, + .id_table = cros_ec_sysfs_id, };module_platform_driver (cros_ec_sysfs_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Expose the ChromeOS EC through sysfs" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 11/18 power: supply: cros_pchg: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/power/supply/cros_peripheral_charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/power/supply/cros_peripheral_charger.c +9 -2
@@ -5,6 +5,7 @@* Copyright 2020 Google LLC. */ +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/notifier.h> #include <linux/platform_data/cros_ec_commands.h>
@@ -367,16 +368,22 @@ static int __maybe_unused cros_pchg_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_pchg_pm_ops, NULL, cros_pchg_resume); +static const struct platform_device_id cros_pchg_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_pchg_id); +static struct platform_driver cros_pchg_driver = { .driver = { .name =DRV_NAME , .pm = &cros_pchg_pm_ops, }, - .probe = cros_pchg_probe + .probe = cros_pchg_probe, + .id_table = cros_pchg_id, };module_platform_driver (cros_pchg_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("ChromeOS EC peripheral device charger" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 12/18 platform/chrome: cros_ec_lightbar: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/cros_ec_lightbar.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_lightbar.c +8 -1
@@ -9,6 +9,7 @@#include <linux/fs.h> #include <linux/kobject.h> #include <linux/kstrtox.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h>
@@ -594,6 +595,12 @@ static int __maybe_unused cros_ec_lightbar_suspend(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_lightbar_pm_ops, cros_ec_lightbar_suspend, cros_ec_lightbar_resume); +static const struct platform_device_id cros_ec_lightbar_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_lightbar_id); +static struct platform_driver cros_ec_lightbar_driver = { .driver = { .name =DRV_NAME ,
@@ -602,10 +609,10 @@ static struct platform_driver cros_ec_lightbar_driver = { }, .probe = cros_ec_lightbar_probe, .remove_new = cros_ec_lightbar_remove, + .id_table = cros_ec_lightbar_id, };module_platform_driver (cros_ec_lightbar_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Expose the Chromebook Pixel's lightbar to userspace" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 13/18 platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/cros_ec_vbc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_vbc.c +8 -1
@@ -6,6 +6,7 @@#include <linux/of.h> #include <linux/platform_device.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h>
@@ -133,16 +134,22 @@ static void cros_ec_vbc_remove(struct platform_device *pd) &cros_ec_vbc_attr_group); } +static const struct platform_device_id cros_ec_vbc_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_vbc_id); +static struct platform_driver cros_ec_vbc_driver = { .driver = { .name =DRV_NAME , }, .probe = cros_ec_vbc_probe, .remove_new = cros_ec_vbc_remove, + .id_table = cros_ec_vbc_id, };module_platform_driver (cros_ec_vbc_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Expose the vboot context nvram to userspace" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 14/18 platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
Also shrink the name for fitting to [2].
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
[2]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608
--- drivers/platform/chrome/cros_kbd_led_backlight.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/platform/chrome/cros_kbd_led_backlight.c +9 -2
@@ -9,6 +9,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/leds.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/of.h> #include <linux/platform_data/cros_ec_commands.h>
@@ -247,17 +248,23 @@ static const struct of_device_id keyboard_led_of_match[] = {MODULE_DEVICE_TABLE (of, keyboard_led_of_match);#endif +static const struct platform_device_id keyboard_led_id[] = { + {"cros-keyboard-leds" ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, keyboard_led_id); +static struct platform_driver keyboard_led_driver = { .driver = { - .name ="chromeos-keyboard-leds" , + .name ="cros-keyboard-leds" , .acpi_match_table =ACPI_PTR (keyboard_led_acpi_match), .of_match_table =of_match_ptr (keyboard_led_of_match), }, .probe = keyboard_led_probe, + .id_table = keyboard_led_id, };module_platform_driver (keyboard_led_driver);MODULE_AUTHOR ("Simon Que <[email protected]>" );MODULE_DESCRIPTION ("ChromeOS Keyboard backlight LED Driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:chromeos-keyboard-leds" );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 15/18 platform/chrome: wilco_ec: telemetry: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/wilco_ec/telemetry.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/wilco_ec/telemetry.c +8 -1
@@ -30,6 +30,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/fs.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/wilco-ec.h> #include <linux/platform_device.h>
@@ -409,12 +410,19 @@ static void telem_device_remove(struct platform_device *pdev)put_device (&dev_data->dev); } +static const struct platform_device_id telem_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, telem_id); +static struct platform_driver telem_driver = { .probe = telem_device_probe, .remove_new = telem_device_remove, .driver = { .name =DRV_NAME , }, + .id_table = telem_id, };static int __init telem_module_init (void )
@@ -466,4 +474,3 @@ module_exit(telem_module_exit);MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_DESCRIPTION ("Wilco EC telemetry driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 16/18 platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/wilco_ec/debugfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/wilco_ec/debugfs.c +8 -1
@@ -10,6 +10,7 @@#include <linux/ctype.h> #include <linux/debugfs.h> #include <linux/fs.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/wilco-ec.h> #include <linux/platform_device.h>
@@ -265,17 +266,23 @@ static void wilco_ec_debugfs_remove(struct platform_device *pdev)debugfs_remove_recursive (debug_info->dir); } +static const struct platform_device_id wilco_ec_debugfs_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, wilco_ec_debugfs_id); +static struct platform_driver wilco_ec_debugfs_driver = { .driver = { .name =DRV_NAME , }, .probe = wilco_ec_debugfs_probe, .remove_new = wilco_ec_debugfs_remove, + .id_table = wilco_ec_debugfs_id, };module_platform_driver (wilco_ec_debugfs_driver); -MODULE_ALIAS ("platform:" DRV_NAME );MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("Wilco EC debugfs driver" );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 17/18 platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS
In reply to Tzung-Bi ShihThere is no platform driver in the file. Remove the redundant MODULE_ALIAS().
--- drivers/platform/chrome/wilco_ec/event.c | 1 - 1 file changed, 1 deletion(-)
drivers/platform/chrome/wilco_ec/event.c +0 -1
@@ -575,4 +575,3 @@ module_exit(event_module_exit);MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_DESCRIPTION ("Wilco EC ACPI event driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Tzung-Bi Shih
maintainerPATCH 18/18 platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihInstead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
--- drivers/platform/chrome/wilco_ec/core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/chrome/wilco_ec/core.c +8 -1
@@ -10,6 +10,7 @@#include <linux/acpi.h> #include <linux/device.h> #include <linux/ioport.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/wilco-ec.h> #include <linux/platform_device.h>
@@ -150,6 +151,12 @@ static const struct acpi_device_id wilco_ec_acpi_device_ids[] = { };MODULE_DEVICE_TABLE (acpi, wilco_ec_acpi_device_ids); +static const struct platform_device_id wilco_ec_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, wilco_ec_id); +static struct platform_driver wilco_ec_driver = { .driver = { .name =DRV_NAME ,
@@ -157,6 +164,7 @@ static struct platform_driver wilco_ec_driver = { }, .probe = wilco_ec_probe, .remove_new = wilco_ec_remove, + .id_table = wilco_ec_id, };module_platform_driver (wilco_ec_driver);
@@ -165,4 +173,3 @@ MODULE_AUTHOR("Nick Crews <[email protected]>");MODULE_AUTHOR ("Duncan Laurie <[email protected]>" );MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("ChromeOS Wilco Embedded Controller driver" ); -MODULE_ALIAS ("platform:" DRV_NAME );
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 01/18] media: platform: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Best regards,
Krzysztof
Re: [PATCH 02/18] gpio: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 8 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match. Also allow automatic module loading by adding
MODULE_DEVICE_TABLE().[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>---
Best regards,
Krzysztof
Re: [PATCH 03/18] rtc: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Best regards,
Krzysztof
Re: [PATCH 04/18] platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Best regards,
Krzysztof
Re: [PATCH 05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
You could add everywhere:
but I also don't mind if that's skipped. Up to you folks.
Thanks for the changes.
Best regards,
Krzysztof
Re: [PATCH 10/18] platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Best regards,
Krzysztof
Re: (subset) [PATCH 03/18] rtc: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Applied, thanks!
[03/18] rtc: cros-ec: provide ID table for avoiding fallback match
https://git.kernel.org/abelloni/c/61c86d14745d
Best regards,
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [PATCH 07/18] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Best regards,
Krzysztof
Re: [PATCH 08/18] platform/chrome: cros_ec_chardev: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 9 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>--- drivers/platform/chrome/cros_ec_chardev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
Best regards,
Krzysztof
Re: [PATCH 11/18] power: supply: cros_pchg: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 7 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>---
Best regards,
Krzysztof
Re: [PATCH 06/18] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Best regards,
Krzysztof
Re: [PATCH 09/18] platform/chrome: cros_ec_debugfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 7 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>---
Best regards,
Krzysztof
Re: [PATCH 12/18] platform/chrome: cros_ec_lightbar: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Best regards,
Krzysztof
Re: [PATCH 18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 7 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>---
Best regards,
Krzysztof
Re: [PATCH 16/18] platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 7 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>---
Best regards,
Krzysztof
Re: [PATCH 15/18] platform/chrome: wilco_ec: telemetry: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Best regards,
Krzysztof
Re: [PATCH 14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 8 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
Also shrink the name for fitting to [2].
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
[2]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608
I think this should be two commits, where the first one is a fix (Fixes tag) for the size of name.
Best regards,
Krzysztof
Re: [PATCH 17/18] platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS
In reply to Tzung-Bi ShihQuoted 13 lines · Tzung-Bi Shih
There is no platform driver in the file. Remove the redundant
MODULE_ALIAS().Signed-off-by Tzung-Bi Shih <[email protected]>--- drivers/platform/chrome/wilco_ec/event.c | 1 - 1 file changed, 1 deletion(-)drivers/platform/chrome/wilco_ec/event.c +0
-0
drivers/platform/chrome/wilco_ec/event.c module_exit(event_module_exit); · line 578
Quoted 4 lines
drivers/platform/chrome/wilco_ec/event.c +0
-1@@ -575,4 +575,3 @@ module_exit(event_module_exit);MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_DESCRIPTION ("Wilco EC ACPI event driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:" DRV_NAME );
In this case some sort of alias, maybe not necessarily platform, could have sense. I see there ACPI ID table, so it is fine for me.
Best regards,
Krzysztof
Re: [PATCH 13/18] platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 8 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>--- drivers/platform/chrome/cros_ec_vbc.c | 9 ++++++++-
Best regards,
Krzysztof
Re: [PATCH 01/18] media: platform: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 46 lines
--- drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/media/cec/platform/cros-ec/cros-ec-cec.c +8
-1@@ -8,6 +8,7 @@#include <linux/kernel.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/platform_device.h> #include <linux/dmi.h> #include <linux/pci.h> @@ -573,6 +574,12 @@ static void cros_ec_cec_remove(struct platform_device *pdev) } } +static const struct platform_device_id cros_ec_cec_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_cec_id); +static struct platform_driver cros_ec_cec_driver = { .probe = cros_ec_cec_probe, .remove_new = cros_ec_cec_remove,@@ -580,6 +587,7 @@ static struct platform_driver cros_ec_cec_driver = { .name = DRV_NAME, .pm = &cros_ec_cec_pm_ops, }, + .id_table = cros_ec_cec_id, };module_platform_driver (cros_ec_cec_driver);@@ -587,4 +595,3 @@ module_platform_driver(cros_ec_cec_driver);MODULE_DESCRIPTION ("CEC driver for ChromeOS ECs" );MODULE_AUTHOR ("Neil Armstrong <[email protected]>" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 02/18] gpio: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 7 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match. Also allow automatic module loading by adding
MODULE_DEVICE_TABLE().[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 38 lines
--- drivers/gpio/gpio-cros-ec.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpio/gpio-cros-ec.c +8
-0@@ -12,6 +12,7 @@#include <linux/errno.h> #include <linux/gpio/driver.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> @@ -197,11 +198,18 @@ static int cros_ec_gpio_probe(struct platform_device *pdev)return devm_gpiochip_add_data (dev, gc, cros_ec); } +static const struct platform_device_id cros_ec_gpio_id[] = { + {"cros-ec-gpio" ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_gpio_id); +static struct platform_driver cros_ec_gpio_driver = { .probe = cros_ec_gpio_probe, .driver = { .name ="cros-ec-gpio" , }, + .id_table = cros_ec_gpio_id, };module_platform_driver (cros_ec_gpio_driver);Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 03/18] rtc: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 46 lines
--- drivers/rtc/rtc-cros-ec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/rtc/rtc-cros-ec.c +8
-1@@ -5,6 +5,7 @@// Author: Stephen Barber <[email protected]> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> @@ -392,6 +393,12 @@ static void cros_ec_rtc_remove(struct platform_device *pdev)dev_err (dev,"failed to unregister notifier\n" ); } +static const struct platform_device_id cros_ec_rtc_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_rtc_id); +static struct platform_driver cros_ec_rtc_driver = { .probe = cros_ec_rtc_probe, .remove_new = cros_ec_rtc_remove,@@ -399,6 +406,7 @@ static struct platform_driver cros_ec_rtc_driver = { .name = DRV_NAME, .pm = &cros_ec_rtc_pm_ops, }, + .id_table = cros_ec_rtc_id, };module_platform_driver (cros_ec_rtc_driver);@@ -406,4 +414,3 @@ 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_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 04/18] platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 45 lines
--- drivers/platform/chrome/cros_ec_sensorhub.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_ec_sensorhub.c +8
-1@@ -8,6 +8,7 @@#include <linux/init.h> #include <linux/device.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> @@ -247,17 +248,23 @@ static SIMPLE_DEV_PM_OPS(cros_ec_sensorhub_pm_ops, cros_ec_sensorhub_suspend, cros_ec_sensorhub_resume); +static const struct platform_device_id cros_ec_sensorhub_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_sensorhub_id); +static struct platform_driver cros_ec_sensorhub_driver = { .driver = { .name =DRV_NAME , .pm = &cros_ec_sensorhub_pm_ops, }, .probe = cros_ec_sensorhub_probe, + .id_table = cros_ec_sensorhub_id, };module_platform_driver (cros_ec_sensorhub_driver); -MODULE_ALIAS ("platform:" DRV_NAME );MODULE_AUTHOR ("Gwendal Grignou <[email protected]>" );MODULE_DESCRIPTION ("ChromeOS EC MEMS Sensor Hub Driver" );MODULE_LICENSE ("GPL" );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 44 lines
--- drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/power/supply/cros_usbpd-charger.c +9
-2@@ -5,6 +5,7 @@* Copyright (c) 2014 - 2018 Google, Inc */ +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> @@ -711,16 +712,22 @@ static int cros_usbpd_charger_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL, cros_usbpd_charger_resume); +static const struct platform_device_id cros_usbpd_charger_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_usbpd_charger_id); +static struct platform_driver cros_usbpd_charger_driver = { .driver = { .name =DRV_NAME , .pm = &cros_usbpd_charger_pm_ops, }, - .probe = cros_usbpd_charger_probe + .probe = cros_usbpd_charger_probe, + .id_table = cros_usbpd_charger_id, };module_platform_driver (cros_usbpd_charger_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("ChromeOS EC USBPD charger" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 06/18] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 45 lines
--- drivers/platform/chrome/cros_usbpd_logger.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_usbpd_logger.c +8
-1@@ -7,6 +7,7 @@#include <linux/ktime.h> #include <linux/math64.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> @@ -249,6 +250,12 @@ static int __maybe_unused cros_usbpd_logger_suspend(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_logger_pm_ops, cros_usbpd_logger_suspend, cros_usbpd_logger_resume); +static const struct platform_device_id cros_usbpd_logger_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_usbpd_logger_id); +static struct platform_driver cros_usbpd_logger_driver = { .driver = { .name =DRV_NAME ,@@ -256,10 +263,10 @@ static struct platform_driver cros_usbpd_logger_driver = { }, .probe = cros_usbpd_logger_probe, .remove_new = cros_usbpd_logger_remove, + .id_table = cros_usbpd_logger_id, };module_platform_driver (cros_usbpd_logger_driver);MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("Logging driver for ChromeOS EC USBPD Charger." ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 07/18] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 45 lines
--- drivers/platform/chrome/cros_usbpd_notify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_usbpd_notify.c +8
-1@@ -6,6 +6,7 @@*/ #include <linux/acpi.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_proto.h> #include <linux/platform_data/cros_usbpd_notify.h> @@ -218,12 +219,19 @@ static void cros_usbpd_notify_remove_plat(struct platform_device *pdev) &pdnotify->nb); } +static const struct platform_device_id cros_usbpd_notify_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_usbpd_notify_id); +static struct platform_driver cros_usbpd_notify_plat_driver = { .driver = { .name =DRV_NAME , }, .probe = cros_usbpd_notify_probe_plat, .remove_new = cros_usbpd_notify_remove_plat, + .id_table = cros_usbpd_notify_id, };static int __init cros_usbpd_notify_init (void )@@ -258,4 +266,3 @@ module_exit(cros_usbpd_notify_exit);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("ChromeOS power delivery notifier device" );MODULE_AUTHOR ("Jon Flatley <[email protected]>" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 08/18] platform/chrome: cros_ec_chardev: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 45 lines
--- drivers/platform/chrome/cros_ec_chardev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_ec_chardev.c +8
-1@@ -14,6 +14,7 @@#include <linux/device.h> #include <linux/fs.h> #include <linux/miscdevice.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/notifier.h> #include <linux/platform_data/cros_ec_chardev.h> @@ -403,17 +404,23 @@ static void cros_ec_chardev_remove(struct platform_device *pdev)misc_deregister (&data->misc); } +static const struct platform_device_id cros_ec_chardev_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_chardev_id); +static struct platform_driver cros_ec_chardev_driver = { .driver = { .name =DRV_NAME , }, .probe = cros_ec_chardev_probe, .remove_new = cros_ec_chardev_remove, + .id_table = cros_ec_chardev_id, };module_platform_driver (cros_ec_chardev_driver); -MODULE_ALIAS ("platform:" DRV_NAME );MODULE_AUTHOR ("Enric Balletbo i Serra <[email protected]>" );MODULE_DESCRIPTION ("ChromeOS EC Miscellaneous Character Driver" );MODULE_LICENSE ("GPL" );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 09/18] platform/chrome: cros_ec_debugfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 45 lines
--- drivers/platform/chrome/cros_ec_debugfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_ec_debugfs.c +8
-1@@ -7,6 +7,7 @@#include <linux/debugfs.h> #include <linux/delay.h> #include <linux/fs.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/platform_data/cros_ec_commands.h> @@ -564,6 +565,12 @@ static int __maybe_unused cros_ec_debugfs_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_debugfs_pm_ops, cros_ec_debugfs_suspend, cros_ec_debugfs_resume); +static const struct platform_device_id cros_ec_debugfs_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_debugfs_id); +static struct platform_driver cros_ec_debugfs_driver = { .driver = { .name =DRV_NAME ,@@ -572,10 +579,10 @@ static struct platform_driver cros_ec_debugfs_driver = { }, .probe = cros_ec_debugfs_probe, .remove_new = cros_ec_debugfs_remove, + .id_table = cros_ec_debugfs_id, };module_platform_driver (cros_ec_debugfs_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Debug logs for ChromeOS EC" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 10/18] platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 44 lines
--- drivers/platform/chrome/cros_ec_sysfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_ec_sysfs.c +8
-1@@ -8,6 +8,7 @@#include <linux/device.h> #include <linux/fs.h> #include <linux/kobject.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> @@ -347,16 +348,22 @@ static void cros_ec_sysfs_remove(struct platform_device *pd)sysfs_remove_group (&ec_dev->class_dev.kobj, &cros_ec_attr_group); } +static const struct platform_device_id cros_ec_sysfs_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_sysfs_id); +static struct platform_driver cros_ec_sysfs_driver = { .driver = { .name =DRV_NAME , }, .probe = cros_ec_sysfs_probe, .remove_new = cros_ec_sysfs_remove, + .id_table = cros_ec_sysfs_id, };module_platform_driver (cros_ec_sysfs_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Expose the ChromeOS EC through sysfs" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 11/18] power: supply: cros_pchg: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 44 lines
--- drivers/power/supply/cros_peripheral_charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/power/supply/cros_peripheral_charger.c +9
-2@@ -5,6 +5,7 @@* Copyright 2020 Google LLC. */ +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/notifier.h> #include <linux/platform_data/cros_ec_commands.h> @@ -367,16 +368,22 @@ static int __maybe_unused cros_pchg_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_pchg_pm_ops, NULL, cros_pchg_resume); +static const struct platform_device_id cros_pchg_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_pchg_id); +static struct platform_driver cros_pchg_driver = { .driver = { .name =DRV_NAME , .pm = &cros_pchg_pm_ops, }, - .probe = cros_pchg_probe + .probe = cros_pchg_probe, + .id_table = cros_pchg_id, };module_platform_driver (cros_pchg_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("ChromeOS EC peripheral device charger" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 12/18] platform/chrome: cros_ec_lightbar: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 45 lines
--- drivers/platform/chrome/cros_ec_lightbar.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_ec_lightbar.c +8
-1@@ -9,6 +9,7 @@#include <linux/fs.h> #include <linux/kobject.h> #include <linux/kstrtox.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> @@ -594,6 +595,12 @@ static int __maybe_unused cros_ec_lightbar_suspend(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_lightbar_pm_ops, cros_ec_lightbar_suspend, cros_ec_lightbar_resume); +static const struct platform_device_id cros_ec_lightbar_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_lightbar_id); +static struct platform_driver cros_ec_lightbar_driver = { .driver = { .name =DRV_NAME ,@@ -602,10 +609,10 @@ static struct platform_driver cros_ec_lightbar_driver = { }, .probe = cros_ec_lightbar_probe, .remove_new = cros_ec_lightbar_remove, + .id_table = cros_ec_lightbar_id, };module_platform_driver (cros_ec_lightbar_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Expose the Chromebook Pixel's lightbar to userspace" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 13/18] platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 44 lines
--- drivers/platform/chrome/cros_ec_vbc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/cros_ec_vbc.c +8
-1@@ -6,6 +6,7 @@#include <linux/of.h> #include <linux/platform_device.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> @@ -133,16 +134,22 @@ static void cros_ec_vbc_remove(struct platform_device *pd) &cros_ec_vbc_attr_group); } +static const struct platform_device_id cros_ec_vbc_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, cros_ec_vbc_id); +static struct platform_driver cros_ec_vbc_driver = { .driver = { .name =DRV_NAME , }, .probe = cros_ec_vbc_probe, .remove_new = cros_ec_vbc_remove, + .id_table = cros_ec_vbc_id, };module_platform_driver (cros_ec_vbc_driver);MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Expose the vboot context nvram to userspace" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 9 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
Also shrink the name for fitting to [2].
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
[2]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 46 lines
--- drivers/platform/chrome/cros_kbd_led_backlight.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/platform/chrome/cros_kbd_led_backlight.c +9
-2@@ -9,6 +9,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/leds.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/of.h> #include <linux/platform_data/cros_ec_commands.h> @@ -247,17 +248,23 @@ static const struct of_device_id keyboard_led_of_match[] = {MODULE_DEVICE_TABLE (of, keyboard_led_of_match);#endif +static const struct platform_device_id keyboard_led_id[] = { + {"cros-keyboard-leds" ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, keyboard_led_id); +static struct platform_driver keyboard_led_driver = { .driver = { - .name ="chromeos-keyboard-leds" , + .name ="cros-keyboard-leds" , .acpi_match_table =ACPI_PTR (keyboard_led_acpi_match), .of_match_table =of_match_ptr (keyboard_led_of_match), }, .probe = keyboard_led_probe, + .id_table = keyboard_led_id, };module_platform_driver (keyboard_led_driver);MODULE_AUTHOR ("Simon Que <[email protected]>" );MODULE_DESCRIPTION ("ChromeOS Keyboard backlight LED Driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:chromeos-keyboard-leds" );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 15/18] platform/chrome: wilco_ec: telemetry: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 45 lines
--- drivers/platform/chrome/wilco_ec/telemetry.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/wilco_ec/telemetry.c +8
-1@@ -30,6 +30,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/fs.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/wilco-ec.h> #include <linux/platform_device.h> @@ -409,12 +410,19 @@ static void telem_device_remove(struct platform_device *pdev)put_device (&dev_data->dev); } +static const struct platform_device_id telem_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, telem_id); +static struct platform_driver telem_driver = { .probe = telem_device_probe, .remove_new = telem_device_remove, .driver = { .name =DRV_NAME , }, + .id_table = telem_id, };static int __init telem_module_init (void )@@ -466,4 +474,3 @@ module_exit(telem_module_exit);MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_DESCRIPTION ("Wilco EC telemetry driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 16/18] platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 44 lines
--- drivers/platform/chrome/wilco_ec/debugfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/wilco_ec/debugfs.c +8
-1@@ -10,6 +10,7 @@#include <linux/ctype.h> #include <linux/debugfs.h> #include <linux/fs.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/wilco-ec.h> #include <linux/platform_device.h> @@ -265,17 +266,23 @@ static void wilco_ec_debugfs_remove(struct platform_device *pdev)debugfs_remove_recursive (debug_info->dir); } +static const struct platform_device_id wilco_ec_debugfs_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, wilco_ec_debugfs_id); +static struct platform_driver wilco_ec_debugfs_driver = { .driver = { .name =DRV_NAME , }, .probe = wilco_ec_debugfs_probe, .remove_new = wilco_ec_debugfs_remove, + .id_table = wilco_ec_debugfs_id, };module_platform_driver (wilco_ec_debugfs_driver); -MODULE_ALIAS ("platform:" DRV_NAME );MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("Wilco EC debugfs driver" );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 17/18] platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS
In reply to Tzung-Bi ShihQuoted 4 lines · Tzung-Bi Shih
There is no platform driver in the file. Remove the redundant
MODULE_ALIAS().Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 17 lines
--- drivers/platform/chrome/wilco_ec/event.c | 1 - 1 file changed, 1 deletion(-)drivers/platform/chrome/wilco_ec/event.c +0
-1@@ -575,4 +575,3 @@ module_exit(event_module_exit);MODULE_AUTHOR ("Nick Crews <[email protected]>" );MODULE_DESCRIPTION ("Wilco EC ACPI event driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 6 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 46 lines
--- drivers/platform/chrome/wilco_ec/core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/platform/chrome/wilco_ec/core.c +8
-1@@ -10,6 +10,7 @@#include <linux/acpi.h> #include <linux/device.h> #include <linux/ioport.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_data/wilco-ec.h> #include <linux/platform_device.h> @@ -150,6 +151,12 @@ static const struct acpi_device_id wilco_ec_acpi_device_ids[] = { };MODULE_DEVICE_TABLE (acpi, wilco_ec_acpi_device_ids); +static const struct platform_device_id wilco_ec_id[] = { + {DRV_NAME ,0 }, + {} +}; +MODULE_DEVICE_TABLE (platform, wilco_ec_id); +static struct platform_driver wilco_ec_driver = { .driver = { .name =DRV_NAME ,@@ -157,6 +164,7 @@ static struct platform_driver wilco_ec_driver = { }, .probe = wilco_ec_probe, .remove_new = wilco_ec_remove, + .id_table = wilco_ec_id, };module_platform_driver (wilco_ec_driver);@@ -165,4 +173,3 @@ MODULE_AUTHOR("Nick Crews <[email protected]>");MODULE_AUTHOR ("Duncan Laurie <[email protected]>" );MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("ChromeOS Wilco Embedded Controller driver" ); -MODULE_ALIAS ("platform:" DRV_NAME );Signature · 1 line
2.44.0.478.gd926399ef9-goog
Re: [PATCH 07/18] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 7 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Re: [PATCH 05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 7 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
This series was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Hello:
This series was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Quoted 8 lines · On Fri, 29 Mar 2024 15:56:12 +0800 you wrote:
Inspired by [1]. Turn all
MODULE_ALIAS()in ChromeOS EC platform drivers into properplatform_device_idtable andMODULE_DEVICE_TABLE().The series is basically looking for drivers from:
-struct mfd_cellindrivers/mfd/cros_ec_dev.c.
- grep -RMODULE_ALIASdrivers/platform/chrome/.[...]
Here is the summary with links:
- [01/18] media: platform: cros-ec: provide ID table for avoiding fallback match (no matching commit)
- [02/18] gpio: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [03/18] rtc: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [04/18] platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match
https://git.kernel.org/chrome-platform/c/12e981d4d643 - [05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match (no matching commit) - [06/18] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/2b895835bd56 - [07/18] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/522b9910fa25 - [08/18] platform/chrome: cros_ec_chardev: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/e4d063f262df - [09/18] platform/chrome: cros_ec_debugfs: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/e26205b5728f - [10/18] platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/6e92e7f792eb - [11/18] power: supply: cros_pchg: provide ID table for avoiding fallback match (no matching commit) - [12/18] platform/chrome: cros_ec_lightbar: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/4f6b823b5caa - [13/18] platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/883030dae2d2 - [14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match (no matching commit) - [15/18] platform/chrome: wilco_ec: telemetry: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/b17dd111645b - [16/18] platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/c0649ca22fe8 - [17/18] platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS https://git.kernel.org/chrome-platform/c/fc87ba8e4525 - [18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/d8db2c6d7b0e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
This series was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Hello:
This series was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Quoted 8 lines · On Fri, 29 Mar 2024 15:56:12 +0800 you wrote:
Inspired by [1]. Turn all
MODULE_ALIAS()in ChromeOS EC platform drivers into properplatform_device_idtable andMODULE_DEVICE_TABLE().The series is basically looking for drivers from:
-struct mfd_cellindrivers/mfd/cros_ec_dev.c.
- grep -RMODULE_ALIASdrivers/platform/chrome/.[...]
Here is the summary with links:
- [01/18] media: platform: cros-ec: provide ID table for avoiding fallback match (no matching commit)
- [02/18] gpio: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [03/18] rtc: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [04/18] platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match
https://git.kernel.org/chrome-platform/c/12e981d4d643 - [05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match (no matching commit) - [06/18] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/2b895835bd56 - [07/18] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/522b9910fa25 - [08/18] platform/chrome: cros_ec_chardev: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/e4d063f262df - [09/18] platform/chrome: cros_ec_debugfs: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/e26205b5728f - [10/18] platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/6e92e7f792eb - [11/18] power: supply: cros_pchg: provide ID table for avoiding fallback match (no matching commit) - [12/18] platform/chrome: cros_ec_lightbar: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/4f6b823b5caa - [13/18] platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/883030dae2d2 - [14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match (no matching commit) - [15/18] platform/chrome: wilco_ec: telemetry: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/b17dd111645b - [16/18] platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/c0649ca22fe8 - [17/18] platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS https://git.kernel.org/chrome-platform/c/fc87ba8e4525 - [18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match https://git.kernel.org/chrome-platform/c/d8db2c6d7b0e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Tzung-Bi Shih
maintainerRe: [PATCH 14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
In reply to Krzysztof KozlowskiQuoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match.
Quoted 8 lines
Quoted 5 lines
Also shrink the name for fitting to [2].
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
[2]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608I think this should be two commits, where the first one is a fix (Fixes tag) for the size of name.
Splitted to 2 commits in v2[3]. It doesn't include a Fixes tag as the compiler complaints the oversize only if putting the original driver name to struct platform_device_id.
[3]: https://patchwork.kernel.org/project/chrome-platform/patch/[email protected]/
This series was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Hello:
This series was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Quoted 8 lines · On Fri, 29 Mar 2024 15:56:12 +0800 you wrote:
Inspired by [1]. Turn all
MODULE_ALIAS()in ChromeOS EC platform drivers into properplatform_device_idtable andMODULE_DEVICE_TABLE().The series is basically looking for drivers from:
-struct mfd_cellindrivers/mfd/cros_ec_dev.c.
- grep -RMODULE_ALIASdrivers/platform/chrome/.[...]
Here is the summary with links:
- [01/18] media: platform: cros-ec: provide ID table for avoiding fallback match (no matching commit)
- [02/18] gpio: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [03/18] rtc: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [04/18] platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match (no matching commit)
- [05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match (no matching commit)
- [06/18] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match (no matching commit)
- [07/18] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match (no matching commit)
- [08/18] platform/chrome: cros_ec_chardev: provide ID table for avoiding fallback match (no matching commit)
- [09/18] platform/chrome: cros_ec_debugfs: provide ID table for avoiding fallback match (no matching commit)
- [10/18] platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback match (no matching commit)
- [11/18] power: supply: cros_pchg: provide ID table for avoiding fallback match (no matching commit)
- [12/18] platform/chrome: cros_ec_lightbar: provide ID table for avoiding fallback match (no matching commit)
- [13/18] platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match (no matching commit)
- [14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
https://git.kernel.org/chrome-platform/c/d91ca83599cd
- [15/18] platform/chrome: wilco_ec: telemetry: provide ID table for avoiding fallback match (no matching commit)
- [16/18] platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match (no matching commit)
- [17/18] platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS
(no matching commit)
- [18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match (no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
This series was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Hello:
This series was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Quoted 8 lines · On Fri, 29 Mar 2024 15:56:12 +0800 you wrote:
Inspired by [1]. Turn all
MODULE_ALIAS()in ChromeOS EC platform drivers into properplatform_device_idtable andMODULE_DEVICE_TABLE().The series is basically looking for drivers from:
-struct mfd_cellindrivers/mfd/cros_ec_dev.c.
- grep -RMODULE_ALIASdrivers/platform/chrome/.[...]
Here is the summary with links:
- [01/18] media: platform: cros-ec: provide ID table for avoiding fallback match (no matching commit)
- [02/18] gpio: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [03/18] rtc: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [04/18] platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match (no matching commit)
- [05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match (no matching commit)
- [06/18] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match (no matching commit)
- [07/18] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match (no matching commit)
- [08/18] platform/chrome: cros_ec_chardev: provide ID table for avoiding fallback match (no matching commit)
- [09/18] platform/chrome: cros_ec_debugfs: provide ID table for avoiding fallback match (no matching commit)
- [10/18] platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback match (no matching commit)
- [11/18] power: supply: cros_pchg: provide ID table for avoiding fallback match (no matching commit)
- [12/18] platform/chrome: cros_ec_lightbar: provide ID table for avoiding fallback match (no matching commit)
- [13/18] platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match (no matching commit)
- [14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
https://git.kernel.org/chrome-platform/c/d91ca83599cd
- [15/18] platform/chrome: wilco_ec: telemetry: provide ID table for avoiding fallback match (no matching commit)
- [16/18] platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match (no matching commit)
- [17/18] platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS
(no matching commit)
- [18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match (no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH 02/18] gpio: cros-ec: provide ID table for avoiding fallback match
In reply to Tzung-Bi ShihQuoted 7 lines · Tzung-Bi Shih
Instead of using fallback driver name match, provide ID table[1] for the primary match. Also allow automatic module loading by adding
MODULE_DEVICE_TABLE().[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Signed-off-by Tzung-Bi Shih <[email protected]>
Yours,
Linus Walleij