* [PATCH 1/2] ARM: mxs/mach-mx28evk: Set the initial value on gpio_request_one
@ 2011-03-29 19:45 Fabio Estevam
2011-03-29 19:45 ` [PATCH 2/2] ARM: mxs/mach-mx23evk: " Fabio Estevam
2011-03-29 19:51 ` [PATCH 1/2] ARM: mxs/mach-mx28evk: " Uwe Kleine-König
0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2011-03-29 19:45 UTC (permalink / raw)
To: linux-arm-kernel
Current code does not set the GPIO value to zero as mentioned in the comment.
Fix it by setting the initial GPIO value to zero.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Shawn,
I do not have the hardware to test it, but I fixed it based on the comment.
arch/arm/mach-mxs/mach-mx28evk.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index bb329b9..eacdc6b 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -375,13 +375,13 @@ static void __init mx28evk_init(void)
mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
/* power on mmc slot by writing 0 to the gpio */
- ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_DIR_OUT,
+ ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
"mmc0-slot-power");
if (ret)
pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);
- ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_DIR_OUT,
+ ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW,
"mmc1-slot-power");
if (ret)
pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM: mxs/mach-mx23evk: Set the initial value on gpio_request_one
2011-03-29 19:45 [PATCH 1/2] ARM: mxs/mach-mx28evk: Set the initial value on gpio_request_one Fabio Estevam
@ 2011-03-29 19:45 ` Fabio Estevam
2011-03-29 19:52 ` Uwe Kleine-König
2011-03-29 19:51 ` [PATCH 1/2] ARM: mxs/mach-mx28evk: " Uwe Kleine-König
1 sibling, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2011-03-29 19:45 UTC (permalink / raw)
To: linux-arm-kernel
Current code does not set the GPIO value to zero as mentioned in the comment.
Fix it by setting the initial GPIO value to zero.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Shawn,
I do not have the hardware to test it, but I fixed it based on the comment.
arch/arm/mach-mxs/mach-mx23evk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c
index 214e5b6..3c2de33 100644
--- a/arch/arm/mach-mxs/mach-mx23evk.c
+++ b/arch/arm/mach-mxs/mach-mx23evk.c
@@ -148,7 +148,7 @@ static void __init mx23evk_init(void)
mx23_add_auart0();
/* power on mmc slot by writing 0 to the gpio */
- ret = gpio_request_one(MX23EVK_MMC0_SLOT_POWER, GPIOF_DIR_OUT,
+ ret = gpio_request_one(MX23EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
"mmc0-slot-power");
if (ret)
pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/2] ARM: mxs/mach-mx28evk: Set the initial value on gpio_request_one
2011-03-29 19:45 [PATCH 1/2] ARM: mxs/mach-mx28evk: Set the initial value on gpio_request_one Fabio Estevam
2011-03-29 19:45 ` [PATCH 2/2] ARM: mxs/mach-mx23evk: " Fabio Estevam
@ 2011-03-29 19:51 ` Uwe Kleine-König
1 sibling, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2011-03-29 19:51 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 29, 2011 at 04:45:09PM -0300, Fabio Estevam wrote:
> Current code does not set the GPIO value to zero as mentioned in the comment.
>
> Fix it by setting the initial GPIO value to zero.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Shawn,
>
> I do not have the hardware to test it, but I fixed it based on the comment.
>
> arch/arm/mach-mxs/mach-mx28evk.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
> index bb329b9..eacdc6b 100644
> --- a/arch/arm/mach-mxs/mach-mx28evk.c
> +++ b/arch/arm/mach-mxs/mach-mx28evk.c
> @@ -375,13 +375,13 @@ static void __init mx28evk_init(void)
> mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
>
> /* power on mmc slot by writing 0 to the gpio */
> - ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_DIR_OUT,
> + ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
include/asm-generic/gpio.h has the following defines:
#define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
#define GPIOF_DIR_OUT (0 << 0)
#define GPIOF_INIT_LOW (0 << 1)
so your patch is a noop for the compiler, but the new version makes the
behaviour more explicit.
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM: mxs/mach-mx23evk: Set the initial value on gpio_request_one
2011-03-29 19:45 ` [PATCH 2/2] ARM: mxs/mach-mx23evk: " Fabio Estevam
@ 2011-03-29 19:52 ` Uwe Kleine-König
0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2011-03-29 19:52 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 29, 2011 at 04:45:10PM -0300, Fabio Estevam wrote:
> Current code does not set the GPIO value to zero as mentioned in the comment.
>
> Fix it by setting the initial GPIO value to zero.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
If you ask me squash this into patch 1. You can add my Ack independently
of that though.
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-29 19:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 19:45 [PATCH 1/2] ARM: mxs/mach-mx28evk: Set the initial value on gpio_request_one Fabio Estevam
2011-03-29 19:45 ` [PATCH 2/2] ARM: mxs/mach-mx23evk: " Fabio Estevam
2011-03-29 19:52 ` Uwe Kleine-König
2011-03-29 19:51 ` [PATCH 1/2] ARM: mxs/mach-mx28evk: " Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).