Letux 400 Kernel 2.6.24.3

Letux 400 Kernel 2.6.24.3 Commit Details

Date:2010-05-06 07:07:52 (3 years 11 months ago)
Author:Nikolaus Schaller
Branch:master
Commit:6b9252d42c8342d3b98da6f46e3f833184af6007
Parents: fd99707ea5fd796d3d16a1cc84489253838d8f58
Message:added gpio_mouse driver configuration; added driver initialization to board-file; configured for GPIOs of Letux 400; added required parts of GENERIC_GPIO

Changes:
March/mips/Kconfig (1 diff)
March/mips/configs/letux400_defconfig (6 diffs)
March/mips/jz4730/board-minipc.c (3 diffs)
March/mips/jz4730/platform.c (3 diffs)
Mdrivers/input/mouse/gpio_mouse.c (1 diff)
Minclude/asm-mips/mach-jz4730/board-minipc.h (1 diff)

File differences

arch/mips/Kconfig
3131
3232
3333
34
3435
3536
3637
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN
select SOC_JZ4730
select GENERIC_GPIO
config JZ4740_PAVO
bool "Ingenic JZ4740 PAVO board"
arch/mips/configs/letux400_defconfig
11
22
33
4
4
55
66
77
......
7171
7272
7373
74
7475
7576
7677
......
604605
605606
606607
607
608
608609
609610
610611
......
629630
630631
631632
632
633
634
635
636
637
638
639
640
641
642
643
644
633645
634646
635647
......
641653
642654
643655
644
656
645657
646658
647659
......
704716
705717
706718
719
707720
708721
709722
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24.3
# Wed May 5 10:48:39 2010
# Wed May 5 21:36:05 2010
#
CONFIG_MIPS=y
CONFIG_DMA_NEED_PCI_MAP_STATE=y
# CONFIG_HOTPLUG_CPU is not set
# CONFIG_NO_IOPORT is not set
CONFIG_GENERIC_GPIO=y
# CONFIG_CPU_BIG_ENDIAN is not set
CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set
CONFIG_INPUT_POLLDEV=y
#
# Userland interfaces
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_KEYBOARD_JZ=y
# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_VSXXXAA is not set
CONFIG_MOUSE_GPIO=y
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_SERIO=y
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_LIBPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set
#
# I2C Hardware Bus support
#
# CONFIG_I2C_GPIO is not set
CONFIG_I2C_JZ47XX=y
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
arch/mips/jz4730/board-minipc.c
2424
2525
2626
27
28
2729
2830
2931
......
144146
145147
146148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
147205
148206
149207
......
157215
158216
159217
218
219
220
221
160222
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/backlight.h>
#include <linux/gpio_mouse.h>
#include <linux/i2c.h>
#include <asm/cpu.h>
#include <asm/bootinfo.h>
.id= -1,
};
static struct i2c_board_info pcf8563_rtc_board_info[] = {
[0] = {
.type = "pcf8563",
.addr = 0x51,
}
};
/* touch pad buttons */
int gpio_get_value(int pin)
{ // poll this gpio
return __gpio_get_pin(pin);
}
int gpio_free(int pin)
{ // release
return 0;// ignored
}
int gpio_request(int pin, char *name)
{ // request
return 0;// ignored
}
int gpio_direction_input(int pin)
{
__gpio_as_input(pin);
return 0;// ignored, we assume to only have inputs...
}
static struct gpio_mouse_platform_data touchpad_buttons_board_info[] = {
[0] = {
.scan_ms = 20,
.polarity = GPIO_MOUSE_POLARITY_ACT_HIGH,
{ {
.up = GPIO_TS_LEFT_BUTTON,
.down = GPIO_TS_LEFT_BUTTON,// should result in 0 unless the low probability event that the gpio value changes within some fraction of a us. Anyway. will only report +/-1.
.left = GPIO_TS_LEFT_BUTTON,
.right = GPIO_TS_LEFT_BUTTON,
.bleft = GPIO_TS_LEFT_BUTTON,
.bmiddle = -1,// n/a
.bright = GPIO_TS_RIGHT_BUTTON,
} }
}
};
struct platform_device touchpad_buttons_device = {
.name= "gpio_mouse",
.dev= {
//.num_resources= ARRAY_SIZE(touchpad_buttons_board_info),
.platform_data = touchpad_buttons_board_info,
},
.id= -1,
};
/* initialization */
void __init jz_board_setup(void)
{
* We don't have pmp timer ack led stuff
jz_timer_callback = pmp_timer_ack;
*/
// this is how it *should* better work than the probing workaround in pcf8563_attach()
//i2c_register_board_info(0, pcf8563_rtc_board_info, 1);// before registering adapters
}
arch/mips/jz4730/platform.c
125125
126126
127127
128
129
130
131
132128
133129
134130
......
156152
157153
158154
159
160
161
162
163
164
165
166155
156
157
158
159
160
161
167162
168163
169164
......
171166
172167
173168
169
174170
175171
176172
177173
178174
179175
180
181
182176
183177
184178
.resource = jz_mmc_resources,
};
#ifdef CONFIG_JZ4730_MINIPC
extern struct platform_device minipc_bl_device;
#endif
/** I2C controller **/
static struct resource jz_i2c_resources[] = {
[0] = {
.resource = jz_i2c_resources,
};
static struct i2c_board_info pcf8563_rtc_board_info[] = {
[0] = {
.type = "pcf8563",
.addr = 0x51,
}
};
/* All */
#ifdef CONFIG_JZ4730_MINIPC
extern struct platform_device minipc_bl_device;
extern struct platform_device touchpad_buttons_device;
#endif
static struct platform_device *jz_platform_devices[] __initdata = {
&jz_usb_ohci_device,
&jz_lcd_device,
&jz_mmc_device,
#ifdef CONFIG_JZ4730_MINIPC
&minipc_bl_device,
&touchpad_buttons_device,
#endif
&jz_i2c_device,
};
static int __init jz_platform_init(void)
{
// this is how it *should* better work than the probing workaround in pcf8563_attach()
//i2c_register_board_info(0, pcf8563_rtc_board_info, 1);// before registering adapters
return platform_add_devices(jz_platform_devices, ARRAY_SIZE(jz_platform_devices));
}
drivers/input/mouse/gpio_mouse.c
2626
2727
2828
29
29
30
31
3032
3133
3234
struct gpio_mouse_platform_data *gpio = dev->private;
struct input_dev *input = dev->input;
int x, y;
//printk(KERN_EMERG "gpio_mouse_scan: left %d right %d()\n", gpio_get_value(gpio->bleft), gpio_get_value(gpio->bright));
if (gpio->bleft >= 0)
input_report_key(input, BTN_LEFT,
gpio_get_value(gpio->bleft) ^ gpio->polarity);
include/asm-mips/mach-jz4730/board-minipc.h
4040
4141
4242
43
44
4345
4446
4547
#define GPIO_CHARG_STAT 125
#define GPIO_TS_PENIRQ 98
#define GPIO_UDC_HOTPLUG 86
#define GPIO_TS_LEFT_BUTTON16
#define GPIO_TS_RIGHT_BUTTON13
/*======================================================================
* MMC/SD

Archive Download the corresponding diff file

Branches

Tags