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

Re: kblevel - set keyboard illumination directly

On Tue, 2006-06-20 at 17:41 +1000, Paul Collins wrote:

> 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.)  

Yes, that's because Apple treats the rw bit which is in the first byte
as being there. That's expected, look at *any* kernel i2c code we use :)

> 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.

Indeed, that can't be right, you'll have to crawl /sys:


The LMU node on my tree is below uni-n@f8000000/i2c@f8001000/i2c-bus@0
which is the i2c bus named "uni-n 0". (combined from uni-n@....@0 as far
as I can tell). Maybe we can convince benh to add a property to the i2c
busses that tell which path they have in the device tree. Ben?


Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: