linux-gpio.vger.kernel.org archive mirror
 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 14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match
Date: Fri, 29 Mar 2024 20:20:00 +0000	[thread overview]
Message-ID: <ZgcicEucsO_vcVqk@google.com> (raw)
In-Reply-To: <20240329075630.2069474-15-tzungbi@kernel.org>

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

On Fri, Mar 29, 2024 at 03:56:26PM +0800, Tzung-Bi Shih wrote:
> Instead of using fallback driver name match, provide ID table[1] for the
> primary match.
> 
> Also shrink the name for fitting to [2].
> 
> [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
> [2]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608
> 
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>

Reviewed-by: Benson Leung <bleung@chromium.org>

> ---
>  drivers/platform/chrome/cros_kbd_led_backlight.c | 11 +++++++++--
>  1 file changed, 9 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..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,17 +248,23 @@ 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	= "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),
>  	},
>  	.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:chromeos-keyboard-leds");
> -- 
> 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:20 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 [this message]
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=ZgcicEucsO_vcVqk@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).