devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/5] i2c: gpio: Convert to use descriptors
       [not found]     ` <CAMuHMdXabvax2Wru8j+MC4X5F+z5hoUo1tEbX+zn2AUW6QENVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-09-11 20:53       ` Linus Walleij
  0 siblings, 0 replies; only message in thread
From: Linus Walleij @ 2017-09-11 20:53 UTC (permalink / raw)
  To: Geert Uytterhoeven,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
  Cc: Wolfram Sang, Linux I2C, Linux MIPS Mailing List, Steven Miao,
	adi-buildroot-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Ralf Baechle, arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Lee Jones,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org

On Mon, Sep 11, 2017 at 1:27 PM, Geert Uytterhoeven
<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-11 20:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170910214424.14945-1-linus.walleij@linaro.org>
     [not found] ` <20170910214424.14945-2-linus.walleij@linaro.org>
     [not found]   ` <CAMuHMdXabvax2Wru8j+MC4X5F+z5hoUo1tEbX+zn2AUW6QENVA@mail.gmail.com>
     [not found]     ` <CAMuHMdXabvax2Wru8j+MC4X5F+z5hoUo1tEbX+zn2AUW6QENVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-11 20:53       ` [PATCH 1/5] i2c: gpio: Convert to use descriptors Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).