diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:39:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:39:22 -0500 |
commit | 2ac9d7aaccbd598b5bd19ac40761b723bb675442 (patch) | |
tree | 09132a44e33798aaa5e80f10bf025b510015cab3 /arch/arm/mach-pxa/spitz_pm.c | |
parent | 5ede3ceb7b2c2843e153a1803edbdc8c56655950 (diff) | |
parent | dcf7ec5ee62a78123057a1e286c88ca739717409 (diff) |
Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Driver specific changes
Again, a lot of platforms have changes in here: pxa, samsung, omap,
at91, imx, ...
* tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
ARM: sa1100: clean up of the clock support
ARM: pxa: add dummy clock for sa1100-rtc
RTC: sa1100: support sa1100, pxa and mmp soc families
RTC: sa1100: remove redundant code of setting alarm
RTC: sa1100: Clean out ost register
Input: zylonite-wm97xx - replace IRQ_GPIO() with gpio_to_irq()
pcmcia: pxa: replace IRQ_GPIO() with gpio_to_irq()
ARM: EXYNOS: Modified files for SPI consolidation work
ARM: S5P64X0: Enable SDHCI support
ARM: S5P64X0: Add lookup of sdhci-s3c clocks using generic names
ARM: S5P64X0: Add HSMMC setup for host Controller
ARM: EXYNOS: Add USB OHCI support to ORIGEN board
USB: Add Samsung Exynos OHCI diver
ARM: EXYNOS: Add USB OHCI support to SMDKV310 board
ARM: EXYNOS: Add USB OHCI device
net: macb: fix build break with !CONFIG_OF
i2c: tegra: Support DVC controller in device tree
i2c: tegra: Add __devinit/exit to probe/remove
net/at91_ether: use gpio_is_valid for phy IRQ line
ARM: at91/net: add macb ethernet controller in 9g45/9g20 DT
...
Diffstat (limited to 'arch/arm/mach-pxa/spitz_pm.c')
-rw-r--r-- | arch/arm/mach-pxa/spitz_pm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 094279aefe9c..34cbdac51525 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/gpio-pxa.h> | ||
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/apm-emulation.h> | 21 | #include <linux/apm-emulation.h> |
@@ -41,6 +42,7 @@ static int spitz_last_ac_status; | |||
41 | static struct gpio spitz_charger_gpios[] = { | 42 | static struct gpio spitz_charger_gpios[] = { |
42 | { SPITZ_GPIO_KEY_INT, GPIOF_IN, "Keyboard Interrupt" }, | 43 | { SPITZ_GPIO_KEY_INT, GPIOF_IN, "Keyboard Interrupt" }, |
43 | { SPITZ_GPIO_SYNC, GPIOF_IN, "Sync" }, | 44 | { SPITZ_GPIO_SYNC, GPIOF_IN, "Sync" }, |
45 | { SPITZ_GPIO_AC_IN, GPIOF_IN, "Charger Detection" }, | ||
44 | { SPITZ_GPIO_ADC_TEMP_ON, GPIOF_OUT_INIT_LOW, "ADC Temp On" }, | 46 | { SPITZ_GPIO_ADC_TEMP_ON, GPIOF_OUT_INIT_LOW, "ADC Temp On" }, |
45 | { SPITZ_GPIO_JK_B, GPIOF_OUT_INIT_LOW, "JK B" }, | 47 | { SPITZ_GPIO_JK_B, GPIOF_OUT_INIT_LOW, "JK B" }, |
46 | { SPITZ_GPIO_CHRG_ON, GPIOF_OUT_INIT_LOW, "Charger On" }, | 48 | { SPITZ_GPIO_CHRG_ON, GPIOF_OUT_INIT_LOW, "Charger On" }, |
@@ -169,14 +171,19 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm) | |||
169 | 171 | ||
170 | static unsigned long spitz_charger_wakeup(void) | 172 | static unsigned long spitz_charger_wakeup(void) |
171 | { | 173 | { |
172 | return (~GPLR0 & GPIO_bit(SPITZ_GPIO_KEY_INT)) | (GPLR0 & GPIO_bit(SPITZ_GPIO_SYNC)); | 174 | unsigned long ret; |
175 | ret = (!gpio_get_value(SPITZ_GPIO_KEY_INT) | ||
176 | << GPIO_bit(SPITZ_GPIO_KEY_INT)) | ||
177 | | (!gpio_get_value(SPITZ_GPIO_SYNC) | ||
178 | << GPIO_bit(SPITZ_GPIO_SYNC)); | ||
179 | return ret; | ||
173 | } | 180 | } |
174 | 181 | ||
175 | unsigned long spitzpm_read_devdata(int type) | 182 | unsigned long spitzpm_read_devdata(int type) |
176 | { | 183 | { |
177 | switch (type) { | 184 | switch (type) { |
178 | case SHARPSL_STATUS_ACIN: | 185 | case SHARPSL_STATUS_ACIN: |
179 | return (((~GPLR(SPITZ_GPIO_AC_IN)) & GPIO_bit(SPITZ_GPIO_AC_IN)) != 0); | 186 | return !gpio_get_value(SPITZ_GPIO_AC_IN); |
180 | case SHARPSL_STATUS_LOCK: | 187 | case SHARPSL_STATUS_LOCK: |
181 | return gpio_get_value(sharpsl_pm.machinfo->gpio_batlock); | 188 | return gpio_get_value(sharpsl_pm.machinfo->gpio_batlock); |
182 | case SHARPSL_STATUS_CHRGFULL: | 189 | case SHARPSL_STATUS_CHRGFULL: |