[s3c6410] Keypad device driver 포팅
임베디드/S3C6410 2011. 4. 27. 16:50
기존 falinux linux kernel에는 keypad 드라이버가 제거되어 있다.
삼성에서 만든 keypad 드라이버를 구해서 커널 소스에 포함 시킨 후 keypad device에서 사용하는 변수들을 소스 파일들에 포함 시켜 주면 된다.
포함 시켜줘야할 변수들
Kconfig, Makefile에 keypad관련 내용을 추가하고 make menuconfig을 이용해서 선택한 후에 컴파일 하면 된다.
삼성에서 만든 keypad 드라이버를 구해서 커널 소스에 포함 시킨 후 keypad device에서 사용하는 변수들을 소스 파일들에 포함 시켜 주면 된다.
포함 시켜줘야할 변수들
- arch/arm/plat-s3c64xx/devs.c
static struct resource s3c_keypad_resource[] = {
[0] = {
.start = S3C_PA_KEYPAD,
[0] = {
.start = S3C_PA_KEYPAD,
.end = S3C_PA_KEYPAD+ S3C_SZ_KEYPAD - 1,
.flags = IORESOURCE_MEM,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_KEYPAD,
.end = IRQ_KEYPAD,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device s3c_device_keypad = {
.name = "s3c-keypad",
.id = -1,
.num_resources = ARRAY_SIZE(s3c_keypad_resource),
.resource = s3c_keypad_resource,
};
EXPORT_SYMBOL(s3c_device_keypad);
[1] = {
.start = IRQ_KEYPAD,
.end = IRQ_KEYPAD,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device s3c_device_keypad = {
.name = "s3c-keypad",
.id = -1,
.num_resources = ARRAY_SIZE(s3c_keypad_resource),
.resource = s3c_keypad_resource,
};
EXPORT_SYMBOL(s3c_device_keypad);
- arch/arm/mach-s3c6410/mach-ezs3c6410.c
static struct platform_device *ezs3c6410_devices[] __initdata = {
:
:
&s3c_device_keypad,
:
:
};
:
:
&s3c_device_keypad,
:
:
};
- arch/arm/plat-s3c/include/plat/devs.h
:
extern struct platform_device s3c_device_usbgadget;
extern struct platform_device s3c_device_keypad;
:
extern struct platform_device s3c_device_usbgadget;
extern struct platform_device s3c_device_keypad;
:
Kconfig, Makefile에 keypad관련 내용을 추가하고 make menuconfig을 이용해서 선택한 후에 컴파일 하면 된다.
'임베디드 > S3C6410' 카테고리의 다른 글
[s3c6410] usb disk automount rules (0) | 2011.06.03 |
---|---|
[s3c6410] mplayer 포팅 (0) | 2011.04.28 |
[s3c6410] linux kernel bootloaod 만들기 (0) | 2011.04.25 |
[s3c6410] ez-s3c6410 bootloader logo 설정 (0) | 2011.04.22 |
[s3c6410] falinux ez-s3c6410 자동 로그인 (0) | 2011.04.01 |