Skip to content

Commit 5bedd27

Browse files
author
Tong Zhang
committed
key fix for TQ2440 board
1 parent 41e23f5 commit 5bedd27

File tree

1 file changed

+10
-42
lines changed

1 file changed

+10
-42
lines changed

arch/arm/mach-s3c24xx/mach-tq2440.c

Lines changed: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
/* linux/arch/arm/mach-s3c2440/mach-mini2440.c
1+
/* linux/arch/arm/mach-s3c2440/mach-tq2440.c
2+
*
3+
* Copyright (c) 2013 Zhang Tong <[email protected]>
4+
* Largely based on mach-mini2440.c by Ramax Lo
25
*
36
* Copyright (c) 2008 Ramax Lo <[email protected]>
47
* Based on mach-anubis.c by Ben Dooks <[email protected]>
58
* and modifications by SBZ <[email protected]> and
69
* Weibing <http://weibing.blogbus.com> and
710
* Michel Pollet <[email protected]>
811
*
9-
* For product information, visit http://code.google.com/p/mini2440/
10-
*
1112
* This program is free software; you can redistribute it and/or modify
1213
* it under the terms of the GNU General Public License version 2 as
1314
* published by the Free Software Foundation.
@@ -178,64 +179,31 @@ static struct platform_device tq2440_device_eth = {
178179
},
179180
};
180181

181-
/* CON5
182-
* +--+ /-----\
183-
* | | | |
184-
* | | | BAT |
185-
* | | \_____/
186-
* | |
187-
* | | +----+ +----+
188-
* | | | K5 | | K1 |
189-
* | | +----+ +----+
190-
* | | +----+ +----+
191-
* | | | K4 | | K2 |
192-
* | | +----+ +----+
193-
* | | +----+ +----+
194-
* | | | K6 | | K3 |
195-
* | | +----+ +----+
196-
* .....
197-
*/
198182
static struct gpio_keys_button tq2440_buttons[] = {
199183
{
200-
.gpio = S3C2410_GPG(0), /* K1 */
184+
.gpio = S3C2410_GPF(1), /* K1 */
201185
.code = KEY_F1,
202186
.desc = "Button 1",
203187
.active_low = 1,
204188
},
205189
{
206-
.gpio = S3C2410_GPG(3), /* K2 */
190+
.gpio = S3C2410_GPF(4), /* K2 */
207191
.code = KEY_F2,
208192
.desc = "Button 2",
209193
.active_low = 1,
210194
},
211195
{
212-
.gpio = S3C2410_GPG(5), /* K3 */
196+
.gpio = S3C2410_GPF(2), /* K3 */
213197
.code = KEY_F3,
214198
.desc = "Button 3",
215199
.active_low = 1,
216200
},
217201
{
218-
.gpio = S3C2410_GPG(6), /* K4 */
219-
.code = KEY_POWER,
220-
.desc = "Power",
221-
.active_low = 1,
222-
},
223-
{
224-
.gpio = S3C2410_GPG(7), /* K5 */
225-
.code = KEY_F5,
226-
.desc = "Button 5",
227-
.active_low = 1,
228-
},
229-
#if 0
230-
/* this pin is also known as TCLK1 and seems to already
231-
* marked as "in use" somehow in the kernel -- possibly wrongly */
232-
{
233-
.gpio = S3C2410_GPG(11), /* K6 */
234-
.code = KEY_F6,
235-
.desc = "Button 6",
202+
.gpio = S3C2410_GPF(0), /* K4 */
203+
.code = KEY_F4,
204+
.desc = "Button 4",
236205
.active_low = 1,
237206
},
238-
#endif
239207
};
240208

241209
static struct gpio_keys_platform_data tq2440_button_data = {

0 commit comments

Comments
 (0)