Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Viresh Kumar wrote:
On 26 November 2012 17:15, Paul Carpenter
<paul@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Unless you know why the bus is stuck, how can you reset reminder this
method ONLY works if SCL is high and SDA probably was low and the slave
....

Hi Paul,

I completely agree with what you said, and i also feel the need of it now.
We don't have a solution for SCL stuck low, just by playing with pad values.
And need some sort of reset of device, etc as mentioned by you earlier.

What we can do here, is check SCL's value and give an error message for
SCL stuck low + return error.

Yes best method error to mean  "SCL stuck low or long clock stretch"

The short circuit mentioned earlier will not happen in our case as we
are setting gpio flags as OPEN_DRAIN and so we would never be writing
1 on SCL pad.

From an earlier thread comment

>> +    ret = gpio_request_one(bri->scl_gpio, GPIOF_OPEN_DRAIN |
>> +            GPIOF_OUT_INIT_HIGH, "i2c-scl");
>
>I always get wary of people driving I2C with non-open-drain, especially
>with stuck busses

I would want to know what "GPIOF_OUT_INIT_HIGH" did as that is
suspiciously driving output high at startup.


--
Paul Carpenter          | paul@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<http://www.pcserviceselectronics.co.uk/>    PC Services
<http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font
<http://www.gnuh8.org.uk/>  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny
<http://www.badweb.org.uk/> For those web sites you hate
--
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


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux