ARM: mx28evk: Simplify GPIO requests for mx28evk_fec_reset
Subsystems (3)
Fabio Estevam
reviewerPATCH v2 1/1 ARM: mx28evk: Simplify GPIO requests for mx28evk_fec_reset
From: Fabio Estevam <[email protected]>
Simplify GPIO requests inside mx28evk_fec_reset by using gpio_request_array.
---
Changes since v1:
- Make mx28evk_fec_gpios const
arch/arm/mach-mxs/mach-mx28evk.c | 29 ++++++++--------------------- 1 files changed, 8 insertions(+), 21 deletions(-)
arch/arm/mach-mxs/mach-mx28evk.c +8 -21
@@ -219,6 +219,11 @@ static const struct gpio_led_platform_data mx28evk_led_data __initconst = { .num_leds = ARRAY_SIZE(mx28evk_leds), }; +static const struct gpio mx28evk_fec_gpios[]__initconst = { + {MX28EVK_FEC_PHY_POWER ,GPIOF_OUT_INIT_LOW ,"fec-power" }, + {MX28EVK_FEC_PHY_RESET ,GPIOF_OUT_INIT_LOW ,"fec-enable" }, +}; +/* fec */ static void __init mx28evk_fec_reset (void ) {
@@ -231,28 +236,10 @@ static void __init mx28evk_fec_reset(void)clk_enable (clk);/* Power up fec phy */ - ret =gpio_request (MX28EVK_FEC_PHY_POWER ,"fec-phy-power" ); -if (ret) { -pr_err ("Failed to request gpio fec-phy-%s: %d\n" ,"power" , ret); -return ; - } - - ret =gpio_direction_output (MX28EVK_FEC_PHY_POWER ,0 ); -if (ret) { -pr_err ("Failed to drive gpio fec-phy-%s: %d\n" ,"power" , ret); -return ; - } - -/* Reset fec phy */ - ret =gpio_request (MX28EVK_FEC_PHY_RESET ,"fec-phy-reset" ); -if (ret) { -pr_err ("Failed to request gpio fec-phy-%s: %d\n" ,"reset" , ret); -return ; - } - -gpio_direction_output (MX28EVK_FEC_PHY_RESET ,0 ); + ret =gpio_request_array (mx28evk_fec_gpios, +ARRAY_SIZE (mx28evk_fec_gpios));if (ret) { -pr_err ("Failed to drive gpio fec-phy-%s: %d\n" ,"reset" , ret); +pr_err ("Failed to request FEC gpios: %d\n" , ret);return ; }
Signature · 1 line
1.7.1
PATCH v2 1/1 ARM: mx28evk: Simplify GPIO requests for mx28evk_fec_reset
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Simplify GPIO requests inside
mx28evk_fec_resetby usinggpio_request_array.Signed-off-by Fabio Estevam <[email protected]>
Like it: Acked-by: Wolfram Sang <[email protected]>
Thanks,
Wolfram
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111109/b4aa0ae2/attachment-0001.sig>
PATCH v2 1/1 ARM: mx28evk: Simplify GPIO requests for mx28evk_fec_reset
Quoted 8 lines · Wolfram Sang
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Simplify GPIO requests inside
mx28evk_fec_resetby usinggpio_request_array.Signed-off-by Fabio Estevam <[email protected]>Like it: Acked-by: Wolfram Sang <[email protected]>
/me to.
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Sascha Hauer
maintainerPATCH v2 1/1 ARM: mx28evk: Simplify GPIO requests for mx28evk_fec_reset
In reply to Wolfram SangQuoted 8 lines · Wolfram Sang
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Simplify GPIO requests inside
mx28evk_fec_resetby usinggpio_request_array.Signed-off-by Fabio Estevam <[email protected]>Like it: Acked-by: Wolfram Sang <[email protected]>
/me not. See my comments to v1.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Fabio Estevam
reviewerPATCH v2 1/1 ARM: mx28evk: Simplify GPIO requests for mx28evk_fec_reset
Quoted 11 lines · Sascha Hauer
Quoted 8 lines · Wolfram Sang
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Simplify GPIO requests inside
mx28evk_fec_resetby usinggpio_request_array.Signed-off-by Fabio Estevam <[email protected]>Like it: Acked-by: Wolfram Sang <[email protected]>
/me not. See my comments to v1.
Ok, I will implement your suggestion in v3.
Will wait Shawn?s patch "arm/mxs: fix mmc device adding for mach-mx28evk" to reach rc2 first.
Regards,
Fabio Estevam