diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-31 12:14:32 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-12-15 18:33:42 -0500 |
commit | 8a53bdb907cb924ed30f79bcfe7f4f15ff7de15e (patch) | |
tree | e2bca4f6a4988f4eeb79ff18ac782b2383d1cf92 /arch/arm/plat-s3c/include | |
parent | 7db6c82a37beabef7b76d232e3d20efacd74bd3a (diff) |
[ARM] S3C: Add GPIO chip tracking
The gpiolib driver keeps its chip array to itself
and having a separate array for s3c-only gpios stops
any non-s3c gpio being used in one of the s3c specific
configuration calls.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c/include')
-rw-r--r-- | arch/arm/plat-s3c/include/plat/gpio-core.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/include/plat/gpio-core.h b/arch/arm/plat-s3c/include/plat/gpio-core.h index 3cb9105c4811..ad68b32a7f9d 100644 --- a/arch/arm/plat-s3c/include/plat/gpio-core.h +++ b/arch/arm/plat-s3c/include/plat/gpio-core.h | |||
@@ -47,3 +47,26 @@ static inline struct s3c_gpio_chip *to_s3c_gpio(struct gpio_chip *gpc) | |||
47 | * other parts of the system. | 47 | * other parts of the system. |
48 | */ | 48 | */ |
49 | extern void s3c_gpiolib_add(struct s3c_gpio_chip *chip); | 49 | extern void s3c_gpiolib_add(struct s3c_gpio_chip *chip); |
50 | |||
51 | |||
52 | /* CONFIG_S3C_GPIO_TRACK enables the tracking of the s3c specific gpios | ||
53 | * for use with the configuration calls, and other parts of the s3c gpiolib | ||
54 | * support code. | ||
55 | * | ||
56 | * Not all s3c support code will need this, as some configurations of cpu | ||
57 | * may only support one or two different configuration options and have an | ||
58 | * easy gpio to s3c_gpio_chip mapping function. If this is the case, then | ||
59 | * the machine support file should provide its own s3c_gpiolib_getchip() | ||
60 | * and any other necessary functions. | ||
61 | */ | ||
62 | |||
63 | #ifdef CONFIG_S3C_GPIO_TRACK | ||
64 | extern struct s3c_gpio_chip *s3c_gpios[S3C_GPIO_END]; | ||
65 | |||
66 | static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int chip) | ||
67 | { | ||
68 | return s3c_gpios[chip]; | ||
69 | } | ||
70 | #else | ||
71 | static inline void s3c_gpiolib_track(struct s3c_gpio_chip *chip) { } | ||
72 | #endif | ||