Run deblocking sequence when the driver gets probed.
* i2c-gpio,scl-output-only;
Set if SCL is an output only
+* i2c-gpio,sda-output-only;
+ Set if SDA is an output only
Example:
bus->set_scl(bus, 1);
udelay(delay);
- value = bus->get_sda(bus);
+ value = bus->get_sda ? bus->get_sda(bus) : 0;
udelay(delay);
bus->set_scl(bus, 0);
udelay(2 * delay);
{
unsigned int delay = bus->udelay;
+ if (!bus->get_sda)
+ return -EOPNOTSUPP;
+
debug("%s: chip %x buffer: %p len %d\n", __func__, chip, buffer, len);
while (len-- > 0)
bus->udelay = dev_read_u32_default(dev, "i2c-gpio,delay-us",
DEFAULT_UDELAY);
- bus->get_sda = i2c_gpio_sda_get;
+ if (dev_read_bool(dev, "i2c-gpio,sda-output-only"))
+ bus->get_sda = NULL;
+ else
+ bus->get_sda = i2c_gpio_sda_get;
bus->set_sda = i2c_gpio_sda_set;
if (dev_read_bool(dev, "i2c-gpio,scl-output-only"))
bus->set_scl = i2c_gpio_scl_set_output_only;