devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH V12 2/2] pinctrl: max77620: add pincontrol driver for MAX77620/MAX20024
Date: Tue, 24 May 2016 13:53:36 +0200	[thread overview]
Message-ID: <CACRpkdagHFegb0HHyshqOZyJLrdpZwMnQvBtsGeZhOB1p9Lgfg@mail.gmail.com> (raw)
In-Reply-To: <57443877.4010106@nvidia.com>

On Tue, May 24, 2016 at 1:18 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote:

> In this driver, it is configuration via pinctrl. Here pincontrol and gpio
> driver share same registers.
> Now, as we have the method to configure the open drain bit from the GPIO
> interface, we really dont need to do this from pinctrl framework.

OK good that works too...

> For doing from GPIO framework, the client need to aware that gpio is open
> drain type.
>
> Can we make something that open drain of pins can be provided via some
> common interface like DT of controller based on platforms configuration  and
> client need not to worry about this? For client, it will be simple gpio
> calls.

We have GPIO_OPEN_DRAIN in
include/dt-bindings/gpio/gpio.h
that can be added on the consumer side of the GPIO line
in the DT, it should work (just like GPIO_ACTIVE_LOW for example).

For descriptor tables
include/linux/gpio/machine.h
provides the same mechanism with the flag GPIO_OPEN_DRAIN

Notice that in both cases it is the consumer that specifies that it
needs the line to be set up as open drain, not the controller,
as it is a resource, the consumer needs to request what it needs.

So this can be done already today. Unless there is some bug.

Yours,
Linus Walleij

  reply	other threads:[~2016-05-24 11:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13  5:19 [PATCH V12 1/2] gpio: add DT binding doc for gpio of PMIC max77620/max20024 Laxman Dewangan
2016-05-13  5:19 ` [PATCH V12 1/2] pinctrl: add DT binding doc for pincontrol " Laxman Dewangan
2016-05-24 11:17   ` Linus Walleij
2016-05-13  5:19 ` [PATCH V12 2/2] gpio: max77620: add gpio driver for MAX77620/MAX20024 Laxman Dewangan
2016-05-24 11:09   ` Linus Walleij
     [not found]   ` <1463116755-30469-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-24 11:15     ` Linus Walleij
2016-05-24 11:07       ` Laxman Dewangan
2016-05-13  5:19 ` [PATCH V12 2/2] pinctrl: max77620: add pincontrol " Laxman Dewangan
2016-05-24 11:21   ` Linus Walleij
2016-05-24 11:18     ` Laxman Dewangan
2016-05-24 11:53       ` Linus Walleij [this message]
2016-05-24 11:07 ` [PATCH V12 1/2] gpio: add DT binding doc for gpio of PMIC max77620/max20024 Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdagHFegb0HHyshqOZyJLrdpZwMnQvBtsGeZhOB1p9Lgfg@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).