lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120430093430.17efed8a@notabene.brown>
Date:	Mon, 30 Apr 2012 09:34:30 +1000
From:	NeilBrown <neilb@...e.de>
To:	Grazvydas Ignotas <notasas@...il.com>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>, Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	linux-omap@...r.kernel.org
Subject: Re: [PATCH 3/6] twl4030_charger: allow charging whenever VBUS is
 present.

On Wed, 25 Apr 2012 14:33:25 +0300 Grazvydas Ignotas <notasas@...il.com>
wrote:

> On Wed, Apr 25, 2012 at 10:33 AM, NeilBrown <neilb@...e.de> wrote:
> > We currently refuse to charge if the USB ID pin is grounded, even
> > though VBUS might be present.
> > However some chargers do pull the ID pin low through a resistor which
> > might be as low as 47Kohm (openmoko charger).
> >
> > The documentation is unclear but some experimental evidence suggests
> > that when the charge pump provides VBUS that doesn't get reflected in
> > HW_CONDITIONS, so we should be safe to ignore the ID pin.
> 
> On pandora I see the opposite, STS_VBUS is set regardless of who
> drives it, so this will break pandora..

OK... I guess this needs more thought.
I'll withdraw this patch and 6/6 for now.
The rest should be good to go.  Maybe I'll resend them an include Anton
Vorontsov..

Thanks,
NeilBrown

> 
> >
> > Signed-off-by: NeilBrown <neilb@...e.de>
> > ---
> >
> >  drivers/power/twl4030_charger.c |    6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
> > index 0511610..684662a 100644
> > --- a/drivers/power/twl4030_charger.c
> > +++ b/drivers/power/twl4030_charger.c
> > @@ -155,11 +155,7 @@ static int twl4030_bci_have_vbus(struct twl4030_bci *bci)
> >
> >        dev_dbg(bci->dev, "check_vbus: HW_CONDITIONS %02x\n", hwsts);
> >
> > -       /* in case we also have STS_USB_ID, VBUS is driven by TWL itself */
> > -       if ((hwsts & TWL4030_STS_VBUS) && !(hwsts & TWL4030_STS_USB_ID))
> > -               return 1;
> > -
> > -       return 0;
> > +       return (hwsts & TWL4030_STS_VBUS);
> >  }
> >
> >  /*
> >
> >
> 
> 


Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