[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <EF2E73589CA71846A15D0B2CDF79505D087B34BE8B@wm021.weinmann.com>
Date: Tue, 1 Nov 2011 06:59:46 +0100
From: "Voss, Nikolaus" <N.Voss@...nmann.de>
To: 'HÃ¥vard Skinnemoen' <hskinnemoen@...il.com>
CC: "'linux-arm-kernel@...ts.infradead.org'"
<linux-arm-kernel@...ts.infradead.org>,
"'Linux Kernel'" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] i2c-gpio.c: correct logic of pdata->scl_is_open_drain
Hi Havard,
> {sda,scl}_is_open_drain indicates that the GPIO hardware is set up to
> do open drain so the software doesn't have to, i.e.
> gpio_set_value(pin, 1) will turn off the output driver rather than
> drive the pin high, so the _val functions will do the right thing.
gpio_set_value(pin, 1) drives the output high same as
gpio_direction_output(pin, 1) does (documented in Documentation/gpio.txt),
so the gpio will be changed from open-drain to push-pull.
In contrast, gpio_direction_input(pin) will turn off the output driver.
Open-drain io is bound to "!is_open_drain" and push-pull io is bound to
"is_open_drain", so I still think this should be the other way round.
Niko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists