ARM: mxs/mach-mx28evk: Set the initial value on gpio_request_one
Subsystems (3)
PATCH 1/2 ARM: mxs/mach-mx28evk: Set the initial value on gpio_request_one
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.
---
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(-)
arch/arm/mach-mxs/mach-mx28evk.c +2 -2
@@ -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);
Signature · 1 line
1.6.0.4
PATCH 2/2 ARM: mxs/mach-mx23evk: Set the initial value on gpio_request_one
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.
---
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(-)
arch/arm/mach-mxs/mach-mx23evk.c +1 -1
@@ -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);
Signature · 1 line
1.6.0.4
PATCH 2/2 ARM: mxs/mach-mx23evk: Set the initial value on gpio_request_one
Quoted 5 lines · Fabio Estevam
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 <[email protected]>
If you ask me squash this into patch 1. You can add my Ack independently of that though.
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/2 ARM: mxs/mach-mx28evk: Set the initial value on gpio_request_one
In reply to Fabio EstevamQuoted 18 lines · Fabio Estevam
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 <[email protected]>---
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(-)arch/arm/mach-mxs/mach-mx28evk.c +0
-0
arch/arm/mach-mxs/mach-mx28evk.c static void __init mx28evk_init(void) · line 378
Quoted 5 lines
arch/arm/mach-mxs/mach-mx28evk.c +1
-1@@ -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.
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |