diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:17:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:17:46 +0000 |
commit | 7f3a4257159dea8e7ef66d1a539dc6df708b8ed3 (patch) | |
tree | bcc69b5f4609f348fac49e2f59e210b29eaea783 /drivers/platform/chrome/wilco_ec | |
parent | Adding upstream version 6.9.12. (diff) | |
download | linux-7f3a4257159dea8e7ef66d1a539dc6df708b8ed3.tar.xz linux-7f3a4257159dea8e7ef66d1a539dc6df708b8ed3.zip |
Adding upstream version 6.10.3.upstream/6.10.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/platform/chrome/wilco_ec')
-rw-r--r-- | drivers/platform/chrome/wilco_ec/Kconfig | 1 | ||||
-rw-r--r-- | drivers/platform/chrome/wilco_ec/core.c | 9 | ||||
-rw-r--r-- | drivers/platform/chrome/wilco_ec/debugfs.c | 9 | ||||
-rw-r--r-- | drivers/platform/chrome/wilco_ec/event.c | 2 | ||||
-rw-r--r-- | drivers/platform/chrome/wilco_ec/sysfs.c | 2 | ||||
-rw-r--r-- | drivers/platform/chrome/wilco_ec/telemetry.c | 9 |
6 files changed, 26 insertions, 6 deletions
diff --git a/drivers/platform/chrome/wilco_ec/Kconfig b/drivers/platform/chrome/wilco_ec/Kconfig index 49e8530ca0..d1648fb099 100644 --- a/drivers/platform/chrome/wilco_ec/Kconfig +++ b/drivers/platform/chrome/wilco_ec/Kconfig @@ -3,6 +3,7 @@ config WILCO_EC tristate "ChromeOS Wilco Embedded Controller" depends on X86 || COMPILE_TEST depends on ACPI && CROS_EC_LPC && LEDS_CLASS + depends on HAS_IOPORT help If you say Y here, you get support for talking to the ChromeOS Wilco EC over an eSPI bus. This uses a simple byte-level protocol diff --git a/drivers/platform/chrome/wilco_ec/core.c b/drivers/platform/chrome/wilco_ec/core.c index 9b59a1bed2..3e6b6cd81a 100644 --- a/drivers/platform/chrome/wilco_ec/core.c +++ b/drivers/platform/chrome/wilco_ec/core.c @@ -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 <ncrews@chromium.org>"); MODULE_AUTHOR("Duncan Laurie <dlaurie@chromium.org>"); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("ChromeOS Wilco Embedded Controller driver"); -MODULE_ALIAS("platform:" DRV_NAME); diff --git a/drivers/platform/chrome/wilco_ec/debugfs.c b/drivers/platform/chrome/wilco_ec/debugfs.c index 93c11f81ca..983f2fa44b 100644 --- a/drivers/platform/chrome/wilco_ec/debugfs.c +++ b/drivers/platform/chrome/wilco_ec/debugfs.c @@ -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 <ncrews@chromium.org>"); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Wilco EC debugfs driver"); diff --git a/drivers/platform/chrome/wilco_ec/event.c b/drivers/platform/chrome/wilco_ec/event.c index 13291fb421..bd1fb53ba0 100644 --- a/drivers/platform/chrome/wilco_ec/event.c +++ b/drivers/platform/chrome/wilco_ec/event.c @@ -523,7 +523,6 @@ static struct acpi_driver event_driver = { .notify = event_device_notify, .remove = event_device_remove, }, - .owner = THIS_MODULE, }; static int __init event_module_init(void) @@ -575,4 +574,3 @@ module_exit(event_module_exit); MODULE_AUTHOR("Nick Crews <ncrews@chromium.org>"); MODULE_DESCRIPTION("Wilco EC ACPI event driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRV_NAME); diff --git a/drivers/platform/chrome/wilco_ec/sysfs.c b/drivers/platform/chrome/wilco_ec/sysfs.c index 893c59dde3..d44c435596 100644 --- a/drivers/platform/chrome/wilco_ec/sysfs.c +++ b/drivers/platform/chrome/wilco_ec/sysfs.c @@ -192,7 +192,7 @@ static ssize_t usb_charge_show(struct device *dev, if (ret < 0) return ret; - return sprintf(buf, "%d\n", rs.val); + return sysfs_emit(buf, "%d\n", rs.val); } static ssize_t usb_charge_store(struct device *dev, diff --git a/drivers/platform/chrome/wilco_ec/telemetry.c b/drivers/platform/chrome/wilco_ec/telemetry.c index b7c616f3d1..21d4cbbb00 100644 --- a/drivers/platform/chrome/wilco_ec/telemetry.c +++ b/drivers/platform/chrome/wilco_ec/telemetry.c @@ -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 <ncrews@chromium.org>"); MODULE_DESCRIPTION("Wilco EC telemetry driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRV_NAME); |