diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:36:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:36:49 -0500 |
commit | 14a3c4ab0e58d143c7928c9eb2f2610205e13bf2 (patch) | |
tree | 885992999d7a1a2fd3586efcf32ebcbcbc3a72aa /drivers/char/ds1620.c | |
parent | 1af237a099a3b8ff56aa384f605c6a68af7bf288 (diff) | |
parent | 47992cbdaef2f18a47871b2ed01ad27f568c8b73 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (407 commits)
[ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices
[ARM] pxafb: cleanup of the timing checking code
[ARM] pxafb: cleanup of the color format manipulation code
[ARM] pxafb: add palette format support for LCCR4_PAL_FOR_3
[ARM] pxafb: add support for FBIOPAN_DISPLAY by dma braching
[ARM] pxafb: allow pxafb_set_par() to start from arbitrary yoffset
[ARM] pxafb: allow video memory size to be configurable
[ARM] pxa: add document on the MFP design and how to use it
[ARM] sa1100_wdt: don't assume CLOCK_TICK_RATE to be a constant
[ARM] rtc-sa1100: don't assume CLOCK_TICK_RATE to be a constant
[ARM] pxa/tavorevb: update board support (smartpanel LCD + keypad)
[ARM] pxa: Update eseries defconfig
[ARM] 5352/1: add w90p910-plat config file
[ARM] s3c: S3C options should depend on PLAT_S3C
[ARM] mv78xx0: implement GPIO and GPIO interrupt support
[ARM] Kirkwood: implement GPIO and GPIO interrupt support
[ARM] Orion: share GPIO IRQ handling code
[ARM] Orion: share GPIO handling code
[ARM] s3c: define __io using the typesafe version
[ARM] S3C64XX: Ensure CPU_V6 is selected
...
Diffstat (limited to 'drivers/char/ds1620.c')
-rw-r--r-- | drivers/char/ds1620.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 74e9cd81b5b2..61f0146e215d 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c | |||
@@ -43,52 +43,51 @@ static const char *fan_state[] = { "off", "on", "on (hardwired)" }; | |||
43 | * chance that the WaveArtist driver could touch these bits to | 43 | * chance that the WaveArtist driver could touch these bits to |
44 | * enable or disable the speaker. | 44 | * enable or disable the speaker. |
45 | */ | 45 | */ |
46 | extern spinlock_t gpio_lock; | ||
47 | extern unsigned int system_rev; | 46 | extern unsigned int system_rev; |
48 | 47 | ||
49 | static inline void netwinder_ds1620_set_clk(int clk) | 48 | static inline void netwinder_ds1620_set_clk(int clk) |
50 | { | 49 | { |
51 | gpio_modify_op(GPIO_DSCLK, clk ? GPIO_DSCLK : 0); | 50 | nw_gpio_modify_op(GPIO_DSCLK, clk ? GPIO_DSCLK : 0); |
52 | } | 51 | } |
53 | 52 | ||
54 | static inline void netwinder_ds1620_set_data(int dat) | 53 | static inline void netwinder_ds1620_set_data(int dat) |
55 | { | 54 | { |
56 | gpio_modify_op(GPIO_DATA, dat ? GPIO_DATA : 0); | 55 | nw_gpio_modify_op(GPIO_DATA, dat ? GPIO_DATA : 0); |
57 | } | 56 | } |
58 | 57 | ||
59 | static inline int netwinder_ds1620_get_data(void) | 58 | static inline int netwinder_ds1620_get_data(void) |
60 | { | 59 | { |
61 | return gpio_read() & GPIO_DATA; | 60 | return nw_gpio_read() & GPIO_DATA; |
62 | } | 61 | } |
63 | 62 | ||
64 | static inline void netwinder_ds1620_set_data_dir(int dir) | 63 | static inline void netwinder_ds1620_set_data_dir(int dir) |
65 | { | 64 | { |
66 | gpio_modify_io(GPIO_DATA, dir ? GPIO_DATA : 0); | 65 | nw_gpio_modify_io(GPIO_DATA, dir ? GPIO_DATA : 0); |
67 | } | 66 | } |
68 | 67 | ||
69 | static inline void netwinder_ds1620_reset(void) | 68 | static inline void netwinder_ds1620_reset(void) |
70 | { | 69 | { |
71 | cpld_modify(CPLD_DS_ENABLE, 0); | 70 | nw_cpld_modify(CPLD_DS_ENABLE, 0); |
72 | cpld_modify(CPLD_DS_ENABLE, CPLD_DS_ENABLE); | 71 | nw_cpld_modify(CPLD_DS_ENABLE, CPLD_DS_ENABLE); |
73 | } | 72 | } |
74 | 73 | ||
75 | static inline void netwinder_lock(unsigned long *flags) | 74 | static inline void netwinder_lock(unsigned long *flags) |
76 | { | 75 | { |
77 | spin_lock_irqsave(&gpio_lock, *flags); | 76 | spin_lock_irqsave(&nw_gpio_lock, *flags); |
78 | } | 77 | } |
79 | 78 | ||
80 | static inline void netwinder_unlock(unsigned long *flags) | 79 | static inline void netwinder_unlock(unsigned long *flags) |
81 | { | 80 | { |
82 | spin_unlock_irqrestore(&gpio_lock, *flags); | 81 | spin_unlock_irqrestore(&nw_gpio_lock, *flags); |
83 | } | 82 | } |
84 | 83 | ||
85 | static inline void netwinder_set_fan(int i) | 84 | static inline void netwinder_set_fan(int i) |
86 | { | 85 | { |
87 | unsigned long flags; | 86 | unsigned long flags; |
88 | 87 | ||
89 | spin_lock_irqsave(&gpio_lock, flags); | 88 | spin_lock_irqsave(&nw_gpio_lock, flags); |
90 | gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0); | 89 | nw_gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0); |
91 | spin_unlock_irqrestore(&gpio_lock, flags); | 90 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
92 | } | 91 | } |
93 | 92 | ||
94 | static inline int netwinder_get_fan(void) | 93 | static inline int netwinder_get_fan(void) |
@@ -96,7 +95,7 @@ static inline int netwinder_get_fan(void) | |||
96 | if ((system_rev & 0xf000) == 0x4000) | 95 | if ((system_rev & 0xf000) == 0x4000) |
97 | return FAN_ALWAYS_ON; | 96 | return FAN_ALWAYS_ON; |
98 | 97 | ||
99 | return (gpio_read() & GPIO_FAN) ? FAN_ON : FAN_OFF; | 98 | return (nw_gpio_read() & GPIO_FAN) ? FAN_ON : FAN_OFF; |
100 | } | 99 | } |
101 | 100 | ||
102 | /* | 101 | /* |