On 2/27/2012 3:40 PM, Rajeev KUMAR wrote: > In some i2c controller (like synopsys) you dont have control over i2c > data and clock lines. So clock toggling, you need to use gpio lines > which in turns maps on sda and scl line. > > For the controller in which you have control over sda and scl line there > is not need for gpio lines. You can directly write on registers. > > So to make the function more generic its better to control i2c lines > with gpio. There would be many drivers where we need to convert i2c pins to gpio pins and generate clock pulses: gpio_request(gpio); gpio_set_direction(gpio, out, 0); for (i = 1; i < count; i++) { gpio set val(gpio, 1); gpio set val(gpio, 0); } gpio_free(gpio); we can give generalized function inside i2c framework for this, so that multiple drivers can use it. Secondly there are drivers/devices where control of pins is available. For them we can provide driver hooks. I would try to provide a patch for this ASAP. Other suggestions are welcome. -- viresh -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html