]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-h3.c
ARM: OMAP: add SoSSI clock (remove manual checking of SoSSI state from idle)
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-h3.c
index 7b206116cd0391882f6d093325150bf9577acd80..79d4ef4c54d4818918b216db9da312d24e14b0bf 100644 (file)
@@ -247,10 +247,13 @@ static struct resource h3_kp_resources[] = {
 };
 
 static struct omap_kp_platform_data h3_kp_data = {
-       .rows   = 8,
-       .cols   = 8,
-       .keymap = h3_keymap,
-       .rep    = 1,
+       .rows           = 8,
+       .cols           = 8,
+       .keymap         = h3_keymap,
+       .keymapsize     = ARRAY_SIZE(h3_keymap),
+       .rep            = 1,
+       .delay          = 9,
+       .dbounce        = 1,
 };
 
 static struct platform_device h3_kp_device = {
@@ -291,9 +294,11 @@ static int h3_select_irda(struct device *dev, int state)
        return err;
 }
 
-static void set_trans_mode(void *data)
+static void set_trans_mode(struct work_struct *work)
 {
-       int *mode = data;
+       struct omap_irda_config *irda_config =
+               container_of(work, struct omap_irda_config, gpio_expa.work);
+       int mode = irda_config->mode;
        unsigned char expa;
        int err = 0;
 
@@ -303,7 +308,7 @@ static void set_trans_mode(void *data)
 
        expa &= ~0x03;
 
-       if (*mode & IR_SIRMODE) {
+       if (mode & IR_SIRMODE) {
                expa |= 0x01;
        } else { /* MIR/FIR */
                expa |= 0x03;
@@ -318,9 +323,10 @@ static int h3_transceiver_mode(struct device *dev, int mode)
 {
        struct omap_irda_config *irda_config = dev->platform_data;
 
+       irda_config->mode = mode;
        cancel_delayed_work(&irda_config->gpio_expa);
-       PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
-       schedule_work(&irda_config->gpio_expa);
+       PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
+       schedule_delayed_work(&irda_config->gpio_expa, 0);
 
        return 0;
 }
@@ -451,7 +457,7 @@ static void __init h3_init_smc91x(void)
        }
 }
 
-void h3_init_irq(void)
+static void __init h3_init_irq(void)
 {
        omap1_init_common_hw();
        omap_init_irq();