All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] remove unused omap4-keypad files and pdata support
@ 2014-05-17 21:24 Joachim Eastwood
  2014-05-17 21:24 ` [PATCH 1/2] ARM: OMAP2+: remove unused omap4-keypad file and code Joachim Eastwood
  2014-05-17 21:24 ` [PATCH 2/2] Input: omap-keypad - remove platform data support Joachim Eastwood
  0 siblings, 2 replies; 6+ messages in thread
From: Joachim Eastwood @ 2014-05-17 21:24 UTC (permalink / raw)
  To: illia.smyrnov, dmitry.torokhov, tony
  Cc: linux-omap, linux-input, Joachim Eastwood

Hi,

This patch removes unused omap4-keypad init functions from mach-omap2
and makes the driver DT only. Board files for omap4 are long gone and
this has been unused since.

Note: This has only been compile tested!

Joachim Eastwood (2):
  ARM: OMAP2+: remove unused omap4-keypad file and code
  Input: omap-keypad - remove platform data support

 arch/arm/mach-omap2/devices.c              | 33 ------------------------------
 arch/arm/mach-omap2/omap4-keypad.h         |  8 --------
 drivers/input/keyboard/Kconfig             |  2 +-
 drivers/input/keyboard/omap4-keypad.c      | 31 ++++++----------------------
 include/linux/platform_data/omap4-keypad.h | 13 ------------
 5 files changed, 7 insertions(+), 80 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/omap4-keypad.h
 delete mode 100644 include/linux/platform_data/omap4-keypad.h

-- 
1.8.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] ARM: OMAP2+: remove unused omap4-keypad file and code
  2014-05-17 21:24 [PATCH 0/2] remove unused omap4-keypad files and pdata support Joachim Eastwood
@ 2014-05-17 21:24 ` Joachim Eastwood
  2014-05-19  5:37   ` Dmitry Torokhov
  2014-05-17 21:24 ` [PATCH 2/2] Input: omap-keypad - remove platform data support Joachim Eastwood
  1 sibling, 1 reply; 6+ messages in thread
From: Joachim Eastwood @ 2014-05-17 21:24 UTC (permalink / raw)
  To: illia.smyrnov, dmitry.torokhov, tony
  Cc: linux-omap, linux-input, Joachim Eastwood

This has been unused since omap4 board files went away.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 arch/arm/mach-omap2/devices.c      | 33 ---------------------------------
 arch/arm/mach-omap2/omap4-keypad.h |  8 --------
 2 files changed, 41 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/omap4-keypad.h

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index e58609b312c7..592ba0a0ecf3 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -18,7 +18,6 @@
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/pinctrl/machine.h>
-#include <linux/platform_data/omap4-keypad.h>
 #include <linux/platform_data/mailbox-omap.h>
 
 #include <asm/mach-types.h>
@@ -29,7 +28,6 @@
 #include "iomap.h"
 #include "omap_hwmod.h"
 #include "omap_device.h"
-#include "omap4-keypad.h"
 
 #include "soc.h"
 #include "common.h"
@@ -255,37 +253,6 @@ static inline void omap_init_camera(void)
 #endif
 }
 
-int __init omap4_keyboard_init(struct omap4_keypad_platform_data
-			*sdp4430_keypad_data, struct omap_board_data *bdata)
-{
-	struct platform_device *pdev;
-	struct omap_hwmod *oh;
-	struct omap4_keypad_platform_data *keypad_data;
-	unsigned int id = -1;
-	char *oh_name = "kbd";
-	char *name = "omap4-keypad";
-
-	oh = omap_hwmod_lookup(oh_name);
-	if (!oh) {
-		pr_err("Could not look up %s\n", oh_name);
-		return -ENODEV;
-	}
-
-	keypad_data = sdp4430_keypad_data;
-
-	pdev = omap_device_build(name, id, oh, keypad_data,
-				 sizeof(struct omap4_keypad_platform_data));
-
-	if (IS_ERR(pdev)) {
-		WARN(1, "Can't build omap_device for %s:%s.\n",
-						name, oh->name);
-		return PTR_ERR(pdev);
-	}
-	oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
-
-	return 0;
-}
-
 #if defined(CONFIG_OMAP2PLUS_MBOX) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE)
 static inline void __init omap_init_mbox(void)
 {
diff --git a/arch/arm/mach-omap2/omap4-keypad.h b/arch/arm/mach-omap2/omap4-keypad.h
deleted file mode 100644
index 20de0d5a7e77..000000000000
--- a/arch/arm/mach-omap2/omap4-keypad.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H
-#define ARCH_ARM_PLAT_OMAP4_KEYPAD_H
-
-struct omap_board_data;
-
-extern int omap4_keyboard_init(struct omap4_keypad_platform_data *,
-				struct omap_board_data *);
-#endif
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] Input: omap-keypad - remove platform data support
  2014-05-17 21:24 [PATCH 0/2] remove unused omap4-keypad files and pdata support Joachim Eastwood
  2014-05-17 21:24 ` [PATCH 1/2] ARM: OMAP2+: remove unused omap4-keypad file and code Joachim Eastwood
