Dear "Moffett, Kyle D", In message <d99ca72a-bd3e-475d-b17f-1253410c6...@boeing.com> you wrote: > > >> +static inline int gpio_direction_input(unsigned gpio) > >> +{ > >> + mpc85xx_gpio_set_in(1U << gpio); > >> + return 0; > >> +} > > > > Why is this function not void when it cannot return any usefult return > > code anyway? > > > >> +static inline int gpio_direction_output(unsigned gpio, int value) > >> +{ > >> + mpc85xx_gpio_set_low(1U << gpio); > >> + return 0; > >> +} > > > > Ditto. > > This is the "Linux-compatible" gpio layer that Peter Tyser was asking > for. I sort-of-copied most of these functions from > arch/nios2/include/asm/gpio.h, which just does the "return 0;" in > several functions. > Those 2 later functions are expected to be able to return an error (for > I2C chips and such). As I said above, if these wrappers are > unacceptable then I will just delete them; the only thing I use are the > mpc85xx_gpio_*() functions.
It's not unacceptable, but maybe you add a comment to explain why these return int. > --Apple-Mail-2-42328377 > Content-Disposition: attachment; filename"smime.p7s" > Content-Type: application/pkcs7-signature; name"smime.p7s" > Content-Transfer-Encoding: base64 Do you really have to append a 120 line binary encoded signature here? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de I read part of it all the way through. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot