[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kblevel - set keyboard illumination directly



Johannes Berg <johannes@sipsolutions.net> writes:

> On Tue, 2006-06-20 at 01:44 +1000, Paul Collins wrote:
>> I've extracted the keyboard illumination code from pbbuttonsd for my
>> own use.  I post it here in case it may be useful to others.
>
> Cool. One thing I would want to add is support for finding the address
> and bus directly via open firmware instead of that stupid 4..260 loop,
> you may look at http://git.sipsolutions.net/of-lib.git/ for a WIP
> library to access the device-tree.

I was able to use this code to find the lmu-controller node and read
the address from 'reg' - looks like it's the value shifted right one
bit.  (An old posting[1] does it similarly.)  But I can't work out how
to get the bus number (probed as 8 on my machine).  The linked patch
tries to use the last bit of 'reg', but that can't be right.


[1] http://lists.debian.org/debian-powerpc/2004/01/msg01042.html

-- 
Paul Collins
Melbourne, Australia

Dag vijandelijk luchtschip de huismeester is dood



Reply to: