Skip to content

Commit

Permalink
Input: omap4-keypad - move platform_data to <linux/platform_data>
Browse files Browse the repository at this point in the history
This patch allows us to drop the OMAP dependency from the OMAP4 keypad
driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Felipe Balbi authored and Dmitry Torokhov committed Mar 17, 2012
1 parent 0439166 commit 0f1142a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/board-4430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/regulator/fixed.h>
#include <linux/leds.h>
#include <linux/leds_pwm.h>
#include <linux/platform_data/omap4-keypad.h>

#include <mach/hardware.h>
#include <asm/hardware/gic.h>
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/platform_data/omap4-keypad.h>

#include <mach/hardware.h>
#include <mach/irqs.h>
Expand Down
9 changes: 0 additions & 9 deletions arch/arm/plat-omap/include/plat/omap4-keypad.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H
#define ARCH_ARM_PLAT_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;
};

extern int omap4_keyboard_init(struct omap4_keypad_platform_data *,
struct omap_board_data *);
#endif
1 change: 0 additions & 1 deletion drivers/input/keyboard/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ config KEYBOARD_OMAP

config KEYBOARD_OMAP4
tristate "TI OMAP4 keypad support"
depends on ARCH_OMAP4
help
Say Y here if you want to use the OMAP4 keypad.

Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/omap4-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <linux/slab.h>
#include <linux/pm_runtime.h>

#include <plat/omap4-keypad.h>
#include <linux/platform_data/omap4-keypad.h>

/* OMAP4 registers */
#define OMAP4_KBD_REVISION 0x00
Expand Down
13 changes: 13 additions & 0 deletions include/linux/platform_data/omap4-keypad.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#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 */

0 comments on commit 0f1142a

Please sign in to comment.