Commit Graph

10 Commits (ec976d6eb021dc8f2994248c310a41540f4756bd)

Author SHA1 Message Date
Ben Dooks d87964c460 [ARM] S3C: GPIO PM core GPIOlib integration
Move the GPIO suspend/resume support inline with the gpiolib support
so that it will work with both the S3C24XX and S3C64XX series.

The s3c_gpio_chip is extended to have a pm callback and a save block
to keep the state of the GPIO over suspend, and the code from the
s3c24xx implementation is added to a new common file.

The suspend process now uses the list of registered chips to go through
saving and restoring each one as appropriate, using the pm callback to
select the appropriate routine depending on the type of control register
present.

This change also means that any additional GPIO added should not require
changes to the PM.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-07 11:04:56 +01:00
Ben Dooks ec5cfbfc05 [ARM] S3C24XX: Fix sparse error in gpiolib.c
Fix the following sparse error generated by including
<plat/gpio-core.h> instead of <mach/gpio-core.h>

gpiolib.c:78:22: warning: symbol 's3c24xx_gpios' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-17 12:42:24 +01:00
Ben Dooks 43ae6599fe [ARM] S3C24XX: Add gpio_to_irq implementation
Add to_irq field handlers for the GPIO banks that are configurable
as interripts.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-01-08 16:24:08 +00:00
Ben Dooks 21b23664b9 [ARM] S3C: Add new GPIO configuration calls
Add new GPIO configuration calls that mesh with the
new gpiolib support.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:34:15 +00:00
Ben Dooks 7db6c82a37 [ARM] S3C: Move common GPIO code from plat-s3c24xx
Move the common parts of the GPIO code into plat-s3c
for use with both the s3c24xx and s3c64xx systems.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:33:20 +00:00
Ben Dooks f2edc7565a [ARM] S3C24XX: Reduce code lineage of gpiolib.c
All the s3c24xx gpiolib chips share the same get/set
calls and all but one bank shares the same calls for
.direction_input and .direction_output methods.

Change the initialisation process to use an new call
to register the chips that fills in any blank calls
with the default values to avoid having to fill them
in the structure initialisers.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:24 +00:00
Ben Dooks f4cb1a8964 [ARM] S3C24XX: Fix sparse warnings in arch/arm/plat-s3c24xx/gpiolib.c
Fix the following problems spotted by sparse:

warning: symbol 's3c24xx_gpiolib_input' was not declared. Should it be static?
warning: symbol 's3c24xx_gpiolib_output' was not declared. Should it be static?
warning: symbol 's3c24xx_gpiolib_set' was not declared. Should it be static?
warning: symbol 's3c24xx_gpiolib_get' was not declared. Should it be static?
warning: symbol 'gpios' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:20 +01:00
Russell King a09e64fbc0 [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:55:48 +01:00
Russell King be50972935 [ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:40:08 +01:00
Ben Dooks f348a2a281 [ARM] S3C24XX: Add gpiolib support
Add support for gpilib on all S3C24XX platforms.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-07-03 16:51:23 +01:00