aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-samsung.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-05-16ARM: EXYNOS: add GPC4 bank instanceSangsu Park1-1/+10
Add GPC4 bank instance which is included in rev1 of EXYNOS5. Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-11gpio/exynos: Fix compiler warnings when non-exynos machines are selectedSachin Kamat1-6/+12
Fixes the following compiler warnings: drivers/gpio/gpio-samsung.c: In function ‘samsung_gpiolib_init’: drivers/gpio/gpio-samsung.c:2980:1: warning: label ‘err_ioremap1’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2978:1: warning: label ‘err_ioremap2’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2976:1: warning: label ‘err_ioremap3’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2974:1: warning: label ‘err_ioremap4’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2722:55: warning: unused variable ‘gpio_base4’ [-Wunused-variable] drivers/gpio/gpio-samsung.c:455:32: warning: ‘exynos_gpio_cfg’ defined but not used [-Wunused-variable] drivers/gpio/gpio-samsung.c:2126:33: warning: ‘exynos4_gpios_1’ defined but not used [-Wunused-variable] drivers/gpio/gpio-samsung.c:2228:33: warning: ‘exynos4_gpios_2’ defined but not used [-Wunused-variable] drivers/gpio/gpio-samsung.c:2373:33: warning: ‘exynos4_gpios_3’ defined but not used [-Wunused-variable] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-05-11gpio: samsung: refactor gpiolib init for exynos4/5Olof Johansson1-188/+215
Only code move, no functional change. Main reason to do this was to get rid of the warnings: drivers/gpio/gpio-samsung.c: In function 'samsung_gpiolib_init': drivers/gpio/gpio-samsung.c:2974:1: warning: label 'err_ioremap4' defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2722:47: warning: unused variable 'gpio_base4' [-Wunused-variable] without adding more ifdef mess. I think this whole file would do well being coverted over to a platform driver and moving most of the tables out to SoC code and/or device trees, but since that changes init ordering it needs to be done with some care, i.e. not at this time. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-10gpio/exynos: Fix compiler warning in gpio-samsung.c fileSachin Kamat1-8/+8
Fixes the following warning when "SAMSUNG EXYNOS5" is not selected: warning: ‘exynos5_gpios_1’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_2’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_3’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_4’ defined but not used [-Wunused-variable] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-03-14gpio/samsung: use ioremap() for EXYNOS4 GPIOlibSangsu Park1-14/+34
This patch changes to use ioremap() for EXYNOS4210 so that we can drop the static mapping for EXYNOS SoCs. Note: Will be updated for all of Samsung GPIOlibs to use ioremap() next time. Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-14gpio/samsung: add support GPIOlib for EXYNOS5250Sangsu Park1-28/+411
This patch adds gpio_chips for EXYNOS5250 and replaces exynos4_xxx() with exynos_xxx() and variables to support exynos4 and exynos5 together. In addition, use ioreamp() for base address of gpios. Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-02-01gpio: samsung: adapt to changes in gpio specifier translator function declarationThomas Abraham1-10/+13
Commit 15c9a0acc3f7 (of: create of_phandle_args to simplify return of phandle parsing data) modifies the parameter list of of_xlate function pointer declaration in gpio_chip. Adapt the gpio specifier translate function for this change. Reported-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Tested-by: Karol Lewandowski <k.lewandowsk@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-01-09Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-0/+72
Device tree conversions for samsung and tegra Both platforms had some initial device tree support, but this adds much more to actually make it usable. * tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits) ARM: dts: Add intial dts file for EXYNOS4210 SoC, SMDKV310 and ORIGEN ARM: EXYNOS: Add Exynos4 device tree enabled board file rtc: rtc-s3c: Add device tree support input: samsung-keypad: Add device tree support ARM: S5PV210: Modify platform data for pl330 driver ARM: S5PC100: Modify platform data for pl330 driver ARM: S5P64x0: Modify platform data for pl330 driver ARM: EXYNOS: Add a alias for pdma clocks ARM: EXYNOS: Limit usage of pl330 device instance to non-dt build ARM: SAMSUNG: Add device tree support for pl330 dma engine wrappers DMA: PL330: Add device tree support ARM: EXYNOS: Modify platform data for pl330 driver DMA: PL330: Infer transfer direction from transfer request instead of platform data DMA: PL330: move filter function into driver serial: samsung: Fix build for non-Exynos4210 devices serial: samsung: add device tree support serial: samsung: merge probe() function from all SoC specific extensions serial: samsung: merge all SoC specific port reset functions ARM: SAMSUNG: register uart clocks to clock lookup list serial: samsung: remove all uses of get_clksrc and set_clksrc ... Fix up fairly trivial conflicts in arch/arm/mach-s3c2440/clock.c and drivers/tty/serial/Kconfig both due to just adding code close to changes.
2012-01-07Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds1-11/+20
Changes queued in gpio/next for the start of the 3.3 merge window * tag 'gpio-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6: gpio: Add decode of WM8994 GPIO configuration gpio: Convert GPIO drivers to module_platform_driver gpio: Fix typo in comment in Samsung driver gpio: Explicitly index samsung_gpio_cfgs gpio: Add Linus Walleij as gpio co-maintainer of: Add device tree selftests of: create of_phandle_args to simplify return of phandle parsing data gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags() gpio/microblaze: Eliminate duplication of of_get_named_gpio_flags() gpiolib: output basic details and consolidate gpio device drivers pch_gpio: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH spi/pl022: make the chip deselect handling thread safe spi/pl022: add support for pm_runtime autosuspend spi/pl022: disable the PL022 block when unused spi/pl022: move device disable to workqueue thread spi/pl022: skip default configuration before suspending spi/pl022: fix build warnings spi/pl022: only enable RX interrupts when TX is complete
2012-01-02gpio: Fix typo in comment in Samsung driverMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-01-02gpio: Explicitly index samsung_gpio_cfgsMark Brown1-10/+19
Make it easier to follow the by number references into samsung_gpio_cfgs by putting the indexes into the code initialising the array, improving readability a bit. Ideally we wouldn't be using magic array indexes at all but this is easier than coming up with a better way. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-12-23gpio/samsung: Add device tree support for EXYNOS4Thomas Abraham1-0/+72
As gpio chips get registered, a device tree node which represents the gpio chip is searched and attached to it. A translate function is also provided to convert the gpio specifier into actual platform settings for pin function selection, pull up/down and driver strength settings. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> [kgene.kim@samsung.com: fixed build error] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-12-21driver-core: remove sysdev.h usage.Kay Sievers1-1/+1
The sysdev.h file should not be needed by any in-kernel code, so remove the .h file from these random files that seem to still want to include it. The sysdev code will be going away soon, so this include needs to be removed no matter what. Cc: Jiandong Zheng <jdzheng@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: David Brown <davidb@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: "Venkatesh Pallipadi Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2011-10-18gpio/samsung: Complain loudly if we don't know the SoCMark Brown1-0/+3
If we don't know the SoC type then we won't add any chips which is rather unfortunate as neither GPIO nor pinmux APIs will work, breaking lots of different subsystems. Logging at least provides a hint to the user as to what's gone wrong. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-10-12gpio/samsung: Move SoC specific codes within macroTushar Behera1-0/+10
In drivers/gpio/gpio-samsung.c, there are certain structures and functions which are not getting used if the particular CPU is not selected. These code segments are moved under CPU specific macros to remove compilation warnings. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-10-12gpio/samsung: Fix incorrect gpio pull up/down callback for EXYNOS4Thomas Abraham1-12/+19
Some of the gpio chips of exynos4 are assigned a default gpio config without the exynos4 specific pull up/down callbacks which resulted in incorrect setting of pull up/down configuration. Fix this by adding two new exynos4 specific entries in the array of default configs with set_pull and get_pull callbacks set to exynos4 specific callbacks The new default gpio configs can then be used for exynos4 gpio chips. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-10-12gpio/samsung: only register available gpio banksPeter Korsgaard1-0/+4
Only register gpio banks provided by SoC instead of the maximum possible to lessen confusion, get rid of a warning from gpiolib and stop it from eating into the extra gpios for configs with S3C24XX_GPIO_EXTRA != 0. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-10-04gpio/samsung: correct pin configuration for S5PC100/S5PC110/EXYNOS4Marek Szyprowski1-15/+15
Commit 1b39d5f2cc introduced new common gpio driver for all Samsung GPIO SoCs. The new driver use wrong configuration setup for all gpio pins on S5PC100 and S5PV210 SoCs and external interrupt lines on Exynos4 SoCs. This patch fixes this issue. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-10-04gpio/samsung: fix GPIO interrupt registration for EXYNOS4 SoCsMarek Szyprowski1-1/+1
Commit 1b39d5f2cc introduced new common gpio driver for all Samsung GPIO SoCs. The new driver doesn't correctly register GPIO interrupts on Samsung Exynos4 SoCs. This is caused by a typo in define name. This patch fixes this issue. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-10-04gpio/samsung: fix broken configuration for EXYNOS4 GPIO banksMarek Szyprowski1-0/+2
Commit 1b39d5f2cc introduced new common gpio driver for all Samsung GPIO SoCs. The new driver doesn't work correctly on Samsung Exynos4 SoC. It fails to set configuration for all but external interrupt pins. This patch fixes this issue. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-09-21gpio/samsung: gpio-samsung.c to support Samsung GPIOsKukjin Kim1-0/+2686
This patch adds support for Samsung GPIOs with one gpio driver and removes old GPIO drivers which are drivers/gpio-s3c24xx.c, gpio-s3c64xx.c, gpio-s5p64x0.c, gpio-s5pc100.c, gpio-s5pv210.c, gpio-exynos4.c, gpio-plat-samsung.c, plat-samsung/gpio-config.c and gpio.c to support each Samsung SoCs before. Because the gpio-samsung.c can replace old Samsung GPIO drivers. Basically, the gpio-samsung.c has been made by their merging and removing duplicated definitions. Note: gpio-samsung.c includes some SoC dependent codes and it will be replaced next time. Cc: Ben Dooks <ben-linux@fluff.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> [kgene.kim@samsung.com: squash the removing and adding patches] [kgene.kim@samsung.com: fixes bug during to register of gpio_chips] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>