]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
tsc2301 - Add optional keypad name via platform data
authorDaniel Stone <daniel.stone@nokia.com>
Fri, 15 Feb 2008 21:31:44 +0000 (23:31 +0200)
committerTony Lindgren <tony@atomide.com>
Thu, 21 Feb 2008 00:20:38 +0000 (16:20 -0800)
Allow the keypad device name to be customised via platform data.

Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Klaus Pedersen <klaus.k.pedersen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-n800.c
drivers/input/keyboard/tsc2301_kp.c
include/linux/spi/tsc2301.h

index 2682acbf68cd5750fc2414f35b793eaa4a40da8f..34f1c37b99e5755d629bc3614844fa473539a9cd 100644 (file)
@@ -232,6 +232,7 @@ static struct tsc2301_platform_data tsc2301_config = {
                -1,             /* Event for bit 15 */
        },
        .kp_rep         = 0,
+       .keyb_name      = "Internal keypad",
 };
 
 static void tsc2301_dev_init(void)
index 6308ee51507cd3b57fe504880a9ba2befb71ba20..58669f93f73dd28f7b64f78bd0559816d1016478 100644 (file)
@@ -385,7 +385,10 @@ int __devinit tsc2301_kp_init(struct tsc2301 *tsc,
                r = -ENOMEM;
                goto err1;
        }
-       idev->name = "TSC2301 keypad";
+       if (pdata->keyb_name)
+               idev->name = pdata->keyb_name;
+       else
+               idev->name = "TSC2301 keypad";
        snprintf(kp->phys, sizeof(kp->phys), "%s/input-kp", tsc->spi->dev.bus_id);
        idev->phys = kp->phys;
 
index d2c9ddada515fcbf85c1bf55199b81eac2314079..4552ebaad56c3feacfda5435cfb6f222956067cd 100644 (file)
@@ -12,6 +12,7 @@ struct tsc2301_platform_data {
        s16     keyb_int;
        s16     keymap[16];     /* Set a key to a negative value if not used */
        unsigned kp_rep:1;      /* Enable keypad repeating */
+       char    *keyb_name;     /* Keyboard device name */
 
        /*
         * Touchscreen