* Writing to the EC
@ 2007-11-04 19:55 Erik Andrén
2007-11-04 21:23 ` Richard Hughes
2007-11-05 0:55 ` Carlos Corbacho
0 siblings, 2 replies; 5+ messages in thread
From: Erik Andrén @ 2007-11-04 19:55 UTC (permalink / raw)
To: linux-acpi
Hello,
I'm currently in the process of trying to write routines for controlling
the backlight on my Clevo M72R.
Pressing the hotkeys do work but I do belive this is the result of that
the embedded controller is hardwired to the keyboard.
To make a long story short, I've hacked up a kernel module that dumps
the EC (with inspiration from the ibm acpi driver) using the exported
ec_read and ec_write symbols from the ec.c in the kernel acpi source and
I've been able to locate a register which change when I manually push
the brightness hotkey buttons (0xC9).
The bad part is that writing to the EC using the ec_write function
doesn't work at all. Sure it completes the operation, but when probing
the register afterwards, no change of value is seen.
My questions to you ACPI and EC gurus are:
1. Is it possible that the EC is read-only from the OS perspective?
2. Are there any common quirks / initialization that is needed to
getting the EC to register commands?
3. Does anyone have a recommendation of programs to use for snooping I/O
accesses in windows?
With kind regards
Erik Andrén
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Writing to the EC
2007-11-04 19:55 Writing to the EC Erik Andrén
@ 2007-11-04 21:23 ` Richard Hughes
2007-11-04 21:31 ` Pavel Troller
2007-11-05 0:55 ` Carlos Corbacho
1 sibling, 1 reply; 5+ messages in thread
From: Richard Hughes @ 2007-11-04 21:23 UTC (permalink / raw)
To: Erik Andrén; +Cc: linux-acpi
On Sun, 2007-11-04 at 20:55 +0100, Erik Andrén wrote:
> The bad part is that writing to the EC using the ec_write function
> doesn't work at all. Sure it completes the operation, but when probing
> the register afterwards, no change of value is seen.
This sounds the same as my Lenovo 3000 N100. If you find out how to do
it - yell - and it's worth many beers.
Richard.
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Writing to the EC
2007-11-04 21:23 ` Richard Hughes
@ 2007-11-04 21:31 ` Pavel Troller
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Troller @ 2007-11-04 21:31 UTC (permalink / raw)
To: Richard Hughes; +Cc: Erik Andrén, linux-acpi
> On Sun, 2007-11-04 at 20:55 +0100, Erik Andrén wrote:
> > The bad part is that writing to the EC using the ec_write function
> > doesn't work at all. Sure it completes the operation, but when probing
> > the register afterwards, no change of value is seen.
>
> This sounds the same as my Lenovo 3000 N100. If you find out how to do
> it - yell - and it's worth many beers.
>
> Richard.
>
Hi!
Exactly the same happens with my Clevo D610SU. There is a register which
should (probably) activate the Message LED, which is otherwise non-functional.
I've tried my best to write the register, but neither the value can be changed
(always 0), nor the LED does anything special.
With regards, Pavel Troller
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Writing to the EC
2007-11-04 19:55 Writing to the EC Erik Andrén
2007-11-04 21:23 ` Richard Hughes
@ 2007-11-05 0:55 ` Carlos Corbacho
2007-11-05 19:00 ` Ângelo Miguel Arrifano
1 sibling, 1 reply; 5+ messages in thread
From: Carlos Corbacho @ 2007-11-05 0:55 UTC (permalink / raw)
To: Erik Andrén; +Cc: linux-acpi
On Sunday 04 November 2007 19:55:40 Erik Andrén wrote:
> To make a long story short, I've hacked up a kernel module that dumps
> the EC
For acer_acpi, we have a Perl script that can do this from userspace (but
it should run on any other machine, since there's nothing Acer specific
about dumping the EC registers).
http://aceracpi.googlecode.com/svn/trunk/acer_ec/acer_ec.pl
./acer_ec.pl regs
(ACPI throws a few warnings in dmesg, because we're stepping on it's turf
a bit here, but it's far simpler than having to write a kernel module
just to get a few registers).
> My questions to you ACPI and EC gurus are:
>
> 1. Is it possible that the EC is read-only from the OS perspective?
From the acer_acpi perspective, we've found that some EC registers are
read-only (e.g. on some laptops, there is a register to read the status
of the touchpad, but writes to it are ignored).
I imagine this is defined at the hardware level though, not by the OS.
> 3. Does anyone have a recommendation of programs to use for snooping I/O
> accesses in windows?
I did try playing around with writing my own simple application to access
the I/O ports, and then dump the EC data - unfortunately, I/O port programming
in Windows is "painful", to say the least.
-Carlos
--
E-Mail: carlos@strangeworlds.co.uk
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Writing to the EC
2007-11-05 0:55 ` Carlos Corbacho
@ 2007-11-05 19:00 ` Ângelo Miguel Arrifano
0 siblings, 0 replies; 5+ messages in thread
From: Ângelo Miguel Arrifano @ 2007-11-05 19:00 UTC (permalink / raw)
To: Carlos Corbacho; +Cc: linux-acpi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 5 Nov 2007 00:55:37 +0000
Carlos Corbacho <carlos@strangeworlds.co.uk> wrote:
> On Sunday 04 November 2007 19:55:40 Erik Andr?n wrote:
> > To make a long story short, I've hacked up a kernel module that dumps
> > the EC
>
> For acer_acpi, we have a Perl script that can do this from userspace (but
> it should run on any other machine, since there's nothing Acer specific
> about dumping the EC registers).
>
> http://aceracpi.googlecode.com/svn/trunk/acer_ec/acer_ec.pl
>
> ./acer_ec.pl regs
>
> (ACPI throws a few warnings in dmesg, because we're stepping on it's turf
> a bit here, but it's far simpler than having to write a kernel module
> just to get a few registers).
>
Awesome! I found the EC register for changing the backlight on my laptop using acer_ec.pl.
Register 0xE2 - Set screen brightness to <value>
Min: 0x00 Max: unknown
Windows Brightness key Min: 0x14 Max: 0x5F
Register 0xE3 - Fade out screen brightness from <value>
This is for HP dv6535ep laptop which should be similar to any other HP laptop in the 6xxx series.
I'll look at other backlight drivers if I can do something..
>
> -Carlos
> --
> E-Mail: carlos@strangeworlds.co.uk
> Web: strangeworlds.co.uk
> GPG Key ID: 0x23EE722D
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks!!!
- --
Angelo Arrifano AKA MiKNiX
CSE Student at UBI, Portugal
Gentoo Linux AMD64 Arch Tester
miknix@gmail.com
http://miknix.homelinux.com
PGP Pubkey online
- - -
The only thing that experience teaches us is that experience teaches us nothing.
-- Andre Maurois (Emile Herzog)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFHL2gzNahyoD2SuwsRAnqXAKCcWxVvXy4AudRvRPgqkYn8Oybo4wCffpn5
NkU/v5/HZFgqYc0GhEBzGi4=
=uPxz
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-05 18:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-04 19:55 Writing to the EC Erik Andrén
2007-11-04 21:23 ` Richard Hughes
2007-11-04 21:31 ` Pavel Troller
2007-11-05 0:55 ` Carlos Corbacho
2007-11-05 19:00 ` Ângelo Miguel Arrifano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox