io/i2c: add support 10-bit addresses

10-bit addresses can range from 0 to (1111111111)2. That's why we need
to know in advance if the user is working with a 10-bit addressed
device.

The kernel driver also provides an ioctl function to enable the 10-bit
mode before setting the address globally on the device. Devfs enables
10-bit mode if it is required.

Change-Id: I71e64ab77c68903bbe9c0ac589300eb1bc29ff43
Reviewed-on: https://go-review.googlesource.com/22516
Reviewed-by: Minux Ma <minux@golang.org>
4 files changed