diff options
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/Kconfig | 6 | ||||
-rw-r--r-- | drivers/input/keyboard/Makefile | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/pxa27x_keypad.c (renamed from drivers/input/keyboard/pxa27x_keyboard.c) | 82 |
3 files changed, 45 insertions, 45 deletions
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 0c327621bd86..d5b5f4a966be 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -260,13 +260,13 @@ config KEYBOARD_OMAP | |||
260 | module will be called omap-keypad. | 260 | module will be called omap-keypad. |
261 | 261 | ||
262 | config KEYBOARD_PXA27x | 262 | config KEYBOARD_PXA27x |
263 | tristate "PXA27x keyboard support" | 263 | tristate "PXA27x keypad support" |
264 | depends on PXA27x | 264 | depends on PXA27x |
265 | help | 265 | help |
266 | Enable support for PXA27x matrix keyboard controller | 266 | Enable support for PXA27x keypad controller |
267 | 267 | ||
268 | To compile this driver as a module, choose M here: the | 268 | To compile this driver as a module, choose M here: the |
269 | module will be called pxa27x_keyboard. | 269 | module will be called pxa27x_keypad. |
270 | 270 | ||
271 | config KEYBOARD_AAED2000 | 271 | config KEYBOARD_AAED2000 |
272 | tristate "AAED-2000 keyboard" | 272 | tristate "AAED-2000 keyboard" |
diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index 6caa065e27ae..e741f4031012 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile | |||
@@ -19,7 +19,7 @@ obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o | |||
19 | obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o | 19 | obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o |
20 | obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o | 20 | obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o |
21 | obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o | 21 | obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o |
22 | obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keyboard.o | 22 | obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o |
23 | obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o | 23 | obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o |
24 | obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o | 24 | obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o |
25 | obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o | 25 | obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o |
diff --git a/drivers/input/keyboard/pxa27x_keyboard.c b/drivers/input/keyboard/pxa27x_keypad.c index bdd64ee4c5c8..06c1d5abaa81 100644 --- a/drivers/input/keyboard/pxa27x_keyboard.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/input/keyboard/pxa27x_keyboard.c | 2 | * linux/drivers/input/keyboard/pxa27x_keypad.c |
3 | * | 3 | * |
4 | * Driver for the pxa27x matrix keyboard controller. | 4 | * Driver for the pxa27x matrix keyboard controller. |
5 | * | 5 | * |
@@ -33,21 +33,21 @@ | |||
33 | #include <asm/arch/hardware.h> | 33 | #include <asm/arch/hardware.h> |
34 | #include <asm/arch/pxa-regs.h> | 34 | #include <asm/arch/pxa-regs.h> |
35 | #include <asm/arch/irqs.h> | 35 | #include <asm/arch/irqs.h> |
36 | #include <asm/arch/pxa27x_keyboard.h> | 36 | #include <asm/arch/pxa27x_keypad.h> |
37 | 37 | ||
38 | #define DRIVER_NAME "pxa27x-keyboard" | 38 | #define DRIVER_NAME "pxa27x-keypad" |
39 | 39 | ||
40 | #define KPASMKP(col) (col/2 == 0 ? KPASMKP0 : \ | 40 | #define KPASMKP(col) (col/2 == 0 ? KPASMKP0 : \ |
41 | col/2 == 1 ? KPASMKP1 : \ | 41 | col/2 == 1 ? KPASMKP1 : \ |
42 | col/2 == 2 ? KPASMKP2 : KPASMKP3) | 42 | col/2 == 2 ? KPASMKP2 : KPASMKP3) |
43 | #define KPASMKPx_MKC(row, col) (1 << (row + 16 * (col % 2))) | 43 | #define KPASMKPx_MKC(row, col) (1 << (row + 16 * (col % 2))) |
44 | 44 | ||
45 | static struct clk *pxakbd_clk; | 45 | static struct clk *pxa27x_keypad_clk; |
46 | 46 | ||
47 | static irqreturn_t pxakbd_irq_handler(int irq, void *dev_id) | 47 | static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id) |
48 | { | 48 | { |
49 | struct platform_device *pdev = dev_id; | 49 | struct platform_device *pdev = dev_id; |
50 | struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data; | 50 | struct pxa27x_keypad_platform_data *pdata = pdev->dev.platform_data; |
51 | struct input_dev *input_dev = platform_get_drvdata(pdev); | 51 | struct input_dev *input_dev = platform_get_drvdata(pdev); |
52 | unsigned long kpc = KPC; | 52 | unsigned long kpc = KPC; |
53 | int p, row, col, rel; | 53 | int p, row, col, rel; |
@@ -93,7 +93,7 @@ static irqreturn_t pxakbd_irq_handler(int irq, void *dev_id) | |||
93 | return IRQ_HANDLED; | 93 | return IRQ_HANDLED; |
94 | } | 94 | } |
95 | 95 | ||
96 | static int pxakbd_open(struct input_dev *dev) | 96 | static int pxa27x_keypad_open(struct input_dev *dev) |
97 | { | 97 | { |
98 | /* Set keypad control register */ | 98 | /* Set keypad control register */ |
99 | KPC |= (KPC_ASACT | | 99 | KPC |= (KPC_ASACT | |
@@ -108,21 +108,21 @@ static int pxakbd_open(struct input_dev *dev) | |||
108 | KPREC = 0x7F; | 108 | KPREC = 0x7F; |
109 | 109 | ||
110 | /* Enable unit clock */ | 110 | /* Enable unit clock */ |
111 | clk_enable(pxakbd_clk); | 111 | clk_enable(pxa27x_keypad_clk); |
112 | 112 | ||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | static void pxakbd_close(struct input_dev *dev) | 116 | static void pxa27x_keypad_close(struct input_dev *dev) |
117 | { | 117 | { |
118 | /* Disable clock unit */ | 118 | /* Disable clock unit */ |
119 | clk_disable(pxakbd_clk); | 119 | clk_disable(pxa27x_keypad_clk); |
120 | } | 120 | } |
121 | 121 | ||
122 | #ifdef CONFIG_PM | 122 | #ifdef CONFIG_PM |
123 | static int pxakbd_suspend(struct platform_device *pdev, pm_message_t state) | 123 | static int pxa27x_keypad_suspend(struct platform_device *pdev, pm_message_t state) |
124 | { | 124 | { |
125 | struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data; | 125 | struct pxa27x_keypad_platform_data *pdata = pdev->dev.platform_data; |
126 | 126 | ||
127 | /* Save controller status */ | 127 | /* Save controller status */ |
128 | pdata->reg_kpc = KPC; | 128 | pdata->reg_kpc = KPC; |
@@ -131,9 +131,9 @@ static int pxakbd_suspend(struct platform_device *pdev, pm_message_t state) | |||
131 | return 0; | 131 | return 0; |
132 | } | 132 | } |
133 | 133 | ||
134 | static int pxakbd_resume(struct platform_device *pdev) | 134 | static int pxa27x_keypad_resume(struct platform_device *pdev) |
135 | { | 135 | { |
136 | struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data; | 136 | struct pxa27x_keypad_platform_data *pdata = pdev->dev.platform_data; |
137 | struct input_dev *input_dev = platform_get_drvdata(pdev); | 137 | struct input_dev *input_dev = platform_get_drvdata(pdev); |
138 | 138 | ||
139 | mutex_lock(&input_dev->mutex); | 139 | mutex_lock(&input_dev->mutex); |
@@ -144,8 +144,8 @@ static int pxakbd_resume(struct platform_device *pdev) | |||
144 | KPREC = pdata->reg_kprec; | 144 | KPREC = pdata->reg_kprec; |
145 | 145 | ||
146 | /* Enable unit clock */ | 146 | /* Enable unit clock */ |
147 | clk_disable(pxakbd_clk); | 147 | clk_disable(pxa27x_keypad_clk); |
148 | clk_enable(pxakbd_clk); | 148 | clk_enable(pxa27x_keypad_clk); |
149 | } | 149 | } |
150 | 150 | ||
151 | mutex_unlock(&input_dev->mutex); | 151 | mutex_unlock(&input_dev->mutex); |
@@ -153,19 +153,19 @@ static int pxakbd_resume(struct platform_device *pdev) | |||
153 | return 0; | 153 | return 0; |
154 | } | 154 | } |
155 | #else | 155 | #else |
156 | #define pxakbd_suspend NULL | 156 | #define pxa27x_keypad_suspend NULL |
157 | #define pxakbd_resume NULL | 157 | #define pxa27x_keypad_resume NULL |
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | static int __devinit pxakbd_probe(struct platform_device *pdev) | 160 | static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) |
161 | { | 161 | { |
162 | struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data; | 162 | struct pxa27x_keypad_platform_data *pdata = pdev->dev.platform_data; |
163 | struct input_dev *input_dev; | 163 | struct input_dev *input_dev; |
164 | int i, row, col, error; | 164 | int i, row, col, error; |
165 | 165 | ||
166 | pxakbd_clk = clk_get(&pdev->dev, "KBDCLK"); | 166 | pxa27x_keypad_clk = clk_get(&pdev->dev, "KBDCLK"); |
167 | if (IS_ERR(pxakbd_clk)) { | 167 | if (IS_ERR(pxa27x_keypad_clk)) { |
168 | error = PTR_ERR(pxakbd_clk); | 168 | error = PTR_ERR(pxa27x_keypad_clk); |
169 | goto err_clk; | 169 | goto err_clk; |
170 | } | 170 | } |
171 | 171 | ||
@@ -179,8 +179,8 @@ static int __devinit pxakbd_probe(struct platform_device *pdev) | |||
179 | 179 | ||
180 | input_dev->name = DRIVER_NAME; | 180 | input_dev->name = DRIVER_NAME; |
181 | input_dev->id.bustype = BUS_HOST; | 181 | input_dev->id.bustype = BUS_HOST; |
182 | input_dev->open = pxakbd_open; | 182 | input_dev->open = pxa27x_keypad_open; |
183 | input_dev->close = pxakbd_close; | 183 | input_dev->close = pxa27x_keypad_close; |
184 | input_dev->dev.parent = &pdev->dev; | 184 | input_dev->dev.parent = &pdev->dev; |
185 | 185 | ||
186 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | | 186 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | |
@@ -194,7 +194,7 @@ static int __devinit pxakbd_probe(struct platform_device *pdev) | |||
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | error = request_irq(IRQ_KEYPAD, pxakbd_irq_handler, IRQF_DISABLED, | 197 | error = request_irq(IRQ_KEYPAD, pxa27x_keypad_irq_handler, IRQF_DISABLED, |
198 | DRIVER_NAME, pdev); | 198 | DRIVER_NAME, pdev); |
199 | if (error) { | 199 | if (error) { |
200 | printk(KERN_ERR "Cannot request keypad IRQ\n"); | 200 | printk(KERN_ERR "Cannot request keypad IRQ\n"); |
@@ -230,45 +230,45 @@ static int __devinit pxakbd_probe(struct platform_device *pdev) | |||
230 | err_free_dev: | 230 | err_free_dev: |
231 | input_free_device(input_dev); | 231 | input_free_device(input_dev); |
232 | err_alloc: | 232 | err_alloc: |
233 | clk_put(pxakbd_clk); | 233 | clk_put(pxa27x_keypad_clk); |
234 | err_clk: | 234 | err_clk: |
235 | return error; | 235 | return error; |
236 | } | 236 | } |
237 | 237 | ||
238 | static int __devexit pxakbd_remove(struct platform_device *pdev) | 238 | static int __devexit pxa27x_keypad_remove(struct platform_device *pdev) |
239 | { | 239 | { |
240 | struct input_dev *input_dev = platform_get_drvdata(pdev); | 240 | struct input_dev *input_dev = platform_get_drvdata(pdev); |
241 | 241 | ||
242 | input_unregister_device(input_dev); | 242 | input_unregister_device(input_dev); |
243 | free_irq(IRQ_KEYPAD, pdev); | 243 | free_irq(IRQ_KEYPAD, pdev); |
244 | clk_put(pxakbd_clk); | 244 | clk_put(pxa27x_keypad_clk); |
245 | platform_set_drvdata(pdev, NULL); | 245 | platform_set_drvdata(pdev, NULL); |
246 | 246 | ||
247 | return 0; | 247 | return 0; |
248 | } | 248 | } |
249 | 249 | ||
250 | static struct platform_driver pxakbd_driver = { | 250 | static struct platform_driver pxa27x_keypad_driver = { |
251 | .probe = pxakbd_probe, | 251 | .probe = pxa27x_keypad_probe, |
252 | .remove = __devexit_p(pxakbd_remove), | 252 | .remove = __devexit_p(pxa27x_keypad_remove), |
253 | .suspend = pxakbd_suspend, | 253 | .suspend = pxa27x_keypad_suspend, |
254 | .resume = pxakbd_resume, | 254 | .resume = pxa27x_keypad_resume, |
255 | .driver = { | 255 | .driver = { |
256 | .name = DRIVER_NAME, | 256 | .name = DRIVER_NAME, |
257 | }, | 257 | }, |
258 | }; | 258 | }; |
259 | 259 | ||
260 | static int __init pxakbd_init(void) | 260 | static int __init pxa27x_keypad_init(void) |
261 | { | 261 | { |
262 | return platform_driver_register(&pxakbd_driver); | 262 | return platform_driver_register(&pxa27x_keypad_driver); |
263 | } | 263 | } |
264 | 264 | ||
265 | static void __exit pxakbd_exit(void) | 265 | static void __exit pxa27x_keypad_exit(void) |
266 | { | 266 | { |
267 | platform_driver_unregister(&pxakbd_driver); | 267 | platform_driver_unregister(&pxa27x_keypad_driver); |
268 | } | 268 | } |
269 | 269 | ||
270 | module_init(pxakbd_init); | 270 | module_init(pxa27x_keypad_init); |
271 | module_exit(pxakbd_exit); | 271 | module_exit(pxa27x_keypad_exit); |
272 | 272 | ||
273 | MODULE_DESCRIPTION("PXA27x Matrix Keyboard Driver"); | 273 | MODULE_DESCRIPTION("PXA27x Keypad Controller Driver"); |
274 | MODULE_LICENSE("GPL"); | 274 | MODULE_LICENSE("GPL"); |