* Using POWER or APM for battery handling
@ 2009-03-27 19:24 Kristoffer Ericson
2009-03-27 19:29 ` Anton Vorontsov
0 siblings, 1 reply; 5+ messages in thread
From: Kristoffer Ericson @ 2009-03-27 19:24 UTC (permalink / raw)
To: cbou; +Cc: linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
Hey Anton,
My machines (HP Jornada 600-series and HP Jornada 700-series) both
rely on batteries for power. Now, in the past it has all
been handled by an APM_EMULATION driver that
essentially detects the current state (loading YES/NO,
POWER_LEFT, ESTIMATED TIME LEFT,...) and adjusts
the state of the machine.
My question is should I port this to instead
use the power class (drivers/power) or not.
The batteries are same for both 600/700 but
contain no internal chip so I would need
seperate battery drivers for both machines.
Best wishes
Kristoffer Ericson
--
Kristoffer Ericson <kristoffer.ericson@gmail.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using POWER or APM for battery handling
2009-03-27 19:24 Using POWER or APM for battery handling Kristoffer Ericson
@ 2009-03-27 19:29 ` Anton Vorontsov
2009-03-27 20:41 ` Kristoffer Ericson
0 siblings, 1 reply; 5+ messages in thread
From: Anton Vorontsov @ 2009-03-27 19:29 UTC (permalink / raw)
To: Kristoffer Ericson; +Cc: cbou, linux-kernel@vger.kernel.org
Hello Kristoffer,
On Fri, Mar 27, 2009 at 08:24:06PM +0100, Kristoffer Ericson wrote:
> Hey Anton,
>
> My machines (HP Jornada 600-series and HP Jornada 700-series) both
> rely on batteries for power. Now, in the past it has all
> been handled by an APM_EMULATION driver that
> essentially detects the current state (loading YES/NO,
> POWER_LEFT, ESTIMATED TIME LEFT,...) and adjusts
> the state of the machine.
>
> My question is should I port this to instead
> use the power class (drivers/power) or not.
The driver is already there:
drivers/power/apm_power.c
So all you need is Jornada driver for the power supply class,
and then apm_power.c will work for your battery driver.
Feel free to ask if there is anything still not clear.
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using POWER or APM for battery handling
2009-03-27 19:29 ` Anton Vorontsov
@ 2009-03-27 20:41 ` Kristoffer Ericson
2009-03-27 20:55 ` Anton Vorontsov
0 siblings, 1 reply; 5+ messages in thread
From: Kristoffer Ericson @ 2009-03-27 20:41 UTC (permalink / raw)
To: avorontsov; +Cc: cbou, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]
On Fri, 27 Mar 2009 22:29:47 +0300
Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
> Hello Kristoffer,
>
> On Fri, Mar 27, 2009 at 08:24:06PM +0100, Kristoffer Ericson wrote:
> > Hey Anton,
> >
> > My machines (HP Jornada 600-series and HP Jornada 700-series) both
> > rely on batteries for power. Now, in the past it has all
> > been handled by an APM_EMULATION driver that
> > essentially detects the current state (loading YES/NO,
> > POWER_LEFT, ESTIMATED TIME LEFT,...) and adjusts
> > the state of the machine.
> >
> > My question is should I port this to instead
> > use the power class (drivers/power) or not.
>
> The driver is already there:
> drivers/power/apm_power.c
>
> So all you need is Jornada driver for the power supply class,
> and then apm_power.c will work for your battery driver.
>
> Feel free to ask if there is anything still not clear.
Great!
I think I understand, but should I create this driver
inside /drivers/power or inside the mach folder (in this case arch/arm/mach-sa1100)?
>
> Thanks,
>
> --
> Anton Vorontsov
> email: cbouatmailru@gmail.com
> irc://irc.freenode.net/bd2
--
Kristoffer Ericson <kristoffer.ericson@gmail.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using POWER or APM for battery handling
2009-03-27 20:41 ` Kristoffer Ericson
@ 2009-03-27 20:55 ` Anton Vorontsov
2009-03-27 20:59 ` Kristoffer Ericson
0 siblings, 1 reply; 5+ messages in thread
From: Anton Vorontsov @ 2009-03-27 20:55 UTC (permalink / raw)
To: Kristoffer Ericson; +Cc: cbou, linux-kernel@vger.kernel.org
On Fri, Mar 27, 2009 at 09:41:06PM +0100, Kristoffer Ericson wrote:
[...]
> > The driver is already there:
> > drivers/power/apm_power.c
> >
> > So all you need is Jornada driver for the power supply class,
> > and then apm_power.c will work for your battery driver.
> >
> > Feel free to ask if there is anything still not clear.
>
> Great!
>
> I think I understand, but should I create this driver
> inside /drivers/power or inside the mach folder (in this case arch/arm/mach-sa1100)?
I would prefer drivers/power/.
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using POWER or APM for battery handling
2009-03-27 20:55 ` Anton Vorontsov
@ 2009-03-27 20:59 ` Kristoffer Ericson
0 siblings, 0 replies; 5+ messages in thread
From: Kristoffer Ericson @ 2009-03-27 20:59 UTC (permalink / raw)
To: avorontsov; +Cc: cbou, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 860 bytes --]
On Fri, 27 Mar 2009 23:55:13 +0300
Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
> On Fri, Mar 27, 2009 at 09:41:06PM +0100, Kristoffer Ericson wrote:
> [...]
> > > The driver is already there:
> > > drivers/power/apm_power.c
> > >
> > > So all you need is Jornada driver for the power supply class,
> > > and then apm_power.c will work for your battery driver.
> > >
> > > Feel free to ask if there is anything still not clear.
> >
> > Great!
> >
> > I think I understand, but should I create this driver
> > inside /drivers/power or inside the mach folder (in this case arch/arm/mach-sa1100)?
>
> I would prefer drivers/power/.
roger, big thanks for help.
>
> Thanks,
>
> --
> Anton Vorontsov
> email: cbouatmailru@gmail.com
> irc://irc.freenode.net/bd2
--
Kristoffer Ericson <kristoffer.ericson@gmail.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-27 20:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 19:24 Using POWER or APM for battery handling Kristoffer Ericson
2009-03-27 19:29 ` Anton Vorontsov
2009-03-27 20:41 ` Kristoffer Ericson
2009-03-27 20:55 ` Anton Vorontsov
2009-03-27 20:59 ` Kristoffer Ericson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox