On Mon, Feb 13, 2012 at 11:59:47AM +0530, Laxman Dewangan wrote:Adding details of open drain configuration of the gpio so that
client can set the pin as open drain at the time of gpio request.
Signed-off-by: Laxman Dewangan<ldewangan@xxxxxxxxxx>
Linus mentioned that this should be part of pinctrl instead of the gpio API,
but I think there is an argument for making it part of the gpio API,
particularly since open-drain is pretty much a universal concept that all
gpio controllers can support (unlike driver strength) and as I said above, it
is already implicitly supported by gpiolib.
The difference with this
method is it would allow drivers like the gpio-i2c.c driver to set the
flag at gpio request time and then be able to always use gpio_set_value()
regardless of the pin mode.
However, I'm not thrilled about adding things to the already-horrible sysfs
abi. Please drop that hunk entirely or put it into a separate patch so it
doesn't block the core functionality.
Have you though about support for lines that are pulled low instead ofI think open drain pin should not be pulled low otherwise it will not be possible to make the pin as HIGH with the assumption that the OD pin should never be driven to HIGH
high? Those aren't as common, but it is conceivable that some
hardware would need it.