Hi Pali,
On Fri, Oct 25, 2013 at 08:39:40PM +0200, Pali Roh?r wrote:
> Now I found this patch and it looks like it will be in mainline
> kernel. And after that it could be simple to listen for needed
> events from isp driver in my bq driver (without touching isp).
>
> https://lkml.org/lkml/2013/7/25/204
>
> Can you look at isp1704 driver for DT support? I think that only
> one gpio needs to be passed to driver from board data.
I had a quick overview over Jenny's patchset [0] (the patch you
referenced is part of a bigger patchset). I don't think the
scenario found in the Nokia N900 is covered by it, but probably
now is the time to change it :)
So for everybody new to this thread:
Multiple chips are involved in the charging of the Nokia N900
battery:
bq27200: This chip is used for reading battery status. AFAIK
it's not directly involved in charging the battery.
bq24150a: This chip takes care of actually charging the battery.
It has no clue about USB related stuff. The maximum
current it draws can be configured, though.
isp1704: USB charger detector. This chip is used to detect how
much current may be used by the bq24150a chip.
rx51-temp: Analog temperature sensor for the battery, which is
connected via an analog-digital-converter.
The question is how to connected these driver with each other
if device tree is used to boot the system. Any suggestions?
[0] http://thread.gmane.org/gmane.linux.kernel/1377608
-- Sebastian
On Saturday 26 October 2013 02:25:02 Sebastian Reichel wrote:
> Hi Pali,
>
> On Fri, Oct 25, 2013 at 08:39:40PM +0200, Pali Rohár wrote:
> > Now I found this patch and it looks like it will be in
> > mainline kernel. And after that it could be simple to
> > listen for needed events from isp driver in my bq driver
> > (without touching isp).
> >
> > https://lkml.org/lkml/2013/7/25/204
> >
> > Can you look at isp1704 driver for DT support? I think that
> > only one gpio needs to be passed to driver from board data.
>
> I had a quick overview over Jenny's patchset [0] (the patch
> you referenced is part of a bigger patchset). I don't think
> the scenario found in the Nokia N900 is covered by it, but
> probably now is the time to change it :)
>
> So for everybody new to this thread:
>
> Multiple chips are involved in the charging of the Nokia N900
> battery:
>
> bq27200: This chip is used for reading battery status. AFAIK
> it's not directly involved in charging the battery.
> bq24150a: This chip takes care of actually charging the
> battery. It has no clue about USB related stuff. The maximum
> current it draws can be configured, though. isp1704: USB
> charger detector. This chip is used to detect how much
> current may be used by the bq24150a chip. rx51-temp: Analog
> temperature sensor for the battery, which is connected via an
> analog-digital-converter.
>
> The question is how to connected these driver with each other
> if device tree is used to boot the system. Any suggestions?
>
> [0] http://thread.gmane.org/gmane.linux.kernel/1377608
>
> -- Sebastian
What I need is receive property change event (from isp1704) in
bq24150a. And with this patch https://lkml.org/lkml/2013/7/25/204
bq24150a driver can receive them and use only these which comes
from driver specified in DT (on n900 from isp1704).
--
Pali Rohár
[email protected]
>
> On Saturday 26 October 2013 02:25:02 Sebastian Reichel wrote:
> > Hi Pali,
> >
> > On Fri, Oct 25, 2013 at 08:39:40PM +0200, Pali Rohár wrote:
> > > Now I found this patch and it looks like it will be in mainline
> > > kernel. And after that it could be simple to listen for needed
> > > events from isp driver in my bq driver (without touching isp).
> > >
> > > https://lkml.org/lkml/2013/7/25/204
> > >
> > > Can you look at isp1704 driver for DT support? I think that only one
> > > gpio needs to be passed to driver from board data.
> >
> > I had a quick overview over Jenny's patchset [0] (the patch you
> > referenced is part of a bigger patchset). I don't think the scenario
> > found in the Nokia N900 is covered by it, but probably now is the time
> > to change it :)
> >
> > So for everybody new to this thread:
> >
> > Multiple chips are involved in the charging of the Nokia N900
> > battery:
> >
> > bq27200: This chip is used for reading battery status. AFAIK
> > it's not directly involved in charging the battery.
> > bq24150a: This chip takes care of actually charging the battery. It
> > has no clue about USB related stuff. The maximum
> > current it draws can be configured, though. isp1704: USB
> > charger detector. This chip is used to detect how much current may be
> > used by the bq24150a chip. rx51-temp: Analog temperature sensor for
> > the battery, which is connected via an analog-digital-converter.
> >
> > The question is how to connected these driver with each other if
> > device tree is used to boot the system. Any suggestions?
> >
The patch http://thread.gmane.org/gmane.linux.kernel/1377608 is intended to cover similar
scenario. It connects different components involved in charging to monitor and control the
charging. This keeps the charging logic outside the charger driver and the charger driver just
need to be a h/w abstraction layer. It doesn't take care of the device tree part. But as long as the
drivers are registered with power supply class, the framework can take actions. Hope this helps.
> > [0] http://thread.gmane.org/gmane.linux.kernel/1377608
> >
> > -- Sebastian
>
> What I need is receive property change event (from isp1704) in bq24150a. And with this
> patch https://lkml.org/lkml/2013/7/25/204
> bq24150a driver can receive them and use only these which comes from driver specified in
> DT (on n900 from isp1704).
>
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m????????????I?
On Mon, Oct 28, 2013 at 03:01:35AM +0000, Tc, Jenny wrote:
> > On Saturday 26 October 2013 02:25:02 Sebastian Reichel wrote:
> > > On Fri, Oct 25, 2013 at 08:39:40PM +0200, Pali Rohár wrote:
> > > > Now I found this patch and it looks like it will be in mainline
> > > > kernel. And after that it could be simple to listen for needed
> > > > events from isp driver in my bq driver (without touching isp).
> > > >
> > > > https://lkml.org/lkml/2013/7/25/204
> > > >
> > > > Can you look at isp1704 driver for DT support? I think that only one
> > > > gpio needs to be passed to driver from board data.
> > >
...
> > What I need is receive property change event (from isp1704) in bq24150a. And with this
> > patch https://lkml.org/lkml/2013/7/25/204
> > bq24150a driver can receive them and use only these which comes from driver specified in
> > DT (on n900 from isp1704).
Pali, Sebastian,
I am OK with that patch. Please send it (of course preserving Jenny's
authorship), along with a user of that notifier and I'll happily apply it.
Thanks,
Anton