From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60894C433EF for ; Fri, 18 Mar 2022 17:52:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233889AbiCRRx6 (ORCPT ); Fri, 18 Mar 2022 13:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233194AbiCRRx6 (ORCPT ); Fri, 18 Mar 2022 13:53:58 -0400 X-Greylist: delayed 1499 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 18 Mar 2022 10:52:39 PDT Received: from gateway34.websitewelcome.com (gateway34.websitewelcome.com [192.185.148.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B2CE30DC58 for ; Fri, 18 Mar 2022 10:52:38 -0700 (PDT) Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 33230AD080 for ; Fri, 18 Mar 2022 12:04:45 -0500 (CDT) Received: from 162-215-252-75.unifiedlayer.com ([208.91.199.152]) by cmsmtp with SMTP id VG1tnkcCE22u3VG1tnG5ON; Fri, 18 Mar 2022 12:04:45 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+7bhs7zhD5PPrvce4gtrEYkBiXq9H8QorV7mnne5BjE=; b=WxZf40Ksd6u/2u8WEs8r3af6Tl ZGSLb19+UH6xG3woBvQ+rL5RS5dR2uRKxUQRLIeMqTt6PIflrqD0uCut/BawBnOkMhcCQQbfK6mCL 9UqcjYcbQXNvne+G5m8TbajMbkvwd3sXKM5llDaUx63uYEOldN6UpqR0T29Ji/8zOZgUY9+CtnS80 IaG0id7h3s0lD5lMBekURuEf0E3UHNryt1U+nlOFPdh2lFvJzgE1rv7JuF1LS0laqkHjTsV9dvjjP IxaA5bbHjQo0F24KbFmG/hz09jInIbkWS/QQVmqvpYmG3A1QSe0mp3fMi3ACkFcxXi28c4GRUkSY2 2H1jv2IQ==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:57542 helo=localhost) by bh-25.webhostbox.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nVG1s-000dRK-GZ; Fri, 18 Mar 2022 17:04:44 +0000 Date: Fri, 18 Mar 2022 10:04:43 -0700 From: Guenter Roeck To: Tzung-Bi Shih Cc: bleung@chromium.org, groeck@chromium.org, robh+dt@kernel.org, devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/5] platform/chrome: cros_kbd_led_backlight: support OF match Message-ID: <20220318170443.GA687301@roeck-us.net> References: <20220314090835.3822093-1-tzungbi@kernel.org> <20220314090835.3822093-5-tzungbi@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220314090835.3822093-5-tzungbi@kernel.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-BWhitelist: no X-Source-IP: 108.223.40.66 X-Source-L: No X-Exim-ID: 1nVG1s-000dRK-GZ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 108-223-40-66.lightspeed.sntcca.sbcglobal.net (localhost) [108.223.40.66]:57542 X-Source-Auth: guenter@roeck-us.net X-Email-Count: 3 X-Source-Cap: cm9lY2s7YWN0aXZzdG07YmgtMjUud2ViaG9zdGJveC5uZXQ= X-Local-Domain: yes Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Mar 14, 2022 at 05:08:34PM +0800, Tzung-Bi Shih wrote: Nit: There should be some text here. Otherwise Reviewed-by: Guenter Roeck Guenter > Signed-off-by: Tzung-Bi Shih > --- > Changes from v1: > (https://patchwork.kernel.org/project/chrome-platform/patch/20220214053646.3088298-5-tzungbi@google.com/) > - Update email address accordingly. > - Use device_get_match_data() per review comment in v1. > > drivers/platform/chrome/cros_kbd_led_backlight.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/drivers/platform/chrome/cros_kbd_led_backlight.c b/drivers/platform/chrome/cros_kbd_led_backlight.c > index e26d1d4cd801..1f2750c830d4 100644 > --- a/drivers/platform/chrome/cros_kbd_led_backlight.c > +++ b/drivers/platform/chrome/cros_kbd_led_backlight.c > @@ -10,7 +10,9 @@ > #include > #include > #include > +#include > #include > +#include > #include > > /** > @@ -127,7 +129,7 @@ static int keyboard_led_probe(struct platform_device *pdev) > const struct keyboard_led_drvdata *drvdata; > int error; > > - drvdata = acpi_device_get_match_data(&pdev->dev); > + drvdata = device_get_match_data(&pdev->dev); > if (!drvdata) > return -EINVAL; > > @@ -163,10 +165,21 @@ static const struct acpi_device_id keyboard_led_acpi_match[] = { > MODULE_DEVICE_TABLE(acpi, keyboard_led_acpi_match); > #endif > > +#ifdef CONFIG_OF > +static const struct of_device_id keyboard_led_of_match[] = { > + { > + .compatible = "google,cros-kbd-led-backlight", > + }, > + {} > +}; > +MODULE_DEVICE_TABLE(of, keyboard_led_of_match); > +#endif > + > static struct platform_driver keyboard_led_driver = { > .driver = { > .name = "chromeos-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, > };