All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruno Ducrot <ducrot-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
To: Pedro Venda <pjlv-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	"Li,
	Shaohua" <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: smartbattery support
Date: Mon, 11 Oct 2004 11:49:35 +0200	[thread overview]
Message-ID: <20041011094935.GA23992@poupinou.org> (raw)
In-Reply-To: <4166EC29.8070006-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org>

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

  parent reply	other threads:[~2004-10-11  9:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041011094935.GA23992@poupinou.org \
    --to=ducrot-kk6yzipjem5g9huczpvpmw@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=pjlv-aHmAgkVUFT6Joy8PIJZ9VA@public.gmane.org \
    --cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.