From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Kate Hsuan" <hpa@redhat.com>, "Pavel Machek" <pavel@ucw.cz>,
"Lee Jones" <lee@kernel.org>,
linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org,
"Hans de Goede" <hdegoede@redhat.com>,
"André Apitzsch" <git@apitzsch.eu>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] platform: x86-android-tablets: other: Add swnode for Xiaomi pad2 indicator LED
Date: Tue, 12 Mar 2024 12:35:38 +0200 (EET) [thread overview]
Message-ID: <18ef7e97-db6e-2dc4-5728-5a539ae4c9bb@linux.intel.com> (raw)
In-Reply-To: <Ze-I63bNzaMkHfgg@surfacebook.localdomain>
On Tue, 12 Mar 2024, Andy Shevchenko wrote:
> Wed, Mar 06, 2024 at 10:58:00AM +0800, Kate Hsuan kirjoitti:
> > There is a KTD2026 LED controller to manage the indicator LED for Xiaomi
> > pad2. The ACPI for it is not properly made so the kernel can't get
> > a correct description of it.
> >
> > This work add a description for this RGB LED controller and also set a
> > trigger to indicate the chaging event (bq27520-0-charging). When it is
> > charging, the indicator LED will be turn on.
>
> Ilpo, Kate, please consider the following remarks.
>
> ...
>
> > #include <linux/gpio/machine.h>
> > #include <linux/input.h>
> > #include <linux/platform_device.h>
>
> + Blank line?
>
> > +#include <dt-bindings/leds/common.h>
>
> Not sure where to place this, some drivers put it the first, some after linux/*.
>
> ...
>
> > +/* main fwnode for ktd2026 */
> > +static const struct software_node ktd2026_node = {
>
> No name?
>
> > +};
> > +
> > +static const struct property_entry ktd2026_rgb_led_props[] = {
> > + PROPERTY_ENTRY_U32("reg", 0),
> > + PROPERTY_ENTRY_U32("color", LED_COLOR_ID_RGB),
> > + PROPERTY_ENTRY_STRING("function", "indicator"),
>
> > + PROPERTY_ENTRY_STRING("linux,default-trigger",
> > + "bq27520-0-charging"),
>
> It's less than 80, why not on a single line?
>
> > +
>
> Redundant blank line.
>
> > + { }
> > +};
>
> ...
>
> > +/* B */
>
> B for red?!
>
> > +static const struct property_entry ktd2026_red_led_props[] = {
> > + PROPERTY_ENTRY_U32("reg", 0),
> > + PROPERTY_ENTRY_U32("color", LED_COLOR_ID_BLUE),
> > + { }
> > +};
The name with "red" and LED_COLOR_ID_BLUE are also inconsistent.
> ...
>
> > +/* R */
>
> R for blue?!
>
> > +static const struct property_entry ktd2026_blue_led_props[] = {
> > + PROPERTY_ENTRY_U32("reg", 2),
> > + PROPERTY_ENTRY_U32("color", LED_COLOR_ID_RED),
> > + { }
> > +};
Here as well.
I think it's better I drop this patch (it's only in review-ilpo) and wait
for v5 version as there's some much still to correct.
--
i.
next prev parent reply other threads:[~2024-03-12 10:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 2:57 [PATCH v4 0/2] KTD2026 indicator LED for X86 Xiaomi Pad2 Kate Hsuan
2024-03-06 2:58 ` [PATCH v4 1/2] platform: x86-android-tablets: other: Add swnode for Xiaomi pad2 indicator LED Kate Hsuan
2024-03-11 22:42 ` Andy Shevchenko
2024-03-12 10:35 ` Ilpo Järvinen [this message]
2024-03-13 7:44 ` Kate Hsuan
2024-03-06 2:58 ` [PATCH v4 2/2] leds: rgb: leds-ktd202x: Get device properties through fwnode to support ACPI Kate Hsuan
2024-03-11 12:03 ` Ilpo Järvinen
2024-03-11 18:48 ` André Apitzsch
2024-03-11 23:04 ` Andy Shevchenko
2024-03-22 5:44 ` Kate Hsuan
2024-03-22 16:01 ` Andy Shevchenko
2024-03-24 14:48 ` Kate Hsuan
2024-03-11 12:05 ` [PATCH v4 0/2] KTD2026 indicator LED for X86 Xiaomi Pad2 Ilpo Järvinen
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=18ef7e97-db6e-2dc4-5728-5a539ae4c9bb@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=git@apitzsch.eu \
--cc=hdegoede@redhat.com \
--cc=hpa@redhat.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=platform-driver-x86@vger.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.