RE: [PATCH RFT] regulator: lp8788-ldo: Use ldo->en_pin to check ifregulator is enabled by external pin

From: Kim, Milo
Date: Sun Jan 06 2013 - 20:17:04 EST


Hi Axel,

> -----Original Message-----
> From: Axel Lin [mailto:axel.lin@xxxxxxxxxx]
> Sent: Saturday, January 05, 2013 4:34 PM
> To: Mark Brown
> Cc: Kim, Milo; Girdwood, Liam; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH RFT] regulator: lp8788-ldo: Use ldo->en_pin to check if
> regulator is enabled by external pin
>
> ldo->en_pin is set iff the regulator is enabled by external pin.
>
> This patch sets ldo->en_pin to NULL if lp8788_gpio_request_ldo_en()
> fails, then
> we can use it to determinate if the regulator is controlled by external
> pin or
> register.
>
> lp8788_get_ldo_enable_mode(), lp8788_ldo_ctrl_by_extern_pin() and
> lp8788_ldo_is_enabled_by_extern_pin() functions are not used now,
> remove them.

I love this patch and it works in a real board.

Initial driver code controls LDOs by reading the regulator control mode.
It guarantees working even if the control mode is changed by mistake.
But this case can be fixed using LP8788 platform data.
This patch makes the driver simpler, so I do ack your patch.
Thanks!

Acked-by: Milo Kim <milo.kim@xxxxxx>
Tested-by: Milo Kim <milo.kim@xxxxxx>

èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—