From: Amit Kucheria <amit.kucheria@canonical.com>
To: Dinh.Nguyen@freescale.com
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk,
s.hauer@pengutronix.de, u.kleine-koenig@pengutronix.de,
valentin.longchamp@epfl.ch, daniel@caiaq.de,
grant.likely@secretlab.ca, bryan.wu@canonical.com
Subject: Re: [PATCHv5 1/3] ARM: mx5: Add gpio-keys to mx51 babbage board
Date: Fri, 22 Oct 2010 20:51:55 +0300 [thread overview]
Message-ID: <20101022175155.GH17631@matterhorn.lan> (raw)
In-Reply-To: <1287766575-4092-1-git-send-email-Dinh.Nguyen@freescale.com>
In the interest of bisectability, Patch 1 and 2 should've been reversed since
imx51_add_gpio_keys() is only defined in patch 2.
On 10 Oct 22, Dinh.Nguyen@freescale.com wrote:
> From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
>
> Add functionality for the power button on MX51 Babbage board.
>
> This patch is based on Sascha Hauer's imx/linux-2.6 for-rmk tree.
>
> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> ---
> arch/arm/configs/mx51_defconfig | 1 +
> arch/arm/mach-mx5/board-mx51_babbage.c | 22 ++++++++++++++++++++++
> arch/arm/mach-mx5/devices-imx51.h | 2 ++
> 3 files changed, 25 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/configs/mx51_defconfig b/arch/arm/configs/mx51_defconfig
> index 163cfee..5c7a872 100644
> --- a/arch/arm/configs/mx51_defconfig
> +++ b/arch/arm/configs/mx51_defconfig
> @@ -82,6 +82,7 @@ CONFIG_FEC=y
> CONFIG_INPUT_FF_MEMLESS=m
> # CONFIG_INPUT_MOUSEDEV_PSAUX is not set
> CONFIG_INPUT_EVDEV=y
> +CONFIG_KEYBOARD_GPIO=y
> CONFIG_INPUT_EVBUG=m
> CONFIG_MOUSE_PS2=m
> CONFIG_MOUSE_PS2_ELANTECH=y
> diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
> index 23ee4a4..8458852 100644
> --- a/arch/arm/mach-mx5/board-mx51_babbage.c
> +++ b/arch/arm/mach-mx5/board-mx51_babbage.c
> @@ -18,6 +18,8 @@
> #include <linux/io.h>
> #include <linux/fsl_devices.h>
> #include <linux/fec.h>
> +#include <linux/gpio_keys.h>
> +#include <linux/input.h>
>
> #include <mach/common.h>
> #include <mach/hardware.h>
> @@ -37,6 +39,7 @@
> #define BABBAGE_USBH1_STP (0*32 + 27) /* GPIO_1_27 */
> #define BABBAGE_PHY_RESET (1*32 + 5) /* GPIO_2_5 */
> #define BABBAGE_FEC_PHY_RESET (1*32 + 14) /* GPIO_2_14 */
> +#define BABBAGE_POWER_KEY (1*32 + 21) /* GPIO_2_21 */
>
> /* USB_CTRL_1 */
> #define MX51_USB_CTRL_1_OFFSET 0x10
> @@ -46,6 +49,21 @@
> #define MX51_USB_PLL_DIV_19_2_MHZ 0x01
> #define MX51_USB_PLL_DIV_24_MHZ 0x02
>
> +static struct gpio_keys_button babbage_buttons[] = {
> + {
> + .gpio = BABBAGE_POWER_KEY,
> + .code = BTN_0,
> + .desc = "PWR",
> + .active_low = 1,
> + .wakeup = 1,
> + },
> +};
> +
> +static const struct gpio_keys_platform_data imx_button_data __initconst = {
> + .buttons = babbage_buttons,
> + .nbuttons = ARRAY_SIZE(babbage_buttons),
> +};
> +
> static struct pad_desc mx51babbage_pads[] = {
> /* UART1 */
> MX51_PAD_UART1_RXD__UART1_RXD,
> @@ -112,6 +130,9 @@ static struct pad_desc mx51babbage_pads[] = {
>
> /* FEC PHY reset line */
> MX51_PAD_EIM_A20__GPIO_2_14,
> +
> + /* Power Key */
> + MX51_PAD_EIM_A27__GPIO_2_21,
> };
>
> /* Serial ports */
> @@ -287,6 +308,7 @@ static void __init mxc_board_init(void)
> mxc_init_imx_uart();
> babbage_fec_reset();
> imx51_add_fec(NULL);
> + imx51_add_gpio_keys(&imx_button_data);
>
> imx51_add_imx_i2c(0, &babbage_i2c_data);
> imx51_add_imx_i2c(1, &babbage_i2c_data);
> diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
> index 5cc910e..8c50cb5 100644
> --- a/arch/arm/mach-mx5/devices-imx51.h
> +++ b/arch/arm/mach-mx5/devices-imx51.h
> @@ -13,6 +13,8 @@ extern const struct imx_fec_data imx51_fec_data __initconst;
> #define imx51_add_fec(pdata) \
> imx_add_fec(&imx51_fec_data, pdata)
>
> +#define imx51_add_gpio_keys(pdata) imx_add_gpio_keys(pdata)
> +
> extern const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst;
> #define imx51_add_imx_i2c(id, pdata) \
> imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata)
> --
> 1.6.0.4
>
>
--
----------------------------------------------------------------------
Amit Kucheria, Kernel Engineer || amit.kucheria@canonical.com
----------------------------------------------------------------------
prev parent reply other threads:[~2010-10-22 17:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 16:56 Dinh.Nguyen
2010-10-22 16:56 ` [PATCHv5 2/3] ARM: imx: Add gpio-keys to plat-mxc Dinh.Nguyen
2010-10-22 16:56 ` [PATCHv5 3/3] ARM: imx: Add wake functionality to GPIO Dinh.Nguyen
2010-10-22 18:28 ` [PATCHv5 2/3] ARM: imx: Add gpio-keys to plat-mxc Uwe Kleine-König
2010-10-22 18:58 ` Nguyen Dinh-R00091
2010-10-22 19:42 ` Uwe Kleine-König
2010-10-23 2:43 ` Nguyen Dinh-R00091
2010-10-24 8:37 ` Lothar Waßmann
2010-10-24 19:20 ` Uwe Kleine-König
2010-10-25 7:02 ` Lothar Waßmann
2010-10-25 7:21 ` Uwe Kleine-König
2010-10-22 17:51 ` Amit Kucheria [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101022175155.GH17631@matterhorn.lan \
--to=amit.kucheria@canonical.com \
--cc=Dinh.Nguyen@freescale.com \
--cc=bryan.wu@canonical.com \
--cc=daniel@caiaq.de \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=s.hauer@pengutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
--cc=valentin.longchamp@epfl.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome