/* 10-bit address, all values are valid */
if (addr > 0x3ff)
return -EINVAL;
+ } else if (flags & I2C_CLIENT_SPEEDY) {
+ /* 12-bit address for SPEEDY, all values are valid */
+ if (addr > 0xfff)
+ return -EINVAL;
} else {
/* 7-bit address, reject the general call address */
if (addr == 0x00 || addr > 0x7f)
info.flags |= I2C_CLIENT_SLAVE;
}
+ if (of_get_property(node, "i2c-speedy-address", NULL))
+ info.flags |= I2C_CLIENT_SPEEDY;
+
if (i2c_check_addr_validity(addr, info.flags)) {
dev_err(&adap->dev, "of_i2c: invalid addr=%x on %pOF\n",
addr, node);
#define I2C_CLIENT_WAKE 0x80 /* for board_info; true iff can wake */
#define I2C_CLIENT_SCCB 0x9000 /* Use Omnivision SCCB protocol */
/* Must match I2C_M_STOP|IGNORE_NAK */
+#define I2C_CLIENT_SPEEDY 0x40 /* 12 bit of slave address for speedy */
+ /* 4bit(device id) + 8bit(register offet) */
/* i2c adapter classes (bitmask) */
#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */