Hi Uwe,

On 28 September 2012 12:57, Uwe Kleine-König
<u.kleine-koe...@pengutronix.de> wrote:
> On Fri, Sep 28, 2012 at 09:11:34AM +0530, viresh kumar wrote:

>> This was done, because few platforms may not have configuration bits to read
>> status of sda line.. For them skip_sda_polling was required.
>>
>> Whereas, others would need this to see if we can return early.

> What is the upside of returning early? I'd say, just don't do it.

Save time. Why give additional clocks when you don't actually need them?
Can use likely/unlikely to make it more efficient for 9 clock pulse
scenario though.

>> >> + * @put_gpio: called after recover_bus() to get padmux configured for 
>> >> scl line
>> >> + *   as scl. Only required if is_gpio_recovery == true.
>> >> + * @scl_gpio: gpio number of the scl line. Only required if 
>> >> is_gpio_recovery ==
>> >> + *   true.
>> >> + * @sda_gpio: gpio number of the sda line. Only required if 
>> >> is_gpio_recovery ==
>> >> + *   true and skip_sda_polling == false.
>> >> + * @scl_gpio_flags: flag for gpio_request_one of scl_gpio. 0 implies
>> >> + *   GPIOF_OUT_INIT_LOW.
>> > IMHO you should not make this configurable but use
>> >
>> >         GPIOF_OUT_INIT_HIGH | GPIOF_OPEN_DRAIN
>>
>> Discussed here:
>> http://www.spinics.net/lists/linux-i2c/msg07325.html

> Why do you default to GPIOF_OUT_INIT_LOW? The idle state of scl is high.
> Using low here introduces an additional clk pulse.

We aren't giving any clock pulses to scl line. Are you talking about sda?

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to