All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
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 11/18] power: supply: cros_pchg: provide ID table for avoiding fallback match
Date: Fri, 29 Mar 2024 20:16:28 +0000	[thread overview]
Message-ID: <ZgchnIUMSnbpIFit@google.com> (raw)
In-Reply-To: <20240329075630.2069474-12-tzungbi@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1761 bytes --]

On Fri, Mar 29, 2024 at 03:56:23PM +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_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
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2024-03-29 20:16 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
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 [this message]
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=ZgchnIUMSnbpIFit@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.