All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: smartbattery support
@ 2004-10-08  8:39 Li, Shaohua
       [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575457124-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Li, Shaohua @ 2004-10-08  8:39 UTC (permalink / raw)
  To: Bruno Ducrot, Pedro Venda; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

>On Thu, Oct 07, 2004 at 09:43:20PM +0800, Li, Shaohua wrote:
>> You needed an EC-based SMBus host driver (IIRC, some Acer latops
defined
>> such host in DSDT). ACPI spec has the definition for EC-based SMBus
host
>> interface. Second, a sensor driver for reading smart battery
information
>> is required.
>>
>
>Some times ago, for a toshiba laptop, I began an i2c-acpi-ec driver:
>ftp://ftp.poupinou.org/acpi/i2c-acpi-ec.c
>
>It's a little bit buggy though but this allowed for me to access the
>sensors
>behind the EC.  The main trouble was that there were not actually a
>smbus declared in the ACPI namespace and it was needed to hardcode
where
>is the base adress in the EC space.
>You may try to start with that maybe, and I guess a real
acpi_ec_smb_probe
>function must be written.
Some Acer laptops define the SMBus host as below:
  		Device (SMBC)
                    {
                        Name (_HID, "ACPI0001")
                        Name (_EC, 0x1820)
                        Device (SBS0)
                        {
                            Name (_HID, "ACPI0002")
                            Name (_SBS, 0x02)
                        }
                    }
The base address and the notification number are defined on the _EC
method.
Please check if you system has such definition.

Thanks,
Shaohua


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575457124-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-10-08  9:16   ` Bruno Ducrot
       [not found]     ` <20041008091658.GE6785-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
  2004-10-08 19:36   ` Pedro Venda
  1 sibling, 1 reply; 18+ messages in thread
From: Bruno Ducrot @ 2004-10-08  9:16 UTC (permalink / raw)
  To: Li, Shaohua; +Cc: Pedro Venda, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Fri, Oct 08, 2004 at 04:39:47PM +0800, Li, Shaohua wrote:
> >function must be written.
> Some Acer laptops define the SMBus host as below:
>   		Device (SMBC)
>                     {
>                         Name (_HID, "ACPI0001")
>                         Name (_EC, 0x1820)
>                         Device (SBS0)
>                         {
>                             Name (_HID, "ACPI0002")
>                             Name (_SBS, 0x02)
>                         }
>                     }
> The base address and the notification number are defined on the _EC
> method.
> Please check if you system has such definition.
> 

It doesn't have such definition.

There were that actually for the EC device:

                    Field(ERAM, ByteAcc, Lock, Preserve)
                    {
                        Offset(0x60),
                        SMPR,8,
                        SMST,8,
                        SMAD,8,
                        SMCM,8,
                        SMD0,256,
                        BCNT,8,
                        SMAA,8,
                        ...
                        ...

(you can grab the ASL at
ftp://ftp.poupinou.org/acpi/tosh_3000/tosh3k-100.v13.asl.bz2
if you want to verify by yourself)

So my guess was that it's an smbus, and it was the case..

The only trouble were that I don't have the notification number
(though I think it was 1, because this laptop received sometimes
an EC QUERY with this value and there is no _Q01 method in the 
original asl), but I must admit I haven't checked more.

For the record, there were 3 sensors, a smartbattery I think, a
thermal sensor controlling also the CPU fan, and an eeprom.
Since I got in fact what I wanted to monitor by using acpi methods,
I haven't investigated more...

Cheers,

-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575457124-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  2004-10-08  9:16   ` Bruno Ducrot
@ 2004-10-08 19:36   ` Pedro Venda
       [not found]     ` <4166EC29.8070006-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
  1 sibling, 1 reply; 18+ messages in thread
From: Pedro Venda @ 2004-10-08 19:36 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Li, Shaohua

Li, Shaohua wrote:
>>On Thu, Oct 07, 2004 at 09:43:20PM +0800, Li, Shaohua wrote:
>>
>>>You needed an EC-based SMBus host driver (IIRC, some Acer latops
> 
> defined
> 
>>>such host in DSDT). ACPI spec has the definition for EC-based SMBus
> 
> host
> 
>>>interface. Second, a sensor driver for reading smart battery
> 
> information
> 
>>>is required.
>>>
>>
>>Some times ago, for a toshiba laptop, I began an i2c-acpi-ec driver:
>>ftp://ftp.poupinou.org/acpi/i2c-acpi-ec.c
>>
>>It's a little bit buggy though but this allowed for me to access the
>>sensors
>>behind the EC.  The main trouble was that there were not actually a
>>smbus declared in the ACPI namespace and it was needed to hardcode
> 
> where
> 
>>is the base adress in the EC space.
>>You may try to start with that maybe, and I guess a real
> 
> acpi_ec_smb_probe
> 
>>function must be written.
> 
> Some Acer laptops define the SMBus host as below:
>   		Device (SMBC)
>                     {
>                         Name (_HID, "ACPI0001")
>                         Name (_EC, 0x1820)
>                         Device (SBS0)
>                         {
>                             Name (_HID, "ACPI0002")
>                             Name (_SBS, 0x02)
>                         }
>                     }
> The base address and the notification number are defined on the _EC
> method.
> Please check if you system has such definition.

my acer travelmate 4001WLmi looks like this:

Device (SMBC)
                     {
                         Name (_HID, "ACPI0001")
                         Name (_EC, 0x1820)
                         Device (SBS0)
                         {
                             Name (_HID, "ACPI0002")
                             Name (_SBS, 0x02)
                         }
                     }

it's exactly the same as your example.

what kind of information can i extract from this code? from your e-mail 
i get that 0x1820 is the EC controller address... but where is that 
address used? is it an SMBUS address? is it something else?

regards,
pedro venda.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found]     ` <20041008091658.GE6785-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
@ 2004-10-08 19:37       ` Pedro Venda
  0 siblings, 0 replies; 18+ messages in thread
