Thread (1 message) 1 message, 1 author, 2017-09-11

Re: [PATCH 1/5] i2c: gpio: Convert to use descriptors

From: Linus Walleij <hidden>
Date: 2017-09-11 20:53:14
Also in: linux-arm-kernel, linux-i2c, linux-mips

On Mon, Sep 11, 2017 at 1:27 PM, Geert Uytterhoeven
[off-list ref] wrote:
FYI, I recently posted a series to deprecate (at least for DT) this error
prone indexing, in favor of using named GPIOs:

    [PATCH/RFC 0/3] i2c: gpio: Add support for named gpios in DT
    http://www.spinics.net/lists/devicetree/msg191936.html
Grrr I seem to have fallen off the list and don't have these mails
in my inbox ....

Anyways [1/3]:
 Required properties:
  - compatible = "i2c-gpio";
- - gpios: sda and scl gpio
-
+ - sda-gpios: gpio used for the sda signal
+ - scl-gpios: gpio used for the scl signal
+ - gpios: sda and scl gpio, alternative for {sda,scl}-gpios (deprecated)
Say that the GPIOs should *always* be flagged as open drain
using e.g. (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) as flags.
 Optional properties:
  - i2c-gpio,sda-open-drain: sda as open drain
These should be deprecated. Nobody understands what they mean
anyway, but they mean "I set this line up as open drain behind your
back so don't try to do open drain emulation on me", which is just
totally convoluted.

The GPIO subsystems has ways to indicate this directly to the driver
nowadays.

Add an example?

Patch [2/3]: needs to be rewritten on top of the descriptor code.
(I can do it if you like.)

Patch [3/3] should be:

+ sda-gpios = <&pfc 208 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&pfc 91 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help