diff options
author | Miguel Aguilar <miguel.aguilar@ridgerun.com> | 2010-01-06 03:06:50 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-01-06 03:17:11 -0500 |
commit | 861a64428c0786a5cfa2ffb36b2f8058dea5dda0 (patch) | |
tree | a89ebbb8340e1f9fde705bf968a567e61c497573 /drivers/input/keyboard | |
parent | 30a589fde0162aa4dac7c69803aeee8fbe8d1b82 (diff) |
Input: davinci_keyscan - add device_enable method to platform data
Add a function pointer in the platform data of the DaVinci Keyscan driver
called device_enable, in order to perform board specific actions when
the device is initialized, like setup the PINMUX configuration.
Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/davinci_keyscan.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 6e52d855f637..d410d7a52f1d 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c | |||
@@ -174,6 +174,14 @@ static int __init davinci_ks_probe(struct platform_device *pdev) | |||
174 | struct davinci_ks_platform_data *pdata = pdev->dev.platform_data; | 174 | struct davinci_ks_platform_data *pdata = pdev->dev.platform_data; |
175 | int error, i; | 175 | int error, i; |
176 | 176 | ||
177 | if (pdata->device_enable) { | ||
178 | error = pdata->device_enable(dev); | ||
179 | if (error < 0) { | ||
180 | dev_dbg(dev, "device enable function failed\n"); | ||
181 | return error; | ||
182 | } | ||
183 | } | ||
184 | |||
177 | if (!pdata->keymap) { | 185 | if (!pdata->keymap) { |
178 | dev_dbg(dev, "no keymap from pdata\n"); | 186 | dev_dbg(dev, "no keymap from pdata\n"); |
179 | return -EINVAL; | 187 | return -EINVAL; |