@ 2014-05-17 21:24 ` Joachim Eastwood
  1 sibling, 0 replies; 6+ messages in thread
From: Joachim Eastwood @ 2014-05-17 21:24 UTC (permalink / raw)
  To: illia.smyrnov, dmitry.torokhov, tony
  Cc: linux-omap, linux-input, Joachim Eastwood

This is unused since all users (OMAP4/5) are DT only.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 drivers/input/keyboard/Kconfig             |  2 +-
 drivers/input/keyboard/omap4-keypad.c      | 31 ++++++------------------------
 include/linux/platform_data/omap4-keypad.h | 13 -------------
 3 files changed, 7 insertions(+), 39 deletions(-)
 delete mode 100644 include/linux/platform_data/omap4-keypad.h

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 76842d7dc2e3..295cbf4763b1 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -578,7 +578,7 @@ config KEYBOARD_OMAP
 
 config KEYBOARD_OMAP4
 	tristate "TI OMAP4+ keypad support"
-	depends on ARCH_OMAP2PLUS
+	depends on OF || ARCH_OMAP2PLUS
 	select INPUT_MATRIXKMAP
 	help
 	  Say Y here if you want to use the OMAP4+ keypad.
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 0400b3f2b4b9..8b32f44e84ee 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -28,11 +28,10 @@
 #include <linux/io.h>
 #include <linux/of.h>
 #include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
 
-#include <linux/platform_data/omap4-keypad.h>
-
 /* OMAP4 registers */
 #define OMAP4_KBD_REVISION		0x00
 #define OMAP4_KBD_SYSCONFIG		0x10
@@ -218,7 +217,6 @@ static void omap4_keypad_close(struct input_dev *input)
 	pm_runtime_put_sync(input->dev.parent);
 }
 
-#ifdef CONFIG_OF
 static int omap4_keypad_parse_dt(struct device *dev,
 				 struct omap4_keypad *keypad_data)
 {
@@ -235,20 +233,10 @@ static int omap4_keypad_parse_dt(struct device *dev,
 
 	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)
 {
-	const struct omap4_keypad_platform_data *pdata =
-				dev_get_platdata(&pdev->dev);
-	const struct matrix_keymap_data *keymap_data =
-				pdata ? pdata->keymap_data : NULL;
+	const struct matrix_keymap_data *keymap_data = NULL;
 	struct omap4_keypad *keypad_data;
 	struct input_dev *input_dev;
 	struct resource *res;
@@ -277,14 +265,9 @@ static int omap4_keypad_probe(struct platform_device *pdev)
 
 	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);
-		if (error)
-			return error;
-	}
+	error = omap4_keypad_parse_dt(&pdev->dev, keypad_data);
+	if (error)
+		return error;
 
 	res = request_mem_region(res->start, resource_size(res), pdev->name);
 	if (!res) {
@@ -434,13 +417,11 @@ static int omap4_keypad_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_OF
 static const struct of_device_id omap_keypad_dt_match[] = {
 	{ .compatible = "ti,omap4-keypad" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
-#endif
 
 #ifdef CONFIG_PM_SLEEP
 static int omap4_keypad_suspend(struct device *dev)
@@ -482,7 +463,7 @@ static struct platform_driver omap4_keypad_driver = {
 		.name	= "omap4-keypad",
 		.owner	= THIS_MODULE,
 		.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);
diff --git a/include/linux/platform_data/omap4-keypad.h b/include/linux/platform_data/omap4-keypad.h
deleted file mode 100644
index 4eef5fb05a17..000000000000
--- a/include/linux/platform_data/omap4-keypad.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#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 */
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ARM: OMAP2+: remove unused omap4-keypad file and code
  2014-05-17 21:24 ` [PATCH 1/2] ARM: OMAP2+: remove unused omap4-keypad file and code Joachim Eastwood
@ 2014-05-19  5:37   ` Dmitry Torokhov
  2014-05-19 16:18     ` Tony Lindgren
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Torokhov @ 2014-05-19  5:37 UTC (permalink / raw)
  To: Joachim Eastwood; +Cc: illia.smyrnov, tony, linux-omap, linux-input

On Sat, May 17, 2014 at 11:24:10PM +0200, Joachim Eastwood wrote:
> This has been unused since omap4 board files went away.
> 
> Signed-off-by: Joachim Eastwood <manabian@gmail.com>

Tony, can I merge both through my tree?

