[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEth8oHvgTzUhSrJUduS621J_1ow1dWySXTLX+mSwk3HHv25Vw@mail.gmail.com>
Date: Wed, 13 Mar 2024 15:44:44 +0800
From: Kate Hsuan <hpa@...hat.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>, Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
linux-leds@...r.kernel.org, platform-driver-x86@...r.kernel.org,
Hans de Goede <hdegoede@...hat.com>, André Apitzsch <git@...tzsch.eu>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] platform: x86-android-tablets: other: Add swnode
for Xiaomi pad2 indicator LED
On Tue, Mar 12, 2024 at 6:35 PM Ilpo Järvinen
<ilpo.jarvinen@...ux.intel.com> wrote:
>
> 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.
>
Hi,
Thank you for reviewing it.
I'll propose the v5 patch to improve them :)
>
> --
> i.
>
--
BR,
Kate
Powered by blists - more mailing lists