Re: [PATCH v4 2/3] iio: light: gp2ap002: add led power supply
From: Andy Shevchenko
Date: Wed Nov 04 2026 - 12:44:00 EST
On Wed, Nov 04, 2026 at 02:02:28PM +0100, Christoph Rudorff wrote:
> Problem: no irq received. Not working.
>
> According to datasheet page 8 "Recommended external circuit",
> it got tree pins to supply: vio, vdd and vled->leda.
>
> We were missing to power the led (pin leda)
>
> * add leda regulator
> * use regulator_bulk_*()
> * pretty up set voltages
>
> Tested on samsung-j5 (msm8916)
>
> Signed-off-by: Christoph Rudorff <chris@xxxxxxxxxxx>
>
Missing '---' cutter line which makes this patch invalid and it may not be
applied (your SoB should be a tag and it should be last in the chain; you may
conduct an experiment, take the message ID of this email, run on a clean Linux
kernel Git repository something like `b4 am -s $MSG_ID; git am ...` followed by
`git log`, you will see the issue).
> v2: Use regulator bulk api.
> v3: pretty up, rename vled to leda
> v4: add namespace "GP2AP002", use separate value for setting vdd,
> moved static supply-data back to global, more readable imho
> ---
...
> int num_chan;
> const char *compat;
> u8 val;
> - int ret;
> + int ret, vdd_volt;
Don't mix semantically different variables on the same line.
Try to keep reversed xmas tree order.
...
> if (ret) {
> - dev_err(dev, "failed to sett VDD voltage\n");
> + dev_err(dev, "failed to set VDD voltage\n");
> return ret;
Unrelated change.
> }
> -
Stray change.
...
I stopped here.
--
With Best Regards,
Andy Shevchenko