From: Pedro Venda @ 2004-10-08 19:37 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Bruno Ducrot


> It doesn't have such definition.
> 
> There were that actually for the EC device:
> 
>                     Field(ERAM, ByteAcc, Lock, Preserve)
>                     {
>                         Offset(0x60),
>                         SMPR,8,
>                         SMST,8,
>                         SMAD,8,
>                         SMCM,8,
>                         SMD0,256,
>                         BCNT,8,
>                         SMAA,8,
>                         ...
>                         ...
> 
> (you can grab the ASL at
> ftp://ftp.poupinou.org/acpi/tosh_3000/tosh3k-100.v13.asl.bz2
> if you want to verify by yourself)
> 
> So my guess was that it's an smbus, and it was the case..
> 
> The only trouble were that I don't have the notification number
> (though I think it was 1, because this laptop received sometimes
> an EC QUERY with this value and there is no _Q01 method in the 
> original asl), but I must admit I haven't checked more.
> 
> For the record, there were 3 sensors, a smartbattery I think, a
> thermal sensor controlling also the CPU fan, and an eeprom.
> Since I got in fact what I wanted to monitor by using acpi methods,
> I haven't investigated more...

bruno: did you actually get the driver working?


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found]     ` <4166EC29.8070006-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
@ 2004-10-11  9:49       ` Bruno Ducrot
       [not found]         ` <20041011094935.GA23992-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Bruno Ducrot @ 2004-10-11  9:49 UTC (permalink / raw)
  To: Pedro Venda; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Li, Shaohua

On Fri, Oct 08, 2004 at 08:36:09PM +0100, Pedro Venda wrote:
> Li, Shaohua wrote:
> >>On Thu, Oct 07, 2004 at 09:43:20PM +0800, Li, Shaohua wrote:
> >>
> >>>You needed an EC-based SMBus host driver (IIRC, some Acer latops
> >
> >defined
> >
> >>>such host in DSDT). ACPI spec has the definition for EC-based SMBus
> >
> >host
> >
> >>>interface. Second, a sensor driver for reading smart battery
> >
> >information
> >
> >>>is required.
> >>>
> >>
> >>Some times ago, for a toshiba laptop, I began an i2c-acpi-ec driver:
> >>ftp://ftp.poupinou.org/acpi/i2c-acpi-ec.c
> >>
> >>It's a little bit buggy though but this allowed for me to access the
> >>sensors
> >>behind the EC.  The main trouble was that there were not actually a
> >>smbus declared in the ACPI namespace and it was needed to hardcode
> >
> >where
> >
> >>is the base adress in the EC space.
> >>You may try to start with that maybe, and I guess a real
> >
> >acpi_ec_smb_probe
> >
> >>function must be written.
> >
> >Some Acer laptops define the SMBus host as below:
> >  		Device (SMBC)
> >                    {
> >                        Name (_HID, "ACPI0001")
> >                        Name (_EC, 0x1820)
> >                        Device (SBS0)
> >                        {
> >                            Name (_HID, "ACPI0002")
> >                            Name (_SBS, 0x02)
> >                        }
> >                    }
> >The base address and the notification number are defined on the _EC
> >method.
> >Please check if you system has such definition.
> 
> my acer travelmate 4001WLmi looks like this:
> 
> Device (SMBC)
>                     {
>                         Name (_HID, "ACPI0001")
>                         Name (_EC, 0x1820)
>                         Device (SBS0)
>                         {
>                             Name (_HID, "ACPI0002")
>                             Name (_SBS, 0x02)
>                         }
>                     }
> 

This mean that you have a SMB-HC with adress 0x18 and query 0x20.
You may try i2c-acpi-ec, but you have to change:
#define SMBUS_ADDRESS_TO_HAVE 0x60
to 
#define SMBUS_ADDRESS_TO_HAVE 0x18
Also, you need to get at least i2c-core in your kernel for this to work.

Note that this code have 2 years... and if there is more than one EC in
your system, this may not work.  In that case, could you please send me
a dump of the acpi tables?
btw, there is two batteries, because 'Name (_SBS, 0x02)'.

Cheers,

-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found]         ` <20041011094935.GA23992-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
@ 2004-10-11 18:36           ` Pedro Venda
       [not found]             ` <416AD2B3.9050403-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Pedro Venda @ 2004-10-11 18:36 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Bruno Ducrot

