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: /sys/class/i2c-dev/*/name The LMU node on my tree is below [EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED] which is the i2c bus named "uni-n 0". (combined from [EMAIL PROTECTED]@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? johannes
signature.asc
Description: This is a digitally signed message part