ac power_supply changed to adapter
Balaji Rao
balaji at raobalaji.com
Mon Dec 1 12:10:32 CET 2008
On Mon, Dec 01, 2008 at 10:55:22AM +0000, Andy Green wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Somebody in the thread at some point said:
> | Andy Green wrote:
> |> -----BEGIN PGP SIGNED MESSAGE-----
> |> Hash: SHA1
> |>
> |> Somebody in the thread at some point said:
> |>
> |> | Is there a specific reason for this? I chose ac initially because that
> |> | is what Android expects. I can abstract it out if adapter is thought to
> |> | be a better choice.
> |>
> |> Balaji can tell for sure but I think this may be confusion at one end or
> |> the other (maybe my end :-) ). pcf50633 supports an "adapter" path that
> |> we don't use on GTA02, but Balaji has exposed it since it's meant to be
> |> generic solution for that device now.
> |>
> |> I assume what you had as "ac" was the 1A charger coming in through USB?
> |
> | Oh, right. So the adapter power_supply is something completely
> | different? Isn't there a way to tell between usb and ac charger? Like
> | check the current?
>
> Yes I didn't go look but I talked with Balaji about the adapter path and
> I know he addressed it, so a new power_supply guy turning up called
> "adapter" will be this I think.
>
> cat /sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-mbc/usb_curlim
>
> should be enough hopefully -->
>
> 0 - no power on USB
> 100 - not enumerated (or currently, buggy enumeration)
> 500 - enumerated
> 1000 - AC Charger
>
>
Hi Andy, Sean,
The pcf50633 datasheet calls the other power supply 'adapter', so I
thought it's best to name it that way in the driver.
Since we don't use the 'adapter' at all, I don't understand what's the
problem.
I don't know, but did we use 'ac' for the 1A usb charging case ?
- Balaji
More information about the openmoko-kernel
mailing list