> ---
>  arch/arm/mach-omap2/devices.c      | 33 ---------------------------------
>  arch/arm/mach-omap2/omap4-keypad.h |  8 --------
>  2 files changed, 41 deletions(-)
>  delete mode 100644 arch/arm/mach-omap2/omap4-keypad.h
> 
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index e58609b312c7..592ba0a0ecf3 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -18,7 +18,6 @@
>  #include <linux/slab.h>
>  #include <linux/of.h>
>  #include <linux/pinctrl/machine.h>
> -#include <linux/platform_data/omap4-keypad.h>
>  #include <linux/platform_data/mailbox-omap.h>
>  
>  #include <asm/mach-types.h>
> @@ -29,7 +28,6 @@
>  #include "iomap.h"
>  #include "omap_hwmod.h"
>  #include "omap_device.h"
> -#include "omap4-keypad.h"
>  
>  #include "soc.h"
>  #include "common.h"
> @@ -255,37 +253,6 @@ static inline void omap_init_camera(void)
>  #endif
>  }
>  
> -int __init omap4_keyboard_init(struct omap4_keypad_platform_data
> -			*sdp4430_keypad_data, struct omap_board_data *bdata)
> -{
> -	struct platform_device *pdev;
> -	struct omap_hwmod *oh;
> -	struct omap4_keypad_platform_data *keypad_data;
> -	unsigned int id = -1;
> -	char *oh_name = "kbd";
> -	char *name = "omap4-keypad";
> -
> -	oh = omap_hwmod_lookup(oh_name);
> -	if (!oh) {
> -		pr_err("Could not look up %s\n", oh_name);
> -		return -ENODEV;
> -	}
> -
> -	keypad_data = sdp4430_keypad_data;
> -
> -	pdev = omap_device_build(name, id, oh, keypad_data,
> -				 sizeof(struct omap4_keypad_platform_data));
> -
> -	if (IS_ERR(pdev)) {
> -		WARN(1, "Can't build omap_device for %s:%s.\n",
> -						name, oh->name);
> -		return PTR_ERR(pdev);
> -	}
> -	oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
> -
> -	return 0;
> -}
> -
>  #if defined(CONFIG_OMAP2PLUS_MBOX) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE)
>  static inline void __init omap_init_mbox(void)
>  {
> diff --git a/arch/arm/mach-omap2/omap4-keypad.h b/arch/arm/mach-omap2/omap4-keypad.h
> deleted file mode 100644
> index 20de0d5a7e77..000000000000
> --- a/arch/arm/mach-omap2/omap4-keypad.h
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -#ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H
> -#define ARCH_ARM_PLAT_OMAP4_KEYPAD_H
> -
> -struct omap_board_data;
> -
> -extern int omap4_keyboard_init(struct omap4_keypad_platform_data *,
> -				struct omap_board_data *);
> -#endif
> -- 
> 1.8.0
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ARM: OMAP2+: remove unused omap4-keypad file and code
  2014-05-19  5:37   ` Dmitry Torokhov
@ 2014-05-19 16:18     ` Tony Lindgren
  2014-05-29  7:33       ` Dmitry Torokhov
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2014-05-19 16:18 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Joachim Eastwood, illia.smyrnov, linux-omap, linux-input

* Dmitry Torokhov <dmitry.torokhov@gmail.com> [140518 22:38]:
> On Sat, May 17, 2014 at 11:24:10PM +0200, Joachim Eastwood wrote:
> > This has been unused since omap4 board files went away.
> > 
> > Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> 
> Tony, can I merge both through my tree?

Yes I don't have anything touching the omap4_keyboard_init
areas that I can think of:

Acked-by: Tony Lindgren <tony@atomide.com>
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ARM: OMAP2+: remove unused omap4-keypad file and code
  2014-05-19 16:18     ` Tony Lindgren
@ 2014-05-29  7:33       ` Dmitry Torokhov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2014-05-29  7:33 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Joachim Eastwood, illia.smyrnov, linux-omap, linux-input

On Mon, May 19, 2014 at 09:18:15AM -0700, Tony Lindgren wrote:
> * Dmitry Torokhov <dmitry.torokhov@gmail.com> [140518 22:38]:
> > On Sat, May 17, 2014 at 11:24:10PM +0200, Joachim Eastwood wrote:
> > > This has been unused since omap4 board files went away.
> > > 
> > > Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> > 
> > Tony, can I merge both through my tree?
> 
> Yes I don't have anything touching the omap4_keyboard_init
> areas that I can think of:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>
>  

Applied both, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-29  7:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-17 21:24 [PATCH 0/2] remove unused omap4-keypad files and pdata support Joachim Eastwood
2014-05-17 21:24 ` [PATCH 1/2] ARM: OMAP2+: remove unused omap4-keypad file and code Joachim Eastwood
2014-05-19  5:37   ` Dmitry Torokhov
2014-05-19 16:18     ` Tony Lindgren
2014-05-29  7:33       ` Dmitry Torokhov
2014-05-17 21:24 ` [PATCH 2/2] Input: omap-keypad - remove platform data support Joachim Eastwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.