RE: [PATCH RFC] leds: lm3530: Fix setting pltfm->als_vmax

From: Kim, Milo
Date: Tue Feb 07 2012 - 05:06:53 EST



> -----Original Message-----
> From: Axel Lin [mailto:axel.lin@xxxxxxxxx]
> Sent: Tuesday, February 07, 2012 3:23 PM
> To: linux-kernel@xxxxxxxxxxxxxxx
> Cc: Shreshtha Kumar Sahu; Kim, Milo; Richard Purdie; Andrew Morton
> Subject: [PATCH RFC] leds: lm3530: Fix setting pltfm->als_vmax
>
> In current code, pltfm->als_vmin is set to LM3530_ALS_WINDOW_mV and
> pltfm->als_vmax is 0. This looks does not make sense.
> I think what we want here is setting pltfm->als_vmax to
> LM3530_ALS_WINDOW_mV.
>
> Both als_vmin and als_vmax local variables will be set to pltfm-
> >als_vmin and
> pltfm->als_vmax by a few lines latter.
> Thus also remove a redundant assignment for als_vmin and als_vmax in
> this patch.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>

This patch makes sense and fixes wrong range of the ALS input voltage.
It works well on the real board.
Thanks.

Acked-and-tested-by: Milo(Woogyom) Kim <milo.kim@xxxxxx>

BTW, I'd suggest that 'pltfm' is replaced with 'pdata' if below patch has been updated.
[PATCH v4 5/5] leds-lm3530: replace pltfm with pdata.

Best Regards,
Milo -
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i