From: Michael Hennerich <michael.hennerich@analog.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Alexandre Courbot" <gnurou@gmail.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Hartmut Knaack" <knaack.h@gmx.de>,
"Paul Cercueil" <paul.cercueil@analog.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Paweł Moll" <pawel.moll@arm.com>,
"Mark Rutland" <mark.rutland@arm.com>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v3] iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs
Date: Mon, 21 Mar 2016 14:48:38 +0100 [thread overview]
Message-ID: <56EFFBB6.40806@analog.com> (raw)
In-Reply-To: <CACRpkdY=n30A5UkRX7avP7eWrPffh3faF8K_Ey2f2cs1GRZP7g@mail.gmail.com>
On 03/11/2016 05:37 PM, Linus Walleij wrote:
> On Mon, Mar 7, 2016 at 7:34 PM, Michael Hennerich
> <michael.hennerich@analog.com> wrote:
>> On 03/05/2016 03:32 PM, Jonathan Cameron wrote:
>
>>>> Changes since v2:
>>>> * Use child nodes to describe channels
>>>> * Fix probe return and driver remove path
>>>> * Move locking closer to where its used
>>>> * Remove WARN_ON but return error
>>>> * Remove OPEN DRAIN configuration option
>>>
>>> Why? I don't particularly mind as of course you aren't obliged to support
>>> every option in a driver, but I'm curious ;)
>>
>> I'm not aware that someone asked for that feature.
>> Supporting it the proper way requires a new GPIOF flag for gpiolib, which we
>> can still discuss later, in case someone asks for it.
>
> We have:
> include/dt-bindings/gpio/gpio.h
>
> /*
> * Open Drain/Collector is the combination of single-ended active low,
> * Open Source/Emitter is the combination of single-ended active high.
> */
> #define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_ACTIVE_LOW)
> #define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_ACTIVE_HIGH)
>
> So consumers can ask (in DT) for a line in open drain mode.
>
> FLAG_OPEN_DRAIN will be set internally in gpiolibs gpio_desc
> in of_find_gpio() as a result and it will behave as expected.
>
> Yours,
> Linus Walleij
>
Hi Linus,
The thing is that the device directly supports an OPEN DRAIN mode.
If the consumer asks for open drain mode - everything works as expected.
However instead of utilizing the on-chip feature, GPIOLIB will emulate
open drain behaviour by configuring the chip for input when someone
writes logic high.
So the comment above was really meant to say -
remove on-chip OPEN DRAIN mode, consumers should use the GPIOLIB
implementation if required.
--
Greetings,
Michael
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif
next prev parent reply other threads:[~2016-03-21 14:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 12:58 [PATCH v3] iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs michael.hennerich-OyLXuOCK7orQT0dZR+AlfA
[not found] ` <1457009883-4017-1-git-send-email-michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
2016-03-05 4:29 ` Rob Herring
2016-03-07 12:26 ` Michael Hennerich
2016-03-05 14:32 ` Jonathan Cameron
2016-03-07 12:34 ` Michael Hennerich
2016-03-11 16:37 ` Linus Walleij
2016-03-21 13:48 ` Michael Hennerich [this message]
2016-03-22 8:49 ` Linus Walleij
[not found] ` <CACRpkdYFUUoG--47qFA_za9X07qukST1vMBEoVC6J4z2LHcs3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-28 15:05 ` Jonathan Cameron
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=56EFFBB6.40806@analog.com \
--to=michael.hennerich@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=paul.cercueil@analog.com \
--cc=pawel.moll@arm.com \
--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).