linux/arch/powerpc/sysdev
Grant Likely 594fa265e0 of/gpio: stop using device_node data pointer to find gpio_chip
Currently the kernel uses the struct device_node.data pointer to resolve
a struct gpio_chip pointer from a device tree node.  However, the .data
member doesn't provide any type checking and there aren't any rules
enforced on what it should be used for.  There's no guarantee that the
data stored in it actually points to an gpio_chip pointer.

Instead of relying on the .data pointer, this patch modifies the code
to add a lookup function which scans through the registered gpio_chips
and returns the gpio_chip that has a pointer to the specified
device_node.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Anton Vorontsov <avorontsov@ru.mvista.com>
CC: Grant Likely <grant.likely@secretlab.ca>
CC: David Brownell <dbrownell@users.sourceforge.net>
CC: Bill Gatliff <bgat@billgatliff.com>
CC: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Jean Delvare <khali@linux-fr.org>
CC: linux-kernel@vger.kernel.org
CC: devicetree-discuss@lists.ozlabs.org
2010-07-05 16:14:30 -06:00
..
bestcomm of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
qe_lib of/gpio: stop using device_node data pointer to find gpio_chip 2010-07-05 16:14:30 -06:00
6xx-suspend.S [POWERPC] Add 6xx-style HID0_SLEEP support. 2008-05-16 23:22:28 +10:00
axonram.c of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
cpm1.c of/gpio: Kill of_gpio_chip and add members directly to gpio_chip 2010-07-05 16:14:30 -06:00
cpm2.c powerpc/fsl-cpm: Configure clock correctly for SCC 2010-04-19 23:13:03 -05:00
cpm2_pic.c powerpc: Remove whitespace in irq chip name fields 2010-02-17 14:02:48 +11:00
cpm2_pic.h powerpc/cpm2: Checkpatch cleanup 2010-03-04 10:43:58 -06:00
cpm_common.c of/gpio: Kill of_gpio_chip and add members directly to gpio_chip 2010-07-05 16:14:30 -06:00
dart.h
dart_iommu.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dcr-low.S powerpc/4xx: Extended DCR support v2 2008-12-21 14:21:15 +11:00
dcr.c powerpc: Const-qualify Device Node Argument to DCR Resource Extent API 2008-12-21 14:21:16 +11:00
fsl_gtm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
fsl_lbc.c [MTD] [NAND] FSL-UPM: add multi chip support 2009-04-06 07:17:09 -07:00
fsl_msi.c of/powerpc: fix fsl_msi device node pointer 2010-06-02 22:26:42 -06:00
fsl_msi.h powerpc/fsl_msi: add removal path and probe failing path 2010-05-24 21:26:35 -05:00
fsl_pci.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
fsl_pci.h powerpc/fsl: Setup PCI inbound window based on actual amount of memory 2009-05-19 00:50:44 -05:00
fsl_pmc.c of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
fsl_rio.c of/powerpc: fix 85xx RapidIO device node pointer 2010-06-02 01:41:37 -06:00
fsl_soc.c powerpc/85xx: Kconfig cleanup 2009-11-20 16:45:27 -06:00
fsl_soc.h powerpc/fsl_soc: isolate legacy fsl_spi support to mpc832x_rdb boards 2009-04-01 08:59:23 -07:00
grackle.c of: add 'of_' prefix to machine_is_compatible() 2010-02-09 08:33:00 -07:00
i8259.c powerpc: Convert i8259_lock to raw_spinlock 2010-02-19 14:52:31 +11:00
indirect_pci.c powerpc/pci: Clean up direct access to sysdata by indirect ops 2009-05-21 15:44:22 +10:00
ipic.c powerpc: Convert ipic_lock to raw_spinlock 2010-02-19 14:52:31 +11:00
ipic.h [POWERPC] ipic: ack only for edge interrupts 2007-12-12 01:53:07 -06:00
Kconfig powerpc: Move 8xxx GPIO Kconfig under the platform menu 2008-09-23 23:36:32 -05:00
Makefile powerpc/85xx/86xx: Add suspend/resume support 2009-11-11 21:43:28 -06:00
micropatch.c [POWERPC] CPM: Rename commproc to cpm1 and cpm2_common.c to cpm2.c 2008-01-28 08:31:05 -06:00
mmio_nvram.c powerpc/nvram: Allow byte length reads from mmio NVRAM driver 2009-08-20 10:29:22 +10:00
mpc5xxx_clocks.c powerpc/5xxx: Add common mpc5xxx_get_bus_frequency() function 2009-06-17 00:30:22 -06:00
mpc8xx_pic.c powerpc: Remove whitespace in irq chip name fields 2010-02-17 14:02:48 +11:00
mpc8xx_pic.h
mpc8xxx_gpio.c of/gpio: Kill of_gpio_chip and add members directly to gpio_chip 2010-07-05 16:14:30 -06:00
mpic.c powerpc/cpumask: Convert mpic driver to new cpumask API 2010-05-06 18:01:46 +10:00
mpic.h irq: change ->set_affinity() to return status, fix 2009-05-06 07:55:33 +02:00
mpic_msi.c powerpc: Fix MSI support on U4 bridge PCIe slot 2009-12-18 14:55:43 +11:00
mpic_pasemi_msi.c powerpc: Remove whitespace in irq chip name fields 2010-02-17 14:02:48 +11:00
mpic_u3msi.c powerpc: Fix MSI support on U4 bridge PCIe slot 2009-12-18 14:55:43 +11:00
msi_bitmap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mv64x60.h
mv64x60_dev.c powerpc: Add coherent_dma_mask to mv64x60 devices 2010-02-17 14:02:47 +11:00
mv64x60_pci.c sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
mv64x60_pic.c powerpc: Remove get_irq_desc() 2009-10-30 17:20:55 +11:00
mv64x60_udbg.c [POWERPC] Fix mv64x60 early console code to use cell-index property 2008-04-24 20:57:34 +10:00
of_rtc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pmi.c of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
ppc4xx_gpio.c of/gpio: Kill of_gpio_chip and add members directly to gpio_chip 2010-07-05 16:14:30 -06:00
ppc4xx_pci.c powerpc/44x: Adding PCI-E support for PowerPC 460SX based SOC. 2010-05-07 15:07:19 -04:00
ppc4xx_pci.h powerpc/44x: Adding PCI-E support for PowerPC 460SX based SOC. 2010-05-07 15:07:19 -04:00
ppc4xx_soc.c powerpc/4xx: Add optional "reset_type" property to control reboot via dts 2010-05-05 12:51:54 -04:00
rtc_cmos_setup.c powerpc: rtc_cmos_setup: assign interrupts only if there is i8259 PIC 2008-07-28 08:47:38 -05:00
simple_gpio.c of/gpio: Kill of_gpio_chip and add members directly to gpio_chip 2010-07-05 16:14:30 -06:00
simple_gpio.h powerpc: Implement GPIO driver for simple memory-mapped banks 2008-12-30 11:13:45 -06:00
tsi108_dev.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
tsi108_pci.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
uic.c powerpc: Remove whitespace in irq chip name fields 2010-02-17 14:02:48 +11:00
xilinx_intc.c powerpc: Make "intspec" pointers in irq_host->xlate() const 2009-12-09 17:10:37 +11:00
xilinx_pci.c powerpc/virtex: Add support for Xilinx PCI host bridge 2009-06-06 10:14:22 -06:00