Re: 10-bit address support

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

 



Hi Jean,

> I can think of 2 different ways of addressing the problem.
> 
> First way is to use a different device name format for 10-bit address
> devices, for example %d-10bit-%04x. This has the drawback that some
> user-space applications and libraries may not recognize these as valid
> i2c device names. libsensors and sensors-detect would be amongst these.

Wouldn't the cleanest solution be

"%d-%02x" for 7 bit
"%d-%04x" for 10 bit?

Yeah, I know that would really break userspace.

> I'd rather go with a larger offset such as 0x1000. This translates 0x2d
> to 0x102d which is more obviously "10-bit address 0x2d". We have 16
> bits to store the address so it shouldn't be an issue. Another possible
> offset would be 0xa000 (as 0xa is 10.)

I like 0xa000 a tad better than 0x1000, but well... Then again, those
devices are probably rare enough to take a non-intrusive approach.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux