* [PATCH v2 0/6] provide ID table for avoiding fallback match
@ 2024-04-01 3:00 Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 1/6] media: platform: cros-ec: " Tzung-Bi Shih
` (8 more replies)
0 siblings, 9 replies; 16+ messages in thread
From: Tzung-Bi Shih @ 2024-04-01 3:00 UTC (permalink / raw
To: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre
Cc: tzungbi, chrome-platform, pmalani, linux-gpio, linux-media,
linux-pm, krzk
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/.
[1]: https://lore.kernel.org/chrome-platform/20240325-public-ucsi-h-v2-0-a6d716968bb1@chromium.org/T/#m2cc7d6f770cf0a48fb537bbaed655169c974f067
Changes from v1 (https://patchwork.kernel.org/project/chrome-platform/cover/20240329075630.2069474-1-tzungbi@kernel.org/):
- Split "platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding
fallback match" into 2 commits.
- Remove patches that have been applied.
Tzung-Bi Shih (6):
media: platform: cros-ec: provide ID table for avoiding fallback match
gpio: cros-ec: provide ID table for avoiding fallback match
power: supply: cros_usbpd: provide ID table for avoiding fallback
match
power: supply: cros_pchg: provide ID table for avoiding fallback match
platform/chrome: cros_kbd_led_backlight: shrink the driver name
platform/chrome: cros_kbd_led_backlight: 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_kbd_led_backlight.c | 11 +++++++++--
drivers/power/supply/cros_peripheral_charger.c | 11 +++++++++--
drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++--
5 files changed, 43 insertions(+), 7 deletions(-)
--
2.44.0.478.gd926399ef9-goog
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/6] media: platform: cros-ec: provide ID table for avoiding fallback match
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
@ 2024-04-01 3:00 ` Tzung-Bi Shih
2024-04-08 7:36 ` Hans Verkuil
2024-04-01 3:00 ` [PATCH v2 2/6] gpio: " Tzung-Bi Shih
` (7 subsequent siblings)
8 siblings, 1 reply; 16+ messages in thread
From: Tzung-Bi Shih @ 2024-04-01 3:00 UTC (permalink / raw
To: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre
Cc: tzungbi, chrome-platform, pmalani, linux-gpio, linux-media,
linux-pm, krzk, Krzysztof Kozlowski
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
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
Changes from v1:
- No code changes.
- Add R-b tags.
drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
index 48ed2993d2f0..8fbbb4091455 100644
--- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
+++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
@@ -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 <narmstrong@baylibre.com>");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:" DRV_NAME);
--
2.44.0.478.gd926399ef9-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/6] gpio: cros-ec: provide ID table for avoiding fallback match
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 1/6] media: platform: cros-ec: " Tzung-Bi Shih
@ 2024-04-01 3:00 ` Tzung-Bi Shih
2024-04-02 8:58 ` Bartosz Golaszewski
2024-04-01 3:00 ` [PATCH v2 3/6] power: supply: cros_usbpd: " Tzung-Bi Shih
` (6 subsequent siblings)
8 siblings, 1 reply; 16+ messages in thread
From: Tzung-Bi Shih @ 2024-04-01 3:00 UTC (permalink / raw
To: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre
Cc: tzungbi, chrome-platform, pmalani, linux-gpio, linux-media,
linux-pm, krzk, Krzysztof Kozlowski
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
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
Changes from v1:
- No code changes.
- Add R-b tags.
drivers/gpio/gpio-cros-ec.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpio/gpio-cros-ec.c b/drivers/gpio/gpio-cros-ec.c
index 842e1c060414..0c09bb54dc0c 100644
--- a/drivers/gpio/gpio-cros-ec.c
+++ b/drivers/gpio/gpio-cros-ec.c
@@ -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);
--
2.44.0.478.gd926399ef9-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 3/6] power: supply: cros_usbpd: provide ID table for avoiding fallback match
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 1/6] media: platform: cros-ec: " Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 2/6] gpio: " Tzung-Bi Shih
@ 2024-04-01 3:00 ` Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 4/6] power: supply: cros_pchg: " Tzung-Bi Shih
` (5 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Tzung-Bi Shih @ 2024-04-01 3:00 UTC (permalink / raw
To: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre
Cc: tzungbi, chrome-platform, pmalani, linux-gpio, linux-media,
linux-pm, krzk, Krzysztof Kozlowski
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
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
Changes from v1:
- No code changes.
- Add R-b tags.
drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c
index b6c96376776a..8008e31c0c09 100644
--- a/drivers/power/supply/cros_usbpd-charger.c
+++ b/drivers/power/supply/cros_usbpd-charger.c
@@ -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);
--
2.44.0.478.gd926399ef9-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 4/6] power: supply: cros_pchg: provide ID table for avoiding fallback match
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
` (2 preceding siblings ...)
2024-04-01 3:00 ` [PATCH v2 3/6] power: supply: cros_usbpd: " Tzung-Bi Shih
@ 2024-04-01 3:00 ` Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name Tzung-Bi Shih
` (4 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Tzung-Bi Shih @ 2024-04-01 3:00 UTC (permalink / raw
To: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre
Cc: tzungbi, chrome-platform, pmalani, linux-gpio, linux-media,
linux-pm, krzk
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
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
Changes from v1:
- No code changes.
- Add R-b tags.
drivers/power/supply/cros_peripheral_charger.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/power/supply/cros_peripheral_charger.c b/drivers/power/supply/cros_peripheral_charger.c
index a204f2355be4..d406f2a78449 100644
--- a/drivers/power/supply/cros_peripheral_charger.c
+++ b/drivers/power/supply/cros_peripheral_charger.c
@@ -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);
--
2.44.0.478.gd926399ef9-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
` (3 preceding siblings ...)
2024-04-01 3:00 ` [PATCH v2 4/6] power: supply: cros_pchg: " Tzung-Bi Shih
@ 2024-04-01 3:00 ` Tzung-Bi Shih
2024-04-01 10:02 ` Krzysztof Kozlowski
2024-04-01 3:00 ` [PATCH v2 6/6] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match Tzung-Bi Shih
` (3 subsequent siblings)
8 siblings, 1 reply; 16+ messages in thread
From: Tzung-Bi Shih @ 2024-04-01 3:00 UTC (permalink / raw
To: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre
Cc: tzungbi, chrome-platform, pmalani, linux-gpio, linux-media,
linux-pm, krzk
Prepare to provide platform_device_id table. Shrink the driver name for
fitting to [1].
[1]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
Changes from v1 (https://patchwork.kernel.org/project/chrome-platform/patch/20240329075630.2069474-15-tzungbi@kernel.org/):
- Split from "platform/chrome: cros_kbd_led_backlight: provide ID table for
avoiding fallback match".
- Add R-b tags.
drivers/platform/chrome/cros_kbd_led_backlight.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/chrome/cros_kbd_led_backlight.c b/drivers/platform/chrome/cros_kbd_led_backlight.c
index 793fd3f1015d..814846a66e95 100644
--- a/drivers/platform/chrome/cros_kbd_led_backlight.c
+++ b/drivers/platform/chrome/cros_kbd_led_backlight.c
@@ -249,7 +249,7 @@ MODULE_DEVICE_TABLE(of, keyboard_led_of_match);
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),
},
@@ -260,4 +260,4 @@ module_platform_driver(keyboard_led_driver);
MODULE_AUTHOR("Simon Que <sque@chromium.org>");
MODULE_DESCRIPTION("ChromeOS Keyboard backlight LED Driver");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:chromeos-keyboard-leds");
+MODULE_ALIAS("platform:cros-keyboard-leds");
--
2.44.0.478.gd926399ef9-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 6/6] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
` (4 preceding siblings ...)
2024-04-01 3:00 ` [PATCH v2 5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name Tzung-Bi Shih
@ 2024-04-01 3:00 ` Tzung-Bi Shih
2024-04-01 10:03 ` Krzysztof Kozlowski
2024-04-01 9:45 ` (subset) [PATCH v2 0/6] " Sebastian Reichel
` (2 subsequent siblings)
8 siblings, 1 reply; 16+ messages in thread
From: Tzung-Bi Shih @ 2024-04-01 3:00 UTC (permalink / raw
To: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre
Cc: tzungbi, chrome-platform, pmalani, linux-gpio, linux-media,
linux-pm, krzk
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
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
Changes from v1 (https://patchwork.kernel.org/project/chrome-platform/patch/20240329075630.2069474-15-tzungbi@kernel.org/):
- Split from "platform/chrome: cros_kbd_led_backlight: provide ID table for
avoiding fallback match".
- Add R-b tags.
drivers/platform/chrome/cros_kbd_led_backlight.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/cros_kbd_led_backlight.c b/drivers/platform/chrome/cros_kbd_led_backlight.c
index 814846a66e95..b83e4f328620 100644
--- a/drivers/platform/chrome/cros_kbd_led_backlight.c
+++ b/drivers/platform/chrome/cros_kbd_led_backlight.c
@@ -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,6 +248,12 @@ 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 = "cros-keyboard-leds",
@@ -254,10 +261,10 @@ static struct platform_driver keyboard_led_driver = {
.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 <sque@chromium.org>");
MODULE_DESCRIPTION("ChromeOS Keyboard backlight LED Driver");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:cros-keyboard-leds");
--
2.44.0.478.gd926399ef9-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: (subset) [PATCH v2 0/6] provide ID table for avoiding fallback match
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
` (5 preceding siblings ...)
2024-04-01 3:00 ` [PATCH v2 6/6] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match Tzung-Bi Shih
@ 2024-04-01 9:45 ` Sebastian Reichel
2024-05-27 2:55 ` patchwork-bot+chrome-platform
2024-05-27 3:07 ` patchwork-bot+chrome-platform
8 siblings, 0 replies; 16+ messages in thread
From: Sebastian Reichel @ 2024-04-01 9:45 UTC (permalink / raw
To: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre,
Tzung-Bi Shih
Cc: chrome-platform, pmalani, linux-gpio, linux-media, linux-pm, krzk
On Mon, 01 Apr 2024 11:00:46 +0800, Tzung-Bi Shih wrote:
> 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/.
>
> [...]
Applied, thanks!
[3/6] power: supply: cros_usbpd: provide ID table for avoiding fallback match
commit: 0f8678c34cbfdc63569a9b0ede1fe235ec6ec693
[4/6] power: supply: cros_pchg: provide ID table for avoiding fallback match
commit: d6486a13665e9df5b503a375e18226e1824f21d3
Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name
2024-04-01 3:00 ` [PATCH v2 5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name Tzung-Bi Shih
@ 2024-04-01 10:02 ` Krzysztof Kozlowski
2024-04-01 10:19 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-01 10:02 UTC (permalink / raw
To: Tzung-Bi Shih, bleung, groeck, linus.walleij, brgl,
hverkuil-cisco, mchehab, sre
Cc: chrome-platform, pmalani, linux-gpio, linux-media, linux-pm
On 01/04/2024 05:00, Tzung-Bi Shih wrote:
> Prepare to provide platform_device_id table. Shrink the driver name for
> fitting to [1].
Instead of linking to external resources, please describe the problem
and the bug you are fixing here.
>
> [1]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608
>
> Reviewed-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Missing fixes tag and Cc-stable.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 6/6] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
2024-04-01 3:00 ` [PATCH v2 6/6] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match Tzung-Bi Shih
@ 2024-04-01 10:03 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-01 10:03 UTC (permalink / raw
To: Tzung-Bi Shih, bleung, groeck, linus.walleij, brgl,
hverkuil-cisco, mchehab, sre
Cc: chrome-platform, pmalani, linux-gpio, linux-media, linux-pm
On 01/04/2024 05:00, Tzung-Bi Shih wrote:
> 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
>
> Reviewed-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name
2024-04-01 10:02 ` Krzysztof Kozlowski
@ 2024-04-01 10:19 ` Krzysztof Kozlowski
2024-04-01 10:42 ` Tzung-Bi Shih
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-01 10:19 UTC (permalink / raw
To: Tzung-Bi Shih, bleung, groeck, linus.walleij, brgl,
hverkuil-cisco, mchehab, sre
Cc: chrome-platform, pmalani, linux-gpio, linux-media, linux-pm
On 01/04/2024 12:02, Krzysztof Kozlowski wrote:
> On 01/04/2024 05:00, Tzung-Bi Shih wrote:
>> Prepare to provide platform_device_id table. Shrink the driver name for
>> fitting to [1].
>
> Instead of linking to external resources, please describe the problem
> and the bug you are fixing here.
>
>>
>> [1]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608
>>
>> Reviewed-by: Benson Leung <bleung@chromium.org>
>> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
>
> Missing fixes tag and Cc-stable.
Ah, now I read your answer to v1 discussion. So this was not a bug in
the first place? Hm, then probably my comment was not really correct and
we should not split it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name
2024-04-01 10:19 ` Krzysztof Kozlowski
@ 2024-04-01 10:42 ` Tzung-Bi Shih
0 siblings, 0 replies; 16+ messages in thread
From: Tzung-Bi Shih @ 2024-04-01 10:42 UTC (permalink / raw
To: Krzysztof Kozlowski
Cc: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre,
chrome-platform, pmalani, linux-gpio, linux-media, linux-pm
On Mon, Apr 01, 2024 at 12:19:16PM +0200, Krzysztof Kozlowski wrote:
> On 01/04/2024 12:02, Krzysztof Kozlowski wrote:
> > On 01/04/2024 05:00, Tzung-Bi Shih wrote:
> >> Prepare to provide platform_device_id table. Shrink the driver name for
> >> fitting to [1].
> >
> > Instead of linking to external resources, please describe the problem
> > and the bug you are fixing here.
> >
> >>
> >> [1]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608
> >>
> >> Reviewed-by: Benson Leung <bleung@chromium.org>
> >> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
> >
> > Missing fixes tag and Cc-stable.
>
> Ah, now I read your answer to v1 discussion. So this was not a bug in
> the first place? Hm, then probably my comment was not really correct and
> we should not split it.
Correct, this wasn't a bug in the first place. Only if moving the string into
struct platform_device_id, the compiler emits errors about the oversize.
I'm fine with both versions. But let's go back to adopt v1 (no split) if no
strong objections.
Thanks a lot for your review again.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/6] gpio: cros-ec: provide ID table for avoiding fallback match
2024-04-01 3:00 ` [PATCH v2 2/6] gpio: " Tzung-Bi Shih
@ 2024-04-02 8:58 ` Bartosz Golaszewski
0 siblings, 0 replies; 16+ messages in thread
From: Bartosz Golaszewski @ 2024-04-02 8:58 UTC (permalink / raw
To: Tzung-Bi Shih
Cc: bleung, groeck, linus.walleij, hverkuil-cisco, mchehab, sre,
chrome-platform, pmalani, linux-gpio, linux-media, linux-pm, krzk,
Krzysztof Kozlowski
On Mon, Apr 1, 2024 at 5:01 AM Tzung-Bi Shih <tzungbi@kernel.org> wrote:
>
> 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
>
> Reviewed-by: Benson Leung <bleung@chromium.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
> ---
> Changes from v1:
> - No code changes.
> - Add R-b tags.
>
> drivers/gpio/gpio-cros-ec.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpio/gpio-cros-ec.c b/drivers/gpio/gpio-cros-ec.c
> index 842e1c060414..0c09bb54dc0c 100644
> --- a/drivers/gpio/gpio-cros-ec.c
> +++ b/drivers/gpio/gpio-cros-ec.c
> @@ -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);
>
> --
> 2.44.0.478.gd926399ef9-goog
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/6] media: platform: cros-ec: provide ID table for avoiding fallback match
2024-04-01 3:00 ` [PATCH v2 1/6] media: platform: cros-ec: " Tzung-Bi Shih
@ 2024-04-08 7:36 ` Hans Verkuil
0 siblings, 0 replies; 16+ messages in thread
From: Hans Verkuil @ 2024-04-08 7:36 UTC (permalink / raw
To: Tzung-Bi Shih, bleung, groeck, linus.walleij, brgl, mchehab, sre
Cc: chrome-platform, pmalani, linux-gpio, linux-media, linux-pm, krzk,
Krzysztof Kozlowski
On 01/04/2024 05:00, Tzung-Bi Shih wrote:
> 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
>
> Reviewed-by: Benson Leung <bleung@chromium.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Looks OK, I'll queue this patch up for v6.10.
Regards,
Hans
> ---
> Changes from v1:
> - No code changes.
> - Add R-b tags.
>
> drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> index 48ed2993d2f0..8fbbb4091455 100644
> --- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> +++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> @@ -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 <narmstrong@baylibre.com>");
> MODULE_LICENSE("GPL");
> -MODULE_ALIAS("platform:" DRV_NAME);
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/6] provide ID table for avoiding fallback match
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
` (6 preceding siblings ...)
2024-04-01 9:45 ` (subset) [PATCH v2 0/6] " Sebastian Reichel
@ 2024-05-27 2:55 ` patchwork-bot+chrome-platform
2024-05-27 3:07 ` patchwork-bot+chrome-platform
8 siblings, 0 replies; 16+ messages in thread
From: patchwork-bot+chrome-platform @ 2024-05-27 2:55 UTC (permalink / raw
To: Tzung-Bi Shih
Cc: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre,
chrome-platform, pmalani, linux-gpio, linux-media, linux-pm, krzk
Hello:
This series was applied to chrome-platform/linux.git (for-kernelci)
by Sebastian Reichel <sebastian.reichel@collabora.com>:
On Mon, 1 Apr 2024 11:00:46 +0800 you wrote:
> 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/.
>
> [...]
Here is the summary with links:
- [v2,1/6] media: platform: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [v2,2/6] gpio: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [v2,3/6] power: supply: cros_usbpd: provide ID table for avoiding fallback match
https://git.kernel.org/chrome-platform/c/0f8678c34cbf
- [v2,4/6] power: supply: cros_pchg: provide ID table for avoiding fallback match
https://git.kernel.org/chrome-platform/c/d6486a13665e
- [v2,5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name
(no matching commit)
- [v2,6/6] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/6] provide ID table for avoiding fallback match
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
` (7 preceding siblings ...)
2024-05-27 2:55 ` patchwork-bot+chrome-platform
@ 2024-05-27 3:07 ` patchwork-bot+chrome-platform
8 siblings, 0 replies; 16+ messages in thread
From: patchwork-bot+chrome-platform @ 2024-05-27 3:07 UTC (permalink / raw
To: Tzung-Bi Shih
Cc: bleung, groeck, linus.walleij, brgl, hverkuil-cisco, mchehab, sre,
chrome-platform, pmalani, linux-gpio, linux-media, linux-pm, krzk
Hello:
This series was applied to chrome-platform/linux.git (for-next)
by Sebastian Reichel <sebastian.reichel@collabora.com>:
On Mon, 1 Apr 2024 11:00:46 +0800 you wrote:
> 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/.
>
> [...]
Here is the summary with links:
- [v2,1/6] media: platform: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [v2,2/6] gpio: cros-ec: provide ID table for avoiding fallback match
(no matching commit)
- [v2,3/6] power: supply: cros_usbpd: provide ID table for avoiding fallback match
https://git.kernel.org/chrome-platform/c/0f8678c34cbf
- [v2,4/6] power: supply: cros_pchg: provide ID table for avoiding fallback match
https://git.kernel.org/chrome-platform/c/d6486a13665e
- [v2,5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name
(no matching commit)
- [v2,6/6] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-05-27 3:07 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-01 3:00 [PATCH v2 0/6] provide ID table for avoiding fallback match Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 1/6] media: platform: cros-ec: " Tzung-Bi Shih
2024-04-08 7:36 ` Hans Verkuil
2024-04-01 3:00 ` [PATCH v2 2/6] gpio: " Tzung-Bi Shih
2024-04-02 8:58 ` Bartosz Golaszewski
2024-04-01 3:00 ` [PATCH v2 3/6] power: supply: cros_usbpd: " Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 4/6] power: supply: cros_pchg: " Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 5/6] platform/chrome: cros_kbd_led_backlight: shrink the driver name Tzung-Bi Shih
2024-04-01 10:02 ` Krzysztof Kozlowski
2024-04-01 10:19 ` Krzysztof Kozlowski
2024-04-01 10:42 ` Tzung-Bi Shih
2024-04-01 3:00 ` [PATCH v2 6/6] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match Tzung-Bi Shih
2024-04-01 10:03 ` Krzysztof Kozlowski
2024-04-01 9:45 ` (subset) [PATCH v2 0/6] " Sebastian Reichel
2024-05-27 2:55 ` patchwork-bot+chrome-platform
2024-05-27 3:07 ` patchwork-bot+chrome-platform
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).