From: Benson Leung <bleung@google.com>
To: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: bleung@chromium.org, groeck@chromium.org,
linus.walleij@linaro.org, brgl@bgdev.pl,
hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org,
alexandre.belloni@bootlin.com, chrome-platform@lists.linux.dev,
pmalani@chromium.org, linux-gpio@vger.kernel.org,
linux-media@vger.kernel.org, linux-pm@vger.kernel.org,
linux-rtc@vger.kernel.org, krzk@kernel.org
Subject: Re: [PATCH 05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match
Date: Fri, 29 Mar 2024 20:09:38 +0000 [thread overview]
Message-ID: <ZgcgAhgjTck9zUn1@google.com> (raw)
In-Reply-To: <20240329075630.2069474-6-tzungbi@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1843 bytes --]
On Fri, Mar 29, 2024 at 03:56:17PM +0800, 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
>
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
> ---
> 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
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-03-29 20:09 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 7:56 [PATCH 00/18] platform/chrome: provide ID table for avoiding fallback match Tzung-Bi Shih
2024-03-29 7:56 ` [PATCH 01/18] media: platform: cros-ec: " Tzung-Bi Shih
2024-03-29 12:15 ` Krzysztof Kozlowski
2024-03-29 20:05 ` Benson Leung
2024-03-29 7:56 ` [PATCH 02/18] gpio: " Tzung-Bi Shih
2024-03-29 12:15 ` Krzysztof Kozlowski
2024-03-29 20:06 ` Benson Leung
2024-04-04 11:32 ` Linus Walleij
2024-03-29 7:56 ` [PATCH 03/18] rtc: " Tzung-Bi Shih
2024-03-29 12:15 ` Krzysztof Kozlowski
2024-03-29 15:00 ` (subset) " Alexandre Belloni
2024-03-29 20:07 ` Benson Leung
2024-03-29 7:56 ` [PATCH 04/18] platform/chrome: cros_ec_sensorhub: " Tzung-Bi Shih
2024-03-29 12:16 ` Krzysztof Kozlowski
2024-03-29 20:08 ` Benson Leung
2024-03-29 7:56 ` [PATCH 05/18] power: supply: cros_usbpd: " Tzung-Bi Shih
2024-03-29 12:18 ` Krzysztof Kozlowski
2024-03-29 20:09 ` Benson Leung [this message]
2024-03-29 23:03 ` Prashant Malani
2024-03-29 7:56 ` [PATCH 06/18] platform/chrome: cros_usbpd_logger: " Tzung-Bi Shih
2024-03-29 15:50 ` Krzysztof Kozlowski
2024-03-29 20:11 ` Benson Leung
2024-03-29 7:56 ` [PATCH 07/18] platform/chrome: cros_usbpd_notify: " Tzung-Bi Shih
2024-03-29 15:50 ` Krzysztof Kozlowski
2024-03-29 20:13 ` Benson Leung
2024-03-29 22:06 ` Prashant Malani
2024-03-29 7:56 ` [PATCH 08/18] platform/chrome: cros_ec_chardev: " Tzung-Bi Shih
2024-03-29 15:50 ` Krzysztof Kozlowski
2024-03-29 20:13 ` Benson Leung
2024-03-29 7:56 ` [PATCH 09/18] platform/chrome: cros_ec_debugfs: " Tzung-Bi Shih
2024-03-29 15:51 ` Krzysztof Kozlowski
2024-03-29 20:14 ` Benson Leung
2024-03-29 7:56 ` [PATCH 10/18] platform/chrome: cros_ec_sysfs: " Tzung-Bi Shih
2024-03-29 12:37 ` Krzysztof Kozlowski
2024-03-29 20:15 ` Benson Leung
2024-03-29 7:56 ` [PATCH 11/18] power: supply: cros_pchg: " Tzung-Bi Shih
2024-03-29 15:50 ` Krzysztof Kozlowski
2024-03-29 20:16 ` Benson Leung
2024-03-29 7:56 ` [PATCH 12/18] platform/chrome: cros_ec_lightbar: " Tzung-Bi Shih
2024-03-29 15:51 ` Krzysztof Kozlowski
2024-03-29 20:18 ` Benson Leung
2024-03-29 7:56 ` [PATCH 13/18] platform/chrome: cros_ec_vbc: " Tzung-Bi Shih
2024-03-29 15:55 ` Krzysztof Kozlowski
2024-03-29 20:19 ` Benson Leung
2024-03-29 7:56 ` [PATCH 14/18] platform/chrome: cros_kbd_led_backlight: " Tzung-Bi Shih
2024-03-29 15:53 ` Krzysztof Kozlowski
2024-04-01 3:11 ` Tzung-Bi Shih
2024-03-29 20:20 ` Benson Leung
2024-03-29 7:56 ` [PATCH 15/18] platform/chrome: wilco_ec: telemetry: " Tzung-Bi Shih
2024-03-29 15:52 ` Krzysztof Kozlowski
2024-03-29 20:21 ` Benson Leung
2024-03-29 7:56 ` [PATCH 16/18] platform/chrome: wilco_ec: debugfs: " Tzung-Bi Shih
2024-03-29 15:52 ` Krzysztof Kozlowski
2024-03-29 20:21 ` Benson Leung
2024-03-29 7:56 ` [PATCH 17/18] platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS Tzung-Bi Shih
2024-03-29 15:55 ` Krzysztof Kozlowski
2024-03-29 20:22 ` Benson Leung
2024-03-29 7:56 ` [PATCH 18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match Tzung-Bi Shih
2024-03-29 15:51 ` Krzysztof Kozlowski
2024-03-29 20:23 ` Benson Leung
2024-04-01 2:30 ` [PATCH 00/18] platform/chrome: " patchwork-bot+chrome-platform
2024-04-01 2:30 ` patchwork-bot+chrome-platform
2024-04-03 7:20 ` patchwork-bot+chrome-platform
2024-04-03 7:20 ` patchwork-bot+chrome-platform
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZgcgAhgjTck9zUn1@google.com \
--to=bleung@google.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bleung@chromium.org \
--cc=brgl@bgdev.pl \
--cc=chrome-platform@lists.linux.dev \
--cc=groeck@chromium.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=pmalani@chromium.org \
--cc=sre@kernel.org \
--cc=tzungbi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).