>>my acer travelmate 4001WLmi looks like this:
>>
>>Device (SMBC)
>>                    {
>>                        Name (_HID, "ACPI0001")
>>                        Name (_EC, 0x1820)
>>                        Device (SBS0)
>>                        {
>>                            Name (_HID, "ACPI0002")
>>                            Name (_SBS, 0x02)
>>                        }
>>                    }
>>
> 
> 
> This mean that you have a SMB-HC with adress 0x18 and query 0x20.
> You may try i2c-acpi-ec, but you have to change:
> #define SMBUS_ADDRESS_TO_HAVE 0x60
> to 
> #define SMBUS_ADDRESS_TO_HAVE 0x18
> Also, you need to get at least i2c-core in your kernel for this to work.
> 
> Note that this code have 2 years... and if there is more than one EC in
> your system, this may not work.  In that case, could you please send me
> a dump of the acpi tables?
> btw, there is two batteries, because 'Name (_SBS, 0x02)'.

hello bruno,

i have been reading the acpi specification, but that information you 
gave me has worth many hours of searching.

i have successfully insmod'ed and i have some results:

archon i2c-acpi-ec # i2cdetect
Error: No i2c-bus specified!
Syntax: i2cdetect [-f] [-q|-r] I2CBUS [FIRST LAST]
   I2CBUS is an integer
   With -f, scans all addresses (NOT RECOMMENDED)
   With -q, uses only quick write commands for probing (NOT RECOMMENDED)
   With -r, uses only read byte commands for probing (NOT RECOMMENDED)
   If provided, FIRST and LAST limit the probing range.
   i2cdetect -l lists installed busses only
   Installed I2C busses:
     i2c-4       unknown         ACPI EC SMBus 2.0 adapter at 0018 
  Algorithm unavailable
     i2c-3       unknown         crt2 
  Algorithm unavailable
     i2c-2       unknown         vga 
  Algorithm unavailable
     i2c-1       unknown         dvi 
  Algorithm unavailable
     i2c-0       unknown         monid 
  Algorithm unavailable
archon i2c-acpi-ec # i2cdetect 4
   WARNING! This program can confuse your I2C bus, cause data loss and 
worse!
   I will probe file /dev/i2c-4.
   I will probe address range 0x03-0x77.
   You have five seconds to reconsider and press CTRL-C!

      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          XX XX XX XX XX XX XX XX XX XX XX XX XX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
40: XX XX XX XX XX XX XX XX XX XX XX XX 4c XX XX XX
50: 50 51 52 53 XX XX XX XX XX XX XX XX XX XX XX XX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
70: XX XX XX XX XX XX XX XX
archon i2c-acpi-ec #

