Commit 61721c88 authored by Joachim Eastwood's avatar Joachim Eastwood Committed by Dmitry Torokhov

Input: omap-keypad - remove platform data support

This is unused since all users (OMAP4/5) are DT only.
Signed-off-by: default avatarJoachim Eastwood <manabian@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent b0156b05
...@@ -589,7 +589,7 @@ config KEYBOARD_OMAP ...@@ -589,7 +589,7 @@ config KEYBOARD_OMAP
config KEYBOARD_OMAP4 config KEYBOARD_OMAP4
tristate "TI OMAP4+ keypad support" tristate "TI OMAP4+ keypad support"
depends on ARCH_OMAP2PLUS depends on OF || ARCH_OMAP2PLUS
select INPUT_MATRIXKMAP select INPUT_MATRIXKMAP
help help
Say Y here if you want to use the OMAP4+ keypad. Say Y here if you want to use the OMAP4+ keypad.
......
...@@ -28,11 +28,10 @@ ...@@ -28,11 +28,10 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/input/matrix_keypad.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/platform_data/omap4-keypad.h>
/* OMAP4 registers */ /* OMAP4 registers */
#define OMAP4_KBD_REVISION 0x00 #define OMAP4_KBD_REVISION 0x00
#define OMAP4_KBD_SYSCONFIG 0x10 #define OMAP4_KBD_SYSCONFIG 0x10
...@@ -218,7 +217,6 @@ static void omap4_keypad_close(struct input_dev *input) ...@@ -218,7 +217,6 @@ static void omap4_keypad_close(struct input_dev *input)
pm_runtime_put_sync(input->dev.parent); pm_runtime_put_sync(input->dev.parent);
} }
#ifdef CONFIG_OF
static int omap4_keypad_parse_dt(struct device *dev, static int omap4_keypad_parse_dt(struct device *dev,
struct omap4_keypad *keypad_data) struct omap4_keypad *keypad_data)
{ {
...@@ -235,20 +233,9 @@ static int omap4_keypad_parse_dt(struct device *dev, ...@@ -235,20 +233,9 @@ static int omap4_keypad_parse_dt(struct device *dev,
return 0; return 0;
} }
#else
static inline int omap4_keypad_parse_dt(struct device *dev,
struct omap4_keypad *keypad_data)
{
return -ENOSYS;
}
#endif
static int omap4_keypad_probe(struct platform_device *pdev) static int omap4_keypad_probe(struct platform_device *pdev)
{ {
const struct omap4_keypad_platform_data *pdata =
dev_get_platdata(&pdev->dev);
const struct matrix_keymap_data *keymap_data =
pdata ? pdata->keymap_data : NULL;
struct omap4_keypad *keypad_data; struct omap4_keypad *keypad_data;
struct input_dev *input_dev; struct input_dev *input_dev;
struct resource *res; struct resource *res;
...@@ -277,14 +264,9 @@ static int omap4_keypad_probe(struct platform_device *pdev) ...@@ -277,14 +264,9 @@ static int omap4_keypad_probe(struct platform_device *pdev)
keypad_data->irq = irq; keypad_data->irq = irq;
if (pdata) {
keypad_data->rows = pdata->rows;
keypad_data->cols = pdata->cols;
} else {
error = omap4_keypad_parse_dt(&pdev->dev, keypad_data); error = omap4_keypad_parse_dt(&pdev->dev, keypad_data);
if (error) if (error)
return error; return error;
}
res = request_mem_region(res->start, resource_size(res), pdev->name); res = request_mem_region(res->start, resource_size(res), pdev->name);
if (!res) { if (!res) {
...@@ -363,7 +345,7 @@ static int omap4_keypad_probe(struct platform_device *pdev) ...@@ -363,7 +345,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
goto err_free_input; goto err_free_input;
} }
error = matrix_keypad_build_keymap(keymap_data, NULL, error = matrix_keypad_build_keymap(NULL, NULL,
keypad_data->rows, keypad_data->cols, keypad_data->rows, keypad_data->cols,
keypad_data->keymap, input_dev); keypad_data->keymap, input_dev);
if (error) { if (error) {
...@@ -434,13 +416,11 @@ static int omap4_keypad_remove(struct platform_device *pdev) ...@@ -434,13 +416,11 @@ static int omap4_keypad_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_OF
static const struct of_device_id omap_keypad_dt_match[] = { static const struct of_device_id omap_keypad_dt_match[] = {
{ .compatible = "ti,omap4-keypad" }, { .compatible = "ti,omap4-keypad" },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, omap_keypad_dt_match); MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
#endif
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int omap4_keypad_suspend(struct device *dev) static int omap4_keypad_suspend(struct device *dev)
...@@ -482,7 +462,7 @@ static struct platform_driver omap4_keypad_driver = { ...@@ -482,7 +462,7 @@ static struct platform_driver omap4_keypad_driver = {
.name = "omap4-keypad", .name = "omap4-keypad",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = &omap4_keypad_pm_ops, .pm = &omap4_keypad_pm_ops,
.of_match_table = of_match_ptr(omap_keypad_dt_match), .of_match_table = omap_keypad_dt_match,
}, },
}; };
module_platform_driver(omap4_keypad_driver); module_platform_driver(omap4_keypad_driver);
......
#ifndef __LINUX_INPUT_OMAP4_KEYPAD_H
#define __LINUX_INPUT_OMAP4_KEYPAD_H
#include <linux/input/matrix_keypad.h>
struct omap4_keypad_platform_data {
const struct matrix_keymap_data *keymap_data;
u8 rows;
u8 cols;
};
#endif /* __LINUX_INPUT_OMAP4_KEYPAD_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment