summaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)Author
2012-05-03gpio: tegra: implement gpio_request and gpio_free.Laxman Dewangan
Recent pinctrl discussions concluded that gpiolib APIs should in fact do whatever is required to mux a GPIO onto pins. This change is based on the work done by Stephen Warren in mainline kernel. ----- commit 3e215d0a19c2a0c389bd9117573b6dd8e46f96a8 gpio: tegra: Hide tegra_gpio_enable/disable() Recent pinctrl discussions concluded that gpiolib APIs should in fact do whatever is required to mux a GPIO onto pins, by calling pinctrl APIs if required. This change implements this for the Tegra GPIO driver, and removes calls to the Tegra-specific APIs from drivers and board files. ---- Change-Id: I482ea5c177cf2ee6fa06ddac48b556f1508efacb Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/98466 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
2012-03-07gpio: gpiolib: Support for open source/emitter gpiosLaxman Dewangan
Adding support for the open source gpio on which client can specify the open source property through GPIO flag GPIOF_OPEN_SOURCE at the time of gpio request. The open source pins are normally pulled low and it cannot be driven to output with value of 0 and so when client request for setting the pin to LOW, the gpio will be set to input direction to make pin in tristate and hence PULL-DOWN on pins will make the state to LOW. The open source pin can be driven to HIGH by setting output with value of 1. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> cherry-picked from mainline commit 25553ff0756c59b617af6bdd280c94e943164184 Change-Id: I3062a5dec7bf745b624d9a147f79d3830927325b Reviewed-on: http://git-master/r/88265 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-03-07gpio: gpiolib: Support for open drain/collector gpiosLaxman Dewangan
Adding support for the open drain gpio on which client can specify the open drain property through GPIO flag GPIOF_OPEN_DRAIN at the time of gpio request. The open drain pins are normally pulled high and it cannot be driven to output with value of 1 and so when client request for setting the pin to HIGH, the gpio will be set to input direction to make pin in tristate and hence PULL-UP on pins will make the state to HIGH. The open drain pin can be driven to LOW by setting output with value of 0. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cherry-picked from mainline aca5ce14eb773a75e5d935968b2e390dc5bd29c3 Change-Id: I097caebcc7cf6fb1497bb0395320dfc061bb6277 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/88264
2012-02-16gpio: tps65910: Add sleep control supportLaxman Dewangan
The device tps65910/tps65911 supports the sleep functionality in some of gpios. If gpio is configured in output mode and sleep is enabled then during device sleep state, the output of gpio becomes LOW regardless of non-sleep output value. Such gpio can be used to control regulator switch such that output of regulator is off in device sleep state. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Linus Walleij <linus.walleij@linaro.org> Cherry-picked from mainline commit: ccd68fff6b86b93a2d69caf4679c0ba4ca6dbc53 Resolve merge conflicts. Change-Id: Ib424499821fde2ae916ae3792e980eab7dbdae4a Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/79788
2012-02-15ARM: 7052/1: gpio/tegra: Remove use of irq_to_gpioStephen Warren
irq_to_gpio is being removed. Replace the only use of that API by the ARM Tegra sub-architecture. Upstream v3.2 commit 470080015c1f8bbd15ba1486d5c4bd8a3e7fa79a Change-Id: I9ba3ed66cc6262f14f1fdcfbb6eee78cfe818f7e Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/83537 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-02-15ARM: 7053/1: gpio/tegra: Implement gpio_chip.to_irqStephen Warren
Upstream v3.2 commit 438a99c078b1bc3c9aebd92e7928f2477311d3e5 Change-Id: I00f9df65565c3b086438818ea29d2337871655a8 Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/83536 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-02-14gpio: tegra: FIx build warningLaxman Dewangan
Fixing build warning as kernel/drivers/gpio/gpio-tegra.c:217: warning: initialization from incompatible pointer type Change-Id: Ic03c1711cf93b4ada80adaf1589c6080e6166e90 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/83409
2012-02-13gpio: tps65910: Use correct offset for gpio initializationLaxman Dewangan
Using the correct gpio offset for setting the initial value of gpio when setting output direction. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> cherry picked from mainline 94bd2442d25454a874e070d871f50f4ce9d57101 Change-Id: Ice0f6d0e89f2cdd05a27a82d55a90f6b99da1b06 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/79182 Reviewed-by: Automatic_Commit_Validation_User
2012-01-19gpio: tegra: add stub set_debounce callbackVarun Wadekar
gpiolib spits out error messages if the underlying driver does not implement the set_debounce api. Add stub api since Tegra does not support gpio debounce in hardware. Bug 924471 Change-Id: Iadd4ddb41a3a028edf7d55fccf100c8d4bcb5fa2 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75639 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-12-21ARM: tegra: gpio: export gpio enable/disable api'sVarun Wadekar
Export tegra_gpio_enable/disable api's to make them available to loadable kernel modules. Bug 845065 Change-Id: Ib17bd895fe03ffbf98fbf5e7e5d79dc3ec5f9235 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-11-30HACK merge fixups for compileDan Willemsen
Rebase-Id: Rbc628711479b187a90437bea94776066c7a58b54
2011-11-30arm: tegra: power: lp0 wake enable modifiedBitan Biswas
GPIO based lp0 wakeup needed to support search for its irq as well as GPIO bank irq in table. This is implemented in this change. lp0 wakeup irq enable using enable_irq_wake needs to be called in specific drivers. Additionally, in some cases wake irq needs to be updated in tegra wakeup table. bug 890309 bug 902114 Change-Id: I983318172ffb020f565763cfe2bb29018223dcd0 Reviewed-on: http://git-master/r/64395 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rffcadeee341a73f2ea6d62e31d507e9a8dce5a0e
2011-11-30ARM: tegra: gpio: Add range check for gpio enable/disableChaitanya Bandi
Added the range check into tegra_gpio_enable and tegra_gpio_disable Bug 897387 Reviewed-on: http://git-master/r/62641 (cherry picked from commit 091b3906b2dd64cd58221e7e61a24a57dabad16c) Change-Id: I9be8129397a1dccbea4a04f6b6ed7d4529bf45c3 Reviewed-on: http://git-master/r/63174 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rfaf0efdbc60208a56e4e4f073e3661ad1511694c
2011-11-30ARM: tegra: gpio: Set a gpio to tristate or normalChaitanya Bandi
Create mapping from gpio to pingroup and set gpio to normal or tristate Bug 866633 Reviewed-on: http://git-master/r/56557 (cherry picked from commit 321ded98d41170b9e32d60177c6808492ccdf115) Change-Id: I3d1b979717f1c6b208af3df0a7dfe603e5272d21 Reviewed-on: http://git-master/r/61120 Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R5991c2cbc11aa35345fde7f08c0bfeb306e85e1e
2011-11-30ARM tegra: gpio: Correct gpio interrupt init sequenceDaehyoung Ko
It is possible for GPIO interrupt to occur when registering handler since set_irq_chained_handler enables GPIO interrupt. Thus all relevant variables are required to be initialized before calling set_irq_chained_handler. Also add initialization of interrupt status register. Bug 884569 Reviewed-on: http://git-master/r/58218 (cherry picked from commit e03fe4cc1bf06fa6c32c0520e2ba31f009f9301d) Change-Id: Ic76f95215b61d6e091ae1cfa11522f8af9c3eecd Reviewed-on: http://git-master/r/60475 Reviewed-by: Daehyoung Ko <dko@nvidia.com> Tested-by: Daehyoung Ko <dko@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R5340918dccc1a8b1d95c5b629cc985f44d45fb67
2011-11-30arm: tegra: gpio: API to configure pins as gpio with init valueLaxman Dewangan
Adding api to configure pins in gpio mode with init value before gpio library is up. This will provide to configure the pins in initial state and avoid any glitch in pins. bug 876305 Reviewed-on: http://git-master/r/56630 (cherry picked from commit 9e357b69d25f96c13acb660860bcdf8e0ab0a1ef) Change-Id: Ia14721c0bf96e1a45561139fdbbf2d995b9a4963 Reviewed-on: http://git-master/r/57265 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rc775d23898a6275d633e4474e6cf9b10395697e2
2011-11-30arm: tegra: gpio_get_value can read output gpioSeongho Joo
gpio_get_value only supports input pin. extend the usage for output pin. Bug 839772 Original-Change-Id: I5a8f5572148afde23e082af18f2e37377ae50bd1 Reviewed-on: http://git-master/r/36758 Tested-by: Seongho Joo <sjoo@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R021e8ff272e4cecd855a574b008dbf8663378970
2011-11-30ARM: tegra: power: Use CONFIG_PM_SLEEP instead of CONFIG_PMScott Williams
For Linux 2.6.39, CONFIG_PM_SLEEP is the proper kernel configuration parameter to use on Tegra for power management, and not CONFIG_PM. CONFIG_PM does not have the required dependency on CONFIG_SUSPEND necessary to pull in the CPU suspend/resume functionality used by Tegra. Also fixes compilation errors when CONFIG_PM and by implication CONFIG_PM_SLEEP are not configured. Change-Id: I8bb380ae7c6b22759bfbc223febc28f585111aad Reviewed-on: http://git-master/r/40458 Tested-by: Daniel Willemsen <dwillemsen@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Rebase-Id: R61d656cd67439aa9f466c381845d7a4685fc8648
2011-11-30arm: tegra: Clean up SOC conditionalsScott Williams
Change SOC conditionals to make them more forward-looking. Original-Change-Id: Ib60db4e690c2f396afdec962616d735548b5a8a9 Reviewed-on: http://git-master/r/32706 Reviewed-by: Niket Sirsi <nsirsi@nvidia.com> Tested-by: Niket Sirsi <nsirsi@nvidia.com> Rebase-Id: R77c675a1995116098b58f1f775bc7c3cc8722998
2011-11-30arm: tegra: gpio: Removing fixed number of gpio bank.Laxman Dewangan
The number of gpio bank varies from arch to arch and in this case, the gpio bank count should not fix to single arch. Making the gpio bank count based on number of gpio bank available in a corresponding architecture. Original-Change-Id: I16ece8945db519d73c702c8bb832b42cc0bf35fc Reviewed-on: http://git-master/r/29625 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R31dcbc6e0511c4ace85979f059dabdb5b62d4270
2011-11-30[ARM/tegra] Add Tegra3 supportScott Williams
Bug 764354 Original-Change-Id: I8a390eb4dae87dceacb97461f23d13554868b046 Reviewed-on: http://git-master/r/12228 Reviewed-by: Scott Williams <scwilliams@nvidia.com> Tested-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I8e6b8303898796419fb5a759cd16edff9aeac081 Rebase-Id: R2866240384c6c24f46bd7ef54bc3dc9140d9e96b
2011-11-30ARM: tegra: gpio: remove manual acks in irq handlerColin Cross
The interrupt will be acked by the generic irq handler, there is no need to ack it manually. Change-Id: I48ffc78d90f7951afcfde849300fcbc0673a876a Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30ARM: tegra: gpio: Convert suspend/resume to syscoreColin Cross
Signed-off-by: Colin Cross <ccross@android.com> Change-Id: I5cd5b83eb0a760826fc7443f06cd1e94bba359db
2011-11-30ARM: tegra: gpio: Add support for waking from suspendColin Cross
Change-Id: Ifd11daa6eac4ca747aba4a4d98f41270b7055bbb Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30ARM: tegra: remove unused mach/suspend.hColin Cross
mach/suspend.h is not used yet, and its functions will be replaced with syscore ops. Delete it. Change-Id: I7b32d3514e7f4427c7d5faa97c1954a7a2cc286c Signed-off-by: Colin Cross <ccross@android.com>
2011-10-13gpio-pca953x: fix gpio_baseHartmut Knaack
gpio_base was set to 0 if no system platform data or open firmware platform data was provided. This led to conflicts, if any other gpiochip with a gpiobase of 0 was instantiated already. Setting it to -1 will automatically use the first one available. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-10-13gpio/omap: fix build error with certain OMAP1 configsJanusz Krzysztofik
With commit f64ad1a0e21a, "gpio/omap: cleanup _set_gpio_wakeup(), remove ifdefs", access to build time conditionally omitted 'suspend_wakeup' member of the 'gpio_bank' structure has been placed unconditionally in function _set_gpio_wakeup(), which is always built. This resulted in the driver compilation broken for certain OMAP1, i.e., non-OMAP16xx, configurations. Really required or not in previously excluded cases, define this structure member unconditionally as a fix. Tested with a custom OMAP1510 only configuration. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Kevin Hilman <khilman@ti.com> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-09-14drivers/gpio/gpio-generic.c: fix build errorsRussell King
Building a kernel with hotplug disabled results in a link failure: `bgpio_remove' referenced in section `___ksymtab_gpl+bgpio_remove' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o This is because of bgpio_remove() is exported. It is illegal to export symbols which are discarded either at link time or as part of an init/exit section. Fix this by dropping the __devexit attributation from bgpio_remove(). Also drop the __devinit attributation from bgpio_init(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-01Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: gpio_msm: Move Qualcomm MSM v2 gpio driver into drivers gpio_msm: Move Qualcomm v6 MSM driver into drivers msm: gpio: Fold register defs into C file msm: gpiomux: Move public API to public header msm: gpio: Remove ifdefs on gpio chip registers msm: gpio: Remove chip-specific register definitions msm: Remove chip-ifdefs for GPIO io mappings msm: gpio: Remove unsupported devices gpio: ab8500: fix MODULE_ALIAS for ab8500 of/gpio: export of_gpio_simple_xlate
2011-08-01Merge branch 'msm-move-gpio' of ↵Grant Likely
git://codeaurora.org/quic/kernel/davidb/linux-msm into gpio/next Conflicts: drivers/gpio/Kconfig drivers/gpio/Makefile
2011-08-01gpio_msm: Move Qualcomm MSM v2 gpio driver into driversDavid Brown
Migrate the driver for the v7-based MSM chips into drivers/gpio. The driver is unchanged, only moved. Change-Id: I810db5b50b71cdca4e869aa0d0310f7f48781a55 Signed-off-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-08-01gpio_msm: Move Qualcomm v6 MSM driver into driversDavid Brown
Migrate the driver for the v6-based MSM chips into drivers/gpio. The driver is unchanged, only moved. Change-Id: I03ba597b95b4d62b42da112a8efac88d67aa40f9 Signed-off-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-07-31tps65912: gpio: add gpio driverMargarita Olaya
TPS65912 has five GPIOs that can be configured for different purposes. Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-28gpio: ab8500: fix MODULE_ALIAS for ab8500Axel Lin
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS with "platform:"), the platform modalias is prefixed with "platform:". This patch changes the MODULE_ALIAS to "platform:ab8500-gpio". Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
2011-07-22Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: (61 commits) gpio/mxc/mxs: fix build error introduced by the irq_gc_ack() renaming mcp23s08: add i2c support mcp23s08: isolate spi specific parts mcp23s08: get rid of setup/teardown callbacks gpio/tegra: dt: add binding for gpio polarity mcp23s08: remove unused work queue gpio/da9052: remove a redundant assignment for gpio->da9052 gpio/mxc: add device tree probe support ARM: mxc: use ARCH_NR_GPIOS to define gpio number gpio/mxc: get rid of the uses of cpu_is_mx() gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables gpio: Move mpc5200 gpio driver to drivers/gpio GPIO: DA9052 GPIO module v3 gpio/tegra: Use engineering names in DT compatible property of/gpio: Add new method for getting gpios under different property names gpio/dt: Refine GPIO device tree binding gpio/ml-ioh: fix off-by-one for displaying variable i in dev_err gpio/pca953x: Deprecate meaningless device-tree bindings gpio/pca953x: Remove dynamic platform data pointer gpio/pca953x: Fix IRQ support. ...
2011-07-19gpio/mxc/mxs: fix build error introduced by the irq_gc_ack() renamingShawn Guo
The following commit renames irq_gc_ack() to irq_gc_ack_set_bit(), and makes gpio-mxc and gpio-mxs fail to build. 659fb32d1b67476f4ade25e9ea0e2642a5b9c4b5 genirq: replace irq_gc_ack() with {set,clr}_bit variants (fwd) The patch fixed a couple of typo of comma to semicolon. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-15gpio: wm831x: add a missing break in wm831x_gpio_dbg_showAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-15mcp23s08: add i2c supportPeter Korsgaard
Add i2c bindings for the mcp230xx devices. This is quite a lot simpler than the spi one as there's no funky sub addressing done (one struct i2c_client per struct gpio_chip). The mcp23s08_platform_data structure is reused for i2c, even though only a single mcp23s08_chip_info structure is needed. To use, simply fill out a platform_data structure and pass it in i2c_board_info, E.G.: static const struct mcp23s08_platform_data mcp23017_data = { .chip[0] = { .pullups = 0x00ff, }, .base = 240, }; static struct i2c_board_info __initdata i2c_devs[] = { { I2C_BOARD_INFO("mcp23017", 0x20), .platform_data = &smartview_mcp23017_data, }, ... }; Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-15mcp23s08: isolate spi specific partsPeter Korsgaard
Change spi member of struct mcp23s08 to be a ops-specific opaque data pointer, and move spi specific knowledge out of mcp23s08_probe_one(). No functional change, but is needed to add i2c support. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-15mcp23s08: get rid of setup/teardown callbacksPeter Korsgaard
There's no in-tree users, and bus notifiers are more generic anyway. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-14mcp23s08: remove unused work queuePeter Korsgaard
Never accessed anywhere. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-14gpio/da9052: remove a redundant assignment for gpio->da9052Axel Lin
We just set it twice in da9052_gpio_probe. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-11Merge branch 'master' into for-nextJiri Kosina
Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
2011-07-08gpio/mxc: add device tree probe supportShawn Guo
The patch adds device tree probe support for gpio-mxc driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-08gpio/mxc: get rid of the uses of cpu_is_mx()Shawn Guo
The patch removes all the uses of cpu_is_mx(). Instead, it utilizes platform_device_id to distinguish the different gpio types, IMX1_GPIO on i.mx1, IMX21_GPIO on i.mx21 and i.mx27, IMX31_GPIO on all other i.mx SoCs. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-08gpio/langwell_gpio: ack the correct bit for langwell gpio interruptsMathias Nyman
The wrong bit was masked when acking langwell gpio interrupts. Reason for maskig the wrong bit was probably because__ffs() and ffs() functions return bit indexes differently (0..31 vs 1..32) This fixes langwell based devices from hanging when a gpio interrupt is triggered and undoes the breakage which occurred in change set 732063b92bb727b27e61580ce278dddefe31c6ad Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-07gpio/mxc: add missing initialization of basic_mmio_gpio shadow variablesLothar Waßmann
The bgpio_init() function does not initialise the shadow register for the GPIO direction register. Thus, when configuring the first GPIO with gpio_set_direction() all other GPIOs of the same bank will be configured as inputs. Since the bgpio layer cannot know whether the register is readable, the initialisation should be done by the caller of bgpio_init(). Also, the 'data' shadow variable that is used inside basic_mmio_gpio to cache the current value of the GPIO_DR register is initialised from the GPIO_PSR register within bgpio_init(). Thus when setting the output value of a certain GPIO, the other GPIO outputs of the same bank will be set or cleared depending on the pin state of the GPIO inputs during bgpio_init(). Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-07Update my e-mail addressMichael Büsch
Signed-off-by: Michael Buesch <m@bues.ch> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-07-06gpio: Move mpc5200 gpio driver to drivers/gpioGrant Likely
GPIO drivers are getting consolidated into drivers/gpio. While at it, change the driver name to mpc5200-gpio* to avoid collisions. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>