so some devices were detected at the bus address 0x18.

i'll dig in the code/documentation to try and auto-detect the smbus 
address first, while learning a bit more acpi.

thanks for the useful information.

why did you stop developing the module?

regards,
pedro venda.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found]             ` <416AD2B3.9050403-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
@ 2004-10-11 21:25               ` Pedro Venda
  2004-10-12 16:58               ` Bruno Ducrot
  1 sibling, 0 replies; 18+ messages in thread
From: Pedro Venda @ 2004-10-11 21:25 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Pedro Venda wrote:
>>> Device (SMBC)
>>>                    {
>>>                        Name (_HID, "ACPI0001")
>>>                        Name (_EC, 0x1820)
>>>                        Device (SBS0)
>>>                        {
>>>                            Name (_HID, "ACPI0002")
>>>                            Name (_SBS, 0x02)
>>>                        }
>>>                    }

hi everyone,

i can't get an acpi_handle for the ec host.

i am writing code in bruno ducrot's i2c-ec-smbus driver and i'm trying 
to detect the smbus address from the ACPI's ASL code above.

i'm trying to acpi_get_handle(NULL,"_EC",ec->handle) but it fails 
because of the parent=NULL (i think).

i suspect i need to use the ec driver's device handler in the parent 
paramenter of acpi_get_handle(). is that correct?

or am i doing everything wrong?

[]


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found]             ` <416AD2B3.9050403-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
  2004-10-11 21:25               ` Pedro Venda
@ 2004-10-12 16:58               ` Bruno Ducrot
  1 sibling, 0 replies; 18+ messages in thread
From: Bruno Ducrot @ 2004-10-12 16:58 UTC (permalink / raw)
  To: Pedro Venda; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Mon, Oct 11, 2004 at 07:36:35PM +0100, Pedro Venda wrote:
> why did you stop developing the module?

1- I haven't real use for it (I searched actually something else,
   related to the LCD backlight at that time),
2- it's very slow compared to a well wrotten EC firmware which will
   cache the information needed for batteries and expose them in the EC
   register space, so I thought no bios developper would use this at least
   for modern laptops.

Cheers,

-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found] ` <16A54BF5D6E14E4D916CE26C9AD305754B4711-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-10-12  9:46   ` Pedro Venda
  0 siblings, 0 replies; 18+ messages in thread
From: Pedro Venda @ 2004-10-12  9:46 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Li, Shaohua

hi,

Li, Shaohua wrote:
> In this case, the EC based SMBus host isn't EC. Actually it's a child of
> EC. You must use its HID (ACPI0001) to find it. I suggest you write a
> new driver for the SMBus host.

i'm sorry, could you clear that up?

from what i read in the acpi specification, the EC host bridges the 
communications between the smart battery subsystems and itself, so i 
thought it should be enough to communicate with the EC host.

anyway, i still can't get information from the _EC object (i'm sorry if 
it isn't an object. i haven't read the whole specification) so i can't 
get the information from the HID either.

what do you mean "a new driver for the SMBus host"? ducrot's driver is 
an smbus driver for the ec host...

i'm sorry for all the questions, but one has to learn/ask who knows.

