lkml.org 
[lkml]   [2012]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] power_supply/MFD: twl4030_charger: Allow charger to control the regulator that feeds it.
Hi Neil,

On Wed, May 09, 2012 at 07:40:40AM +1000, NeilBrown wrote:
> @@ -183,6 +186,12 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
> return -EACCES;
> }
>
> + /* Need to keep regulator on */
> + if (!bci->usb_enabled) {
> + regulator_enable(bci->usb_reg);

Should you consider here a failure case?

> + bci->usb_enabled = 1;
> + }
> +
> /* forcing the field BCIAUTOUSB (BOOT_BCI[1]) to 1 */
> ret = twl4030_clear_set_boot_bci(0, TWL4030_BCIAUTOUSB);
> if (ret < 0)
> @@ -511,6 +524,8 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
> bci->usb.num_properties = ARRAY_SIZE(twl4030_charger_props);
> bci->usb.get_property = twl4030_bci_get_property;
>
> + bci->usb_reg = regulator_get(bci->dev, "bci3v1");

... and here.

Andi


\
 
 \ /
  Last update: 2012-05-13 20:41    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site