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

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

 



On 26 November 2012 18:58, Paul Carpenter
<paul@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>> +    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.

I didn't get the question correctly. You mean you want me to explain what
GPIOF_OPEN_DRAIN and GPIOF_OUT_INIT_HIGH will do?

If no, exit();

GPIOF_OPEN_DRAIN: With this flag, all will work normally, leaving
gpio_set_val(1);
This will put the GPIO in input mode instead of writing one to it in
output mode.

GPIOF_OUT_INIT_HIGH: This will set the direction to output first, and then will
do gpio_set_val(1), which will do what is mentioned in GPIOF_OPEN_DRAIN and
so this action should be safe enough.

--
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


[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