regards,
pedro venda.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: smartbattery support
@ 2004-10-12  1:03 Li, Shaohua
       [not found] ` <16A54BF5D6E14E4D916CE26C9AD305754B4711-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Li, Shaohua @ 2004-10-12  1:03 UTC (permalink / raw)
  To: Pedro Venda, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

In this case, the EC based SMBus host isn't EC. Actually it's a child of
EC. You must use its HID (ACPI0001) to find it. I suggest you write a
new driver for the SMBus host.

Thanks,
Shaohua

>-----Original Message-----
>From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
>admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Pedro Venda
>Sent: Tuesday, October 12, 2004 5:26 AM
>To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>Subject: Re: [ACPI] smartbattery support
>
>Pedro Venda wrote:
>>>> Device (SMBC)
>>>>                    {
>>>>                        Name (_HID, "ACPI0001")
>>>>                        Name (_EC, 0x1820)
>>>>                        Device (SBS0)
>>>>                        {
>>>>                            Name (_HID, "ACPI0002")
>>>>                            Name (_SBS, 0x02)
>>>>                        }
>>>>                    }
>
>hi everyone,
>
>i can't get an acpi_handle for the ec host.
>
>i am writing code in bruno ducrot's i2c-ec-smbus driver and i'm trying
>to detect the smbus address from the ACPI's ASL code above.
>
>i'm trying to acpi_get_handle(NULL,"_EC",ec->handle) but it fails
>because of the parent=NULL (i think).
>
>i suspect i need to use the ec driver's device handler in the parent
>paramenter of acpi_get_handle(). is that correct?
>
>or am i doing everything wrong?
>
>[]
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IT Product Guide on
ITManagersJournal
>Use IT products in your business? Tell us what you think of them. Give
us
>Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
more
>http://productguide.itmanagersjournal.com/guidepromo.tmpl
>_______________________________________________
>Acpi-devel mailing list
>Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found]     ` <20041008082923.GD6785-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
@ 2004-10-08 19:29       ` Pedro Venda
  0 siblings, 0 replies; 18+ messages in thread
From: Pedro Venda @ 2004-10-08 19:29 UTC (permalink / raw)
  To: Bruno Ducrot; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Bruno Ducrot wrote:
> On Thu, Oct 07, 2004 at 09:43:20PM +0800, Li, Shaohua wrote:
> 
>>You needed an EC-based SMBus host driver (IIRC, some Acer latops defined
>>such host in DSDT). ACPI spec has the definition for EC-based SMBus host
>>interface. Second, a sensor driver for reading smart battery information
>>is required.
>>
> 
> 
> Some times ago, for a toshiba laptop, I began an i2c-acpi-ec driver:
> ftp://ftp.poupinou.org/acpi/i2c-acpi-ec.c
> 
> It's a little bit buggy though but this allowed for me to access the sensors
> behind the EC.  The main trouble was that there were not actually a
> smbus declared in the ACPI namespace and it was needed to hardcode where
> is the base adress in the EC space.
> You may try to start with that maybe, and I guess a real acpi_ec_smb_probe
> function must be written.
> 

i'll give it a read. thanks.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575456AB2-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-10-08  8:29   ` Bruno Ducrot
       [not found]     ` <20041008082923.GD6785-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Bruno Ducrot @ 2004-10-08  8:29 UTC (permalink / raw)
  To: Pedro Venda; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Thu, Oct 07, 2004 at 09:43:20PM +0800, Li, Shaohua wrote:
> You needed an EC-based SMBus host driver (IIRC, some Acer latops defined
> such host in DSDT). ACPI spec has the definition for EC-based SMBus host
> interface. Second, a sensor driver for reading smart battery information
> is required.
> 

Some times ago, for a toshiba laptop, I began an i2c-acpi-ec driver:
ftp://ftp.poupinou.org/acpi/i2c-acpi-ec.c

It's a little bit buggy though but this allowed for me to access the sensors
behind the EC.  The main trouble was that there were not actually a
smbus declared in the ACPI namespace and it was needed to hardcode where
is the base adress in the EC space.
You may try to start with that maybe, and I guess a real acpi_ec_smb_probe
function must be written.

Note that I think EC burst should be used, or else this is very very slow. So
the real trouble is to get at first EC burst in acpi_ec.

Cheers,

-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: smartbattery support
@ 2004-10-07 13:43 Li, Shaohua
       [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575456AB2-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Li, Shaohua @ 2004-10-07 13:43 UTC (permalink / raw)
  To: Pedro Venda, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Pavel Machek

You needed an EC-based SMBus host driver (IIRC, some Acer latops defined
such host in DSDT). ACPI spec has the definition for EC-based SMBus host
interface. Second, a sensor driver for reading smart battery information
is required.

Thanks,
Shaohua

>-----Original Message-----
>From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
>admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Pedro Venda
>Sent: Thursday, October 07, 2004 8:34 PM
>To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>Cc: Pavel Machek
>Subject: Re: [ACPI] smartbattery support
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>i have joined the lmsensors mailing list and the sbs-forum to get some
>more help but i'm still waiting for feedback there, so... mean while
>i'll just study i2c protocols.
>
>i'm thinking in writing a sensor driver to read the battery information
>and then a userland program could format it and do whatever it likes.
>
>as far as acpi goes, i still need some information on how will the i2c
>driver be plugged into the ACPI framework.
>
>regards,
>pedro venda.
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.4 (GNU/Linux)
>Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
>iD8DBQFBZTeseRy7HWZxjWERAhruAKD2+1WfdGmnVTK0D193UI/0McnRqwCcCWwL
>xJ8po5VdwLyS2/pMP25drh8=
>=dQP1
>-----END PGP SIGNATURE-----
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IT Product Guide on
ITManagersJournal
>Use IT products in your business? Tell us what you think of them. Give
us
>Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
more
>http://productguide.itmanagersjournal.com/guidepromo.tmpl
>_______________________________________________
>Acpi-devel mailing list
>Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found]     ` <20041007094109.GA534-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
@ 2004-10-07 12:33       ` Pedro Venda
  0 siblings, 0 replies; 18+ messages in thread
From: Pedro Venda @ 2004-10-07 12:33 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Pavel Machek

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

i have joined the lmsensors mailing list and the sbs-forum to get some
more help but i'm still waiting for feedback there, so... mean while
i'll just study i2c protocols.

i'm thinking in writing a sensor driver to read the battery information
and then a userland program could format it and do whatever it likes.

as far as acpi goes, i still need some information on how will the i2c
driver be plugged into the ACPI framework.

regards,
pedro venda.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBZTeseRy7HWZxjWERAhruAKD2+1WfdGmnVTK0D193UI/0McnRqwCcCWwL
xJ8po5VdwLyS2/pMP25drh8=
=dQP1
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found] ` <41630B6D.2000107-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
  2004-10-05 21:54   ` Christian Axelsson
@ 2004-10-07  9:41   ` Pavel Machek
       [not found]     ` <20041007094109.GA534-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
  1 sibling, 1 reply; 18+ messages in thread
From: Pavel Machek @ 2004-10-07  9:41 UTC (permalink / raw)
  To: Pedro Venda; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> i decided to change the subject so that the thread could more easily 
> be followed by others.
> 
> i read some things also, but i disagree with christian. i think that 
> smbus patch is not the way to go. don't get me wrong! i'm also just 
> scratching the surface. for what i read, those patches put smbus bios 
> support into the kernel.

Agreed, we do not want to touch BIOS.

> 2. what exactly should the i2c driver do? should it just know the 
> smartbattery address and ask generic questions made by userland 
> programs? or should it do all the work and retrive charge rates and 
> capacity information and such?

I believe doing all the work is right.

-- 
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found]     ` <41631809.7020204-pw/8oln/LLv0Dx+PQ6IoOQ@public.gmane.org>
@ 2004-10-06 11:52       ` Pedro Venda
  0 siblings, 0 replies; 18+ messages in thread
From: Pedro Venda @ 2004-10-06 11:52 UTC (permalink / raw)
  To: Christian Axelsson; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Axelsson wrote:
| Pedro Venda wrote:
|
|> i read some things also, but i disagree with christian. i think that
|> smbus patch is not the way to go. don't get me wrong! i'm also just
|> scratching the surface. for what i read, those patches put smbus bios
|> support into the kernel.
|
|
| yep

sorry... do you agree or not? i meant that we should be creating an i2c
module to talk specifically to the smart battery independently of the
bios...

|
|> 1. is this a "sensor" i2c driver? i mean, should we find help with the
|> lmsensors team? there are some debugging tools for i2c developed by
|> the lm-sensors people (i guess). this document
|> (http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/SUMMARY)
|> refers some smartbattery support, but i don't think it solves our
|> problem.
|
|
| I cant get the detect-thingies to see any i2c-bus and Im not aware of
| any sensorchip in my laptop (but I would be happy to be proven wrong).
|

again i should have explained myself better... my laptop can see 5
busses... although i cannot yet interpret that information well. anyway,
what i wanted to ask was: should we be using some of the sensors code?

|> 2. what exactly should the i2c driver do? should it just know the
|> smartbattery address and ask generic questions made by userland
|> programs? or should it do all the work and retrive charge rates and
|> capacity information and such?
|
|
| I think it should publish as much generic info (info thats avaible on
| all smartbatteries) as possible into sysfs.

agree. then useland programs could use that information. but i see a
pitfall here... if it is so, how will it be hooked into ACPI?

[]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBY9xyeRy7HWZxjWERAtW9AKCI/UBkin8Q+U/xiYAuX/Vkv0adogCeLsH6
t1/108wqCrKYGP6bRWrWwXc=
=54Fs
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: smartbattery support
       [not found] ` <41630B6D.2000107-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
@ 2004-10-05 21:54   ` Christian Axelsson
       [not found]     ` <41631809.7020204-pw/8oln/LLv0Dx+PQ6IoOQ@public.gmane.org>
  2004-10-07  9:41   ` Pavel Machek
  1 sibling, 1 reply; 18+ messages in thread
From: Christian Axelsson @ 2004-10-05 21:54 UTC (permalink / raw)
  To: Pedro Venda; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Pedro Venda wrote:
> i read some things also, but i disagree with christian. i think that 
> smbus patch is not the way to go. don't get me wrong! i'm also just 
> scratching the surface. for what i read, those patches put smbus bios 
> support into the kernel.

yep

> 1. is this a "sensor" i2c driver? i mean, should we find help with the 
> lmsensors team? there are some debugging tools for i2c developed by the 
> lm-sensors people (i guess). this document 
> (http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/SUMMARY) 
> refers some smartbattery support, but i don't think it solves our problem.

I cant get the detect-thingies to see any i2c-bus and Im not aware of 
any sensorchip in my laptop (but I would be happy to be proven wrong).

> 2. what exactly should the i2c driver do? should it just know the 
> smartbattery address and ask generic questions made by userland 
> programs? or should it do all the work and retrive charge rates and 
> capacity information and such?

I think it should publish as much generic info (info thats avaible on 
all smartbatteries) as possible into sysfs.

-- 
Regards,
Christian


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* smartbattery support
@ 2004-10-05 21:00 Pedro Venda
       [not found] ` <41630B6D.2000107-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Pedro Venda @ 2004-10-05 21:00 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

hi everyone,

i decided to change the subject so that the thread could more easily be 
followed by others.

i read some things also, but i disagree with christian. i think that 
smbus patch is not the way to go. don't get me wrong! i'm also just 
scratching the surface. for what i read, those patches put smbus bios 
support into the kernel.

i feel that the i2c approach would be much more productive. now i have 
some doubts...

1. is this a "sensor" i2c driver? i mean, should we find help with the 
lmsensors team? there are some debugging tools for i2c developed by the 
lm-sensors people (i guess). this document 
(http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/SUMMARY) 
refers some smartbattery support, but i don't think it solves our problem.
2. what exactly should the i2c driver do? should it just know the 
smartbattery address and ask generic questions made by userland 
programs? or should it do all the work and retrive charge rates and 
capacity information and such?

enough questions for now.

again, don't take me wrong. it is possible that i am thinking in a 
totally wrong direction.

regards,
pedro venda.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2004-10-12 16:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-08  8:39 smartbattery support Li, Shaohua
     [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575457124-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-10-08  9:16   ` Bruno Ducrot
     [not found]     ` <20041008091658.GE6785-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2004-10-08 19:37       ` Pedro Venda
2004-10-08 19:36   ` Pedro Venda
     [not found]     ` <4166EC29.8070006-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
2004-10-11  9:49       ` Bruno Ducrot
     [not found]         ` <20041011094935.GA23992-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2004-10-11 18:36           ` Pedro Venda
     [not found]             ` <416AD2B3.9050403-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
2004-10-11 21:25               ` Pedro Venda
2004-10-12 16:58               ` Bruno Ducrot
  -- strict thread matches above, loose matches on Subject: below --
2004-10-12  1:03 Li, Shaohua
     [not found] ` <16A54BF5D6E14E4D916CE26C9AD305754B4711-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-10-12  9:46   ` Pedro Venda
2004-10-07 13:43 Li, Shaohua
     [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575456AB2-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-10-08  8:29   ` Bruno Ducrot
     [not found]     ` <20041008082923.GD6785-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2004-10-08 19:29       ` Pedro Venda
2004-10-05 21:00 Pedro Venda
     [not found] ` <41630B6D.2000107-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
2004-10-05 21:54   ` Christian Axelsson
     [not found]     ` <41631809.7020204-pw/8oln/LLv0Dx+PQ6IoOQ@public.gmane.org>
2004-10-06 11:52       ` Pedro Venda
2004-10-07  9:41   ` Pavel Machek
     [not found]     ` <20041007094109.GA534-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
2004-10-07 12:33       ` Pedro Venda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.