Re: [PATCH 1/5] ARM: pxa27x/pxa3xx: moved pxa27x_keypad.h to platformpxa directory

From: Eric Miao
Date: Tue Aug 31 2010 - 00:14:16 EST


On Thu, Aug 26, 2010 at 5:18 PM, Mark F. Brown <mark.brown314@xxxxxxxxx> wrote:
> mach-mmp utilizes pxa27x_keypad code so we need to move header to
> platform pxa directory.

Good move. I'm actually very inclined to move this into include/linux/input/.

And you may try '-M' when generating patches with 'git format-patch', and
see the difference of the output.

>
> Signed-off-by: Mark F. Brown <mark.brown314@xxxxxxxxx>
> ---
> Âarch/arm/mach-pxa/devices.c          Â|  Â2 +-
> Âarch/arm/mach-pxa/em-x270.c          Â|  Â2 +-
> Âarch/arm/mach-pxa/ezx.c            Â|  Â2 +-
> Âarch/arm/mach-pxa/include/mach/pxa27x_keypad.h | Â 59 ------------------------
> Âarch/arm/mach-pxa/littleton.c         Â|  Â2 +-
> Âarch/arm/mach-pxa/mainstone.c         Â|  Â4 +-
> Âarch/arm/mach-pxa/mioa701.c          Â|  Â2 +-
> Âarch/arm/mach-pxa/palmld.c           |  Â2 +-
> Âarch/arm/mach-pxa/palmt5.c           |  Â2 +-
> Âarch/arm/mach-pxa/palmtreo.c          |  Â2 +-
> Âarch/arm/mach-pxa/palmtx.c           |  Â2 +-
> Âarch/arm/mach-pxa/palmz72.c          Â|  Â2 +-
> Âarch/arm/mach-pxa/tavorevb.c          |  Â2 +-
> Âarch/arm/mach-pxa/z2.c             |  Â2 +-
> Âarch/arm/mach-pxa/zylonite.c          |  Â2 +-
> Âarch/arm/plat-pxa/include/plat/pxa27x_keypad.h | Â 59 ++++++++++++++++++++++++
> Âdrivers/input/keyboard/pxa27x_keypad.c     |  Â2 +-
> Â17 files changed, 75 insertions(+), 75 deletions(-)
> Âdelete mode 100644 arch/arm/mach-pxa/include/mach/pxa27x_keypad.h
> Âcreate mode 100644 arch/arm/plat-pxa/include/plat/pxa27x_keypad.h
>
> diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
> index a2fc859..08b4103 100644
> --- a/arch/arm/mach-pxa/devices.c
> +++ b/arch/arm/mach-pxa/devices.c
> @@ -11,7 +11,7 @@
> Â#include <mach/mmc.h>
> Â#include <mach/irda.h>
> Â#include <mach/ohci.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/pxa2xx_spi.h>
> Â#include <mach/camera.h>
> Â#include <mach/audio.h>
> diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
> index 0517c17..51286a7 100644
> --- a/arch/arm/mach-pxa/em-x270.c
> +++ b/arch/arm/mach-pxa/em-x270.c
> @@ -43,7 +43,7 @@
> Â#include <mach/pxafb.h>
> Â#include <mach/ohci.h>
> Â#include <mach/mmc.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <plat/i2c.h>
> Â#include <mach/camera.h>
> Â#include <mach/pxa2xx_spi.h>
> diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
> index 3fe61f4..f997e84 100644
> --- a/arch/arm/mach-pxa/ezx.c
> +++ b/arch/arm/mach-pxa/ezx.c
> @@ -32,7 +32,7 @@
> Â#include <mach/ohci.h>
> Â#include <plat/i2c.h>
> Â#include <mach/hardware.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/camera.h>
>
> Â#include "devices.h"
> diff --git a/arch/arm/mach-pxa/include/mach/pxa27x_keypad.h b/arch/arm/mach-pxa/include/mach/pxa27x_keypad.h
> deleted file mode 100644
> index 7b4eadc..0000000
> --- a/arch/arm/mach-pxa/include/mach/pxa27x_keypad.h
> +++ /dev/null
> @@ -1,59 +0,0 @@
> -#ifndef __ASM_ARCH_PXA27x_KEYPAD_H
> -#define __ASM_ARCH_PXA27x_KEYPAD_H
> -
> -#include <linux/input.h>
> -#include <linux/input/matrix_keypad.h>
> -
> -#define MAX_MATRIX_KEY_ROWS Â Â(8)
> -#define MAX_MATRIX_KEY_COLS Â Â(8)
> -#define MATRIX_ROW_SHIFT Â Â Â (3)
> -#define MAX_DIRECT_KEY_NUM Â Â (8)
> -
> -/* pxa3xx keypad platform specific parameters
> - *
> - * NOTE:
> - * 1. direct_key_num indicates the number of keys in the direct keypad
> - * Â Â_plus_ the number of rotary-encoder sensor inputs, Âthis can be
> - * Â Âleft as 0 if only rotary encoders are enabled, Âthe driver will
> - * Â Âautomatically calculate this
> - *
> - * 2. direct_key_map is the key code map for the direct keys, if rotary
> - * Â Âencoder(s) are enabled, direct key 0/1(2/3) will be ignored
> - *
> - * 3. rotary can be either interpreted as a relative input event (e.g.
> - * Â ÂREL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT)
> - *
> - * 4. matrix key and direct key will use the same debounce_interval by
> - * Â Âdefault, which should be sufficient in most cases
> - */
> -struct pxa27x_keypad_platform_data {
> -
> - Â Â Â /* code map for the matrix keys */
> -    unsigned int  Âmatrix_key_rows;
> -    unsigned int  Âmatrix_key_cols;
> -    unsigned int  Â*matrix_key_map;
> -    int       matrix_key_map_size;
> -
> - Â Â Â /* direct keys */
> -    int       direct_key_num;
> -    unsigned int  Âdirect_key_map[MAX_DIRECT_KEY_NUM];
> -
> - Â Â Â /* rotary encoders 0 */
> -    int       enable_rotary0;
> -    int       rotary0_rel_code;
> -    int       rotary0_up_key;
> -    int       rotary0_down_key;
> -
> - Â Â Â /* rotary encoders 1 */
> -    int       enable_rotary1;
> -    int       rotary1_rel_code;
> -    int       rotary1_up_key;
> -    int       rotary1_down_key;
> -
> - Â Â Â /* key debounce interval */
> -    unsigned int  Âdebounce_interval;
> -};
> -
> -extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
> -
> -#endif /* __ASM_ARCH_PXA27x_KEYPAD_H */
> diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
> index 83f3236..eb58506 100644
> --- a/arch/arm/mach-pxa/littleton.c
> +++ b/arch/arm/mach-pxa/littleton.c
> @@ -43,7 +43,7 @@
> Â#include <mach/pxafb.h>
> Â#include <mach/mmc.h>
> Â#include <mach/pxa2xx_spi.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/littleton.h>
> Â#include <plat/i2c.h>
> Â#include <plat/pxa3xx_nand.h>
> diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
> index c2a8717..126dca1 100644
> --- a/arch/arm/mach-pxa/mainstone.c
> +++ b/arch/arm/mach-pxa/mainstone.c
> @@ -41,7 +41,7 @@
> Â#include <asm/mach/irq.h>
> Â#include <asm/mach/flash.h>
>
> -#include <mach/pxa27x.h>
> +#include <plat/pxa27x.h>
> Â#include <mach/gpio.h>
> Â#include <mach/mainstone.h>
> Â#include <mach/audio.h>
> @@ -50,7 +50,7 @@
> Â#include <mach/mmc.h>
> Â#include <mach/irda.h>
> Â#include <mach/ohci.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
>
> Â#include "generic.h"
> Â#include "devices.h"
> diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
> index dc66942..ffb3f5a 100644
> --- a/arch/arm/mach-pxa/mioa701.c
> +++ b/arch/arm/mach-pxa/mioa701.c
> @@ -45,7 +45,7 @@
>
> Â#include <mach/pxa27x.h>
> Â#include <mach/regs-rtc.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/pxafb.h>
> Â#include <mach/mmc.h>
> Â#include <mach/udc.h>
> diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
> index 91038ee..3ff0c4a 100644
> --- a/arch/arm/mach-pxa/palmld.c
> +++ b/arch/arm/mach-pxa/palmld.c
> @@ -39,7 +39,7 @@
> Â#include <mach/mmc.h>
> Â#include <mach/pxafb.h>
> Â#include <mach/irda.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/palmasoc.h>
> Â#include <mach/palm27x.h>
>
> diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
> index 1c28199..5b9f766 100644
> --- a/arch/arm/mach-pxa/palmt5.c
> +++ b/arch/arm/mach-pxa/palmt5.c
> @@ -39,7 +39,7 @@
> Â#include <mach/mmc.h>
> Â#include <mach/pxafb.h>
> Â#include <mach/irda.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/udc.h>
> Â#include <mach/palmasoc.h>
> Â#include <mach/palm27x.h>
> diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
> index 52defd5..f685a60 100644
> --- a/arch/arm/mach-pxa/palmtreo.c
> +++ b/arch/arm/mach-pxa/palmtreo.c
> @@ -39,7 +39,7 @@
> Â#include <mach/mmc.h>
> Â#include <mach/pxafb.h>
> Â#include <mach/irda.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/udc.h>
> Â#include <mach/ohci.h>
> Â#include <mach/pxa2xx-regs.h>
> diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
> index 144dc2b..89a3792 100644
> --- a/arch/arm/mach-pxa/palmtx.c
> +++ b/arch/arm/mach-pxa/palmtx.c
> @@ -43,7 +43,7 @@
> Â#include <mach/mmc.h>
> Â#include <mach/pxafb.h>
> Â#include <mach/irda.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/udc.h>
> Â#include <mach/palmasoc.h>
> Â#include <mach/palm27x.h>
> diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
> index 87e4b10..38f4425 100644
> --- a/arch/arm/mach-pxa/palmz72.c
> +++ b/arch/arm/mach-pxa/palmz72.c
> @@ -41,7 +41,7 @@
> Â#include <mach/mmc.h>
> Â#include <mach/pxafb.h>
> Â#include <mach/irda.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/udc.h>
> Â#include <mach/palmasoc.h>
> Â#include <mach/palm27x.h>
> diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
> index f02dcb5..0f440c9 100644
> --- a/arch/arm/mach-pxa/tavorevb.c
> +++ b/arch/arm/mach-pxa/tavorevb.c
> @@ -25,7 +25,7 @@
>
> Â#include <mach/pxa930.h>
> Â#include <mach/pxafb.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
>
> Â#include "devices.h"
> Â#include "generic.h"
> diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
> index f0d0228..8c44bc4 100644
> --- a/arch/arm/mach-pxa/z2.c
> +++ b/arch/arm/mach-pxa/z2.c
> @@ -37,7 +37,7 @@
> Â#include <mach/z2.h>
> Â#include <mach/pxafb.h>
> Â#include <mach/mmc.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <mach/pxa2xx_spi.h>
>
> Â#include <plat/i2c.h>
> diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
> index 2edad61..69df3ed 100644
> --- a/arch/arm/mach-pxa/zylonite.c
> +++ b/arch/arm/mach-pxa/zylonite.c
> @@ -30,7 +30,7 @@
> Â#include <mach/zylonite.h>
> Â#include <mach/mmc.h>
> Â#include <mach/ohci.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â#include <plat/pxa3xx_nand.h>
>
> Â#include "devices.h"
> diff --git a/arch/arm/plat-pxa/include/plat/pxa27x_keypad.h b/arch/arm/plat-pxa/include/plat/pxa27x_keypad.h
> new file mode 100644
> index 0000000..7b4eadc
> --- /dev/null
> +++ b/arch/arm/plat-pxa/include/plat/pxa27x_keypad.h
> @@ -0,0 +1,59 @@
> +#ifndef __ASM_ARCH_PXA27x_KEYPAD_H
> +#define __ASM_ARCH_PXA27x_KEYPAD_H
> +
> +#include <linux/input.h>
> +#include <linux/input/matrix_keypad.h>
> +
> +#define MAX_MATRIX_KEY_ROWS Â Â(8)
> +#define MAX_MATRIX_KEY_COLS Â Â(8)
> +#define MATRIX_ROW_SHIFT Â Â Â (3)
> +#define MAX_DIRECT_KEY_NUM Â Â (8)
> +
> +/* pxa3xx keypad platform specific parameters
> + *
> + * NOTE:
> + * 1. direct_key_num indicates the number of keys in the direct keypad
> + * Â Â_plus_ the number of rotary-encoder sensor inputs, Âthis can be
> + * Â Âleft as 0 if only rotary encoders are enabled, Âthe driver will
> + * Â Âautomatically calculate this
> + *
> + * 2. direct_key_map is the key code map for the direct keys, if rotary
> + * Â Âencoder(s) are enabled, direct key 0/1(2/3) will be ignored
> + *
> + * 3. rotary can be either interpreted as a relative input event (e.g.
> + * Â ÂREL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT)
> + *
> + * 4. matrix key and direct key will use the same debounce_interval by
> + * Â Âdefault, which should be sufficient in most cases
> + */
> +struct pxa27x_keypad_platform_data {
> +
> + Â Â Â /* code map for the matrix keys */
> +    unsigned int  Âmatrix_key_rows;
> +    unsigned int  Âmatrix_key_cols;
> +    unsigned int  Â*matrix_key_map;
> +    int       matrix_key_map_size;
> +
> + Â Â Â /* direct keys */
> +    int       direct_key_num;
> +    unsigned int  Âdirect_key_map[MAX_DIRECT_KEY_NUM];
> +
> + Â Â Â /* rotary encoders 0 */
> +    int       enable_rotary0;
> +    int       rotary0_rel_code;
> +    int       rotary0_up_key;
> +    int       rotary0_down_key;
> +
> + Â Â Â /* rotary encoders 1 */
> +    int       enable_rotary1;
> +    int       rotary1_rel_code;
> +    int       rotary1_up_key;
> +    int       rotary1_down_key;
> +
> + Â Â Â /* key debounce interval */
> +    unsigned int  Âdebounce_interval;
> +};
> +
> +extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
> +
> +#endif /* __ASM_ARCH_PXA27x_KEYPAD_H */
> diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
> index 0e53b3b..0610d10 100644
> --- a/drivers/input/keyboard/pxa27x_keypad.c
> +++ b/drivers/input/keyboard/pxa27x_keypad.c
> @@ -32,7 +32,7 @@
> Â#include <asm/mach/map.h>
>
> Â#include <mach/hardware.h>
> -#include <mach/pxa27x_keypad.h>
> +#include <plat/pxa27x_keypad.h>
> Â/*
> Â* Keypad Controller registers
> Â*/
> --
> 1.7.0.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/