Re: [PATCH v2 7/9] leds: Add driver for Asus Transformer LEDs
From: Lee Jones
Date: Mon Mar 09 2026 - 15:05:16 EST
On Fri, 06 Mar 2026, Svyatoslav Ryhel wrote:
> пт, 6 бер. 2026 р. о 12:04 Lee Jones <lee@xxxxxxxxxx> пише:
> >
> > On Mon, 09 Feb 2026, Svyatoslav Ryhel wrote:
> >
> > > From: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>
> > >
> > > Asus Transformer tablets have a green and an amber LED on both the Pad
> > > and the Dock. If both LEDs are enabled simultaneously, the emitted light
> > > will be yellow.
> > >
> > > Co-developed-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> > > Signed-off-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>
> > > ---
> > > drivers/leds/Kconfig | 11 ++++
> > > drivers/leds/Makefile | 1 +
> > > drivers/leds/leds-asus-ec.c | 104 ++++++++++++++++++++++++++++++++++++
> > > 3 files changed, 116 insertions(+)
> > > create mode 100644 drivers/leds/leds-asus-ec.c
[
...]
> > > +static int asus_ec_led_probe(struct platform_device *pdev)
> > > +{
> > > + struct asusec_info *ec = cell_to_ec(pdev);
> >
> > Please remove all of your abstraction layers. They serve little purpose
> > other than to complicate things. Just use dev_get_drvdata() here.
> >
> > Remove the "_info" part and change "ec" to "ddata".
> >
>
> Controller exposes only required stuff, exposing controllers internal
> parts is not desired. Is there any written convention that driver
> private data pointer MUST be named "ddata"? "priv" is pretty well
> fitting to. You are just nitpicking.
[...]
> > Lots of repetition here.
> >
> > I'd make a sub-function that takes the differences.
> >
> > Same with the set brightness functions.
> >
> > Think to yourself - what if I had to support 16 different LEDs?
> >
>
> That is not of my concern what you would do. I have 2 LEDs and I see
> no point in "abstraction for he sake of abstraction".
Your attitude stinks!
All of your submissions are now on hold until I can be bothered to look
at them again. In the mean time, I suggest you look inward and
re-evaluate how you choose to communicate with others.
--
Lee Jones [李琼斯]