kernel-ark/arch/arm
Linus Walleij e0fc62a655 w1: w1-gpio: Convert to use GPIO descriptors
The w1 master driver includes a complete open drain emulation
reimplementation among other things.

This converts the driver and all board files using it to use
GPIO descriptors associated with the device to look up the
GPIO wire, as well ass the optional pull-up GPIO line.

When probed from the device tree, the driver will just pick
descriptors and use them right off. For the two board files
in the kernel, we add descriptor lookups so we do not need
to keep any old platform data handling around for the GPIO
lines.

As the platform data is also a state container for this driver,
we augment it to contain the GPIO descriptors.

w1_gpio_write_bit_dir() and w1_gpio_write_bit_val() are gone
since this pair was a reimplementation of open drain emulation
which is now handled by gpiolib.

The special "linux,open-drain" flag is a bit of mishap here:
it has the same semantic as the same flags in I2C: it means
that something in the platform is setting up the line as
open drain behind our back. We handle this the same way as
in I2C.

To drive the pull-up, we need to bypass open drain emulation
in gpiolib for the line, and this is done by driving it high
using gpiod_set_raw_value() which has been augmented to have
the semantic of overriding the open drain emulation.

We also augment the documentation to reflect the way to pass
GPIO descriptors from the machine.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-12-08 15:32:53 +01:00
..
boot ARM: Device-tree updates for 4.15 2017-11-16 15:48:26 -08:00
common Merge branch 'pm-sleep' 2017-11-13 01:41:20 +01:00
configs ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
crypto License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
firmware
include Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-11-26 15:03:49 -08:00
kernel Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-11-26 15:03:49 -08:00
kvm GICv4 Support for KVM/ARM for v4.15 2017-11-17 13:20:01 +01:00
lib License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-actions ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-alpine License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-axxia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-bcm ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-berlin
mach-clps711x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-cns3xxx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-davinci ARM: Device-tree updates for 4.15 2017-11-16 15:48:26 -08:00
mach-digicolor License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-dove License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ebsa110 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-efm32 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ep93xx ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-exynos ARM: EXYNOS: Remove Exynos4212 related dead code 2017-10-08 13:52:09 +02:00
mach-footbridge Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
mach-gemini License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-highbank License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-hisi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-imx ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-integrator ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-iop13xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-iop32x treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mach-iop33x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ixp4xx w1: w1-gpio: Convert to use GPIO descriptors 2017-12-08 15:32:53 +01:00
mach-keystone License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ks8695 Merge branch 'i2c/for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2017-11-14 17:52:21 -08:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek ARM: mediatek: Cocci spatch "of_table" 2017-10-13 16:56:55 +02:00
mach-meson ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b 2017-10-29 08:40:08 -07:00
mach-mmp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-moxart
mach-mv78xx0 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-mvebu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1 ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-omap2 ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-orion5x treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mach-oxnas
mach-picoxcell
mach-prima2 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-pxa w1: w1-gpio: Convert to use GPIO descriptors 2017-12-08 15:32:53 +01:00
mach-qcom
mach-realview
mach-rockchip
mach-rpc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-s3c24xx ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-s3c64xx ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-s5pv210
mach-sa1100 Merge branch 'i2c/for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2017-11-14 17:52:21 -08:00
mach-shmobile ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-socfpga License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-spear License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-sti
mach-stm32
mach-sunxi
mach-tango License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-tegra Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
mach-u300 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-uniphier kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
mach-ux500 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-versatile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-vexpress ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-vt8500 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-w90x900 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-zx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-zynq License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-11-26 15:03:49 -08:00
net
nwfpe License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-iop License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-omap ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
plat-orion
plat-pxa
plat-samsung ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
plat-versatile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
probes arm/kprobes: Remove jprobe test case 2017-11-07 11:25:14 +01:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
vfp
xen xen: re-introduce support for grant v2 interface 2017-11-06 15:50:17 -05:00
Kconfig ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
Kconfig-nommu Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-11-16 12:50:35 -08:00
Kconfig.debug Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-11-26 15:03:49 -08:00
Makefile Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00