Re: [PATCH v3] iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/11/2016 05:37 PM, Linus Walleij wrote:
On Mon, Mar 7, 2016 at 7:34 PM, Michael Hennerich
<michael.hennerich@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux