linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evan McClain <aeroevan@gmail.com>
To: Jacek Anaszewski <j.anaszewski@samsung.com>,
	Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org, Simon Que <sque@chromium.org>
Cc: Duncan Laurie <dlaurie@chromium.org>, Evan McClain <aeroevan@gmail.com>
Subject: [PATCH 2/2] leds: leds-chromeos-keyboard: Add ACPI _HID probing
Date: Wed, 13 Jan 2016 21:23:12 -0500	[thread overview]
Message-ID: <1452738192-3496-1-git-send-email-aeroevan@gmail.com> (raw)
In-Reply-To: <1452625899-13306-1-git-send-email-sque@chromium.org>

From: Duncan Laurie <dlaurie@chromium.org>

Add an ACPI ID to probe the keyboard backlight driver without
needing a platform level driver to force it on.

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Evan McClain <aeroevan@gmail.com>
---
 drivers/leds/leds-chromeos-keyboard.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/leds/leds-chromeos-keyboard.c b/drivers/leds/leds-chromeos-keyboard.c
index 32d70c0..6a6ff75 100644
--- a/drivers/leds/leds-chromeos-keyboard.c
+++ b/drivers/leds/leds-chromeos-keyboard.c
@@ -98,10 +98,17 @@ static int keyboard_led_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct acpi_device_id keyboard_led_id[] = {
+	{ "GOOG0002", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, keyboard_led_id);
+
 static struct platform_driver keyboard_led_driver = {
 	.driver		= {
 		.name	= "chromeos-keyboard-leds",
 		.owner	= THIS_MODULE,
+		.acpi_match_table = ACPI_PTR(keyboard_led_id),
 	},
 	.probe		= keyboard_led_probe,
 	.remove		= keyboard_led_remove,
-- 
2.5.0

  reply	other threads:[~2016-01-14  2:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 19:11 [PATCH v3] leds: Add Chrome OS keyboard LEDs driver Simon Que
2016-01-14  2:23 ` Evan McClain [this message]
2016-02-21 19:07   ` [PATCH] leds: chromeos: Use devm_led_classdev_register Evan McClain
2016-02-22  8:04     ` Jacek Anaszewski
2016-01-21 10:23 ` [PATCH v3] leds: Add Chrome OS keyboard LEDs driver Jacek Anaszewski

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=1452738192-3496-1-git-send-email-aeroevan@gmail.com \
    --to=aeroevan@gmail.com \
    --cc=cooloney@gmail.com \
    --cc=dlaurie@chromium.org \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=sque@chromium.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).