lkml.org 
[lkml]   [2011]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectmodelling power supply / charging logic for ebook reader
From
Date
Hi,

Warning newbie questions :-)


I'm trying to implement charging logic for a device. As these are my first
steps into the kernel I'd like to solicit opinions in which way to proceed.


Hardware: Qisda ebook-reader family - essentially every machine with an epaper
display from Sipix - build around a s3c2416. Charger IC is a Texas Instruments
bq24075 connected via gpios. The manufacturers used a fork of 2.6.21.5 and we
try to make a current kernel usable on the devices.

Somewhere on lkml I read that reimplementing basic charger logic in yet
another driver is not desired, so I'm looking at using the pda-power driver in
combination with a simple bq2407x regulator driver based on Philipp Zabels
driver for the bq24022.

The usb gadget driver has not OTG functionality and vbus detection is done via
a special gpio. So it seems the gpio-vbus driver seems to be the driver to use
for this.


Problems:

It's possible to connect the devices usb port to either a normal usb host or a
dedicated charger with higher current. The charger type is read from
some usb registers. So my question would be on how to model this with pda-
power.
The ac-part is propably not usable for this as it seems to require a different
gpio-source. Is implementing some sort of "is_usb_aca"-hook a possible way


The charger also reports its charging status via a gpio. What's the best way
to implement this with pda-power?
My current idea is to add an is_charging or supply_status hook to pda-power
and if defined output this value via the get_property method and
POWER_SUPPLY_STATUS_*.


Or as a complete alternative is it more reasonable to implement a new power-
supply for this and not add more switches to pda-power?
For example the pcf56033-charger driver has exactly this functionality but
only for a specific device.

As many of the "gadget"-devices only have an usb port but different charging
sources for it, is it reasonable to build some sort of generic "gadget-power"
driver analogous to pda-power or does something of this sort exist?


Thanks for any input :-)
Heiko


\
 
 \ /
  Last update: 2011-02-25 13:19    [W:0.021 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site