aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-yocto-dev/h1940/0011-ARM-h1940-add-IR-switch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-yocto-dev/h1940/0011-ARM-h1940-add-IR-switch.patch')
-rw-r--r--recipes-kernel/linux/linux-yocto-dev/h1940/0011-ARM-h1940-add-IR-switch.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-yocto-dev/h1940/0011-ARM-h1940-add-IR-switch.patch b/recipes-kernel/linux/linux-yocto-dev/h1940/0011-ARM-h1940-add-IR-switch.patch
new file mode 100644
index 0000000..4ee12fb
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto-dev/h1940/0011-ARM-h1940-add-IR-switch.patch
@@ -0,0 +1,61 @@
+From f2c0263a125f40197d19e6798a655d2cc71a5f2c Mon Sep 17 00:00:00 2001
+From: Vasily Khoruzhick <anarsoul@gmail.com>
+Date: Sun, 18 Dec 2011 11:29:30 +0300
+Subject: [PATCH 11/12] ARM: h1940: add IR switch
+
+Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
+---
+ arch/arm/mach-s3c24xx/mach-h1940.c | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
+index 96c8c91..6b45688 100644
+--- a/arch/arm/mach-s3c24xx/mach-h1940.c
++++ b/arch/arm/mach-s3c24xx/mach-h1940.c
+@@ -696,6 +696,22 @@ static struct platform_device h1940_bluetooth = {
+ },
+ };
+
++static struct rfkill_gpio_platform_data h1940_ir_rfkill_pdata = {
++ .name = "h1940-ir",
++ .reset_gpio = -EINVAL,
++ .shutdown_gpio = S3C2410_GPB(9),
++ .shutdown_gpio_inverted = 1,
++ .type = RFKILL_TYPE_IR,
++};
++
++static struct platform_device h1940_irda = {
++ .name = "rfkill_gpio",
++ .id = 1,
++ .dev = {
++ .platform_data = &h1940_ir_rfkill_pdata,
++ },
++};
++
+ static struct platform_device *h1940_devices[] __initdata = {
+ &h1940_dev_buttons,
+ &s3c_device_ohci,
+@@ -717,6 +733,7 @@ static struct platform_device *h1940_devices[] __initdata = {
+ &power_supply,
+ &h1940_battery,
+ &h1940_bluetooth,
++ &h1940_irda,
+ };
+
+ static void __init h1940_map_io(void)
+@@ -797,6 +814,12 @@ static void __init h1940_init(void)
+ s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
+ s3c_gpio_setpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
+
++ /* Configure IR serial port GPIOs */
++ s3c_gpio_cfgpin(S3C2410_GPH(6), S3C2410_GPH6_TXD2);
++ s3c_gpio_setpull(S3C2410_GPH(6), S3C_GPIO_PULL_NONE);
++ s3c_gpio_cfgpin(S3C2410_GPH(7), S3C2410_GPH7_RXD2);
++ s3c_gpio_setpull(S3C2410_GPH(7), S3C_GPIO_PULL_NONE);
++
+ gpio_request(S3C2410_GPC(9), "BT reset");
+ gpio_direction_output(S3C2410_GPC(9), 1);
+
+--
+1.8.4
+