[PATCH] ARM: mx28evk: Simplify GPIO requests for mx28evk_fec_reset

Sascha Hauer s.hauer at pengutronix.de
Thu Nov 10 03:47:06 EST 2011


On Thu, Nov 10, 2011 at 08:11:10AM +0000, Dong Aisheng-B29396 wrote:
> > 
> > I think it makes more sense to create an array per board and not per
> > board function. In the mx28evk file we use gpios for the fec, we have a
> > gpio_request_one for the flexcan switch and a gpio_request_array for the
> > lcd pins. All these could be added to a single mx28evk_gpios array.
> > Then it would be easy to see which gpios a board uses and it would be
> > trivial to add additional gpios. The same applies for other boards aswell
> > of course.
> > 
> One question is that if one gpio, assume in one function like fec, request fail
> will cause the whole gpio array request fail.

They don't fail. If they do it means we have a duplicate entry in the
table or otherwise screwed up the kernel. I think a single pr_err("bad
things may happen, continue and hope for the best") is enough here.

Sascha

-- 
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 |



More information about the linux-arm-kernel mailing list