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 18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match
Date: Fri, 29 Mar 2024 20:23:10 +0000	[thread overview]
Message-ID: <ZgcjLj9weWwqvtf3@google.com> (raw)
In-Reply-To: <20240329075630.2069474-19-tzungbi@kernel.org>

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

On Fri, Mar 29, 2024 at 03:56:30PM +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/platform/chrome/wilco_ec/core.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/chrome/wilco_ec/core.c b/drivers/platform/chrome/wilco_ec/core.c
> index 9b59a1bed286..3e6b6cd81a9b 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);
> -- 
> 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:23 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
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 [this message]
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=ZgcjLj9weWwqvtf3@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.