Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-20 Thread Andreas Pretzsch
Am Donnerstag, den 07.07.2011, 12:15 +0200 schrieb Detlev Zundel: Hi Wolfgang, Dear Detlev Zundel, In message m2aacrlsen@ohwell.denx.de you wrote: I'd say clear/set/toggle are changeable, don't see any legit return-value-usage here. For 100% backward compatibility, one could

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-18 Thread Mike Frysinger
On Fri, Jul 15, 2011 at 03:39, Detlev Zundel wrote: On Wednesday, July 06, 2011 06:36:00 Wolfgang Denk wrote: For consistency I would prefer to have all commands return the same type of information, i. e. either an error status (like we do with all other commands - any result values would then

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-15 Thread Detlev Zundel
Hi Mike, On Wednesday, July 06, 2011 06:36:00 Wolfgang Denk wrote: For consistency I would prefer to have all commands return the same type of information, i. e. either an error status (like we do with all other commands - any result values would then have to be passed as environment

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-14 Thread Mike Frysinger
On Wednesday, July 06, 2011 06:36:00 Wolfgang Denk wrote: For consistency I would prefer to have all commands return the same type of information, i. e. either an error status (like we do with all other commands - any result values would then have to be passed as environment settings) going

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-07 Thread Detlev Zundel
Hi Wolfgang, Dear Detlev Zundel, In message m2aacrlsen@ohwell.denx.de you wrote: I'd say clear/set/toggle are changeable, don't see any legit return-value-usage here. For 100% backward compatibility, one could leave them as they are and use 0|1 as new actions with return 0, as

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-06 Thread Detlev Zundel
Hi Andreas, I'd say clear/set/toggle are changeable, don't see any legit return-value-usage here. For 100% backward compatibility, one could leave them as they are and use 0|1 as new actions with return 0, as proposed. So these variants: gpio clear|0 = set to output, write 0, return

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-06 Thread Wolfgang Denk
Dear Detlev Zundel, In message m2aacrlsen@ohwell.denx.de you wrote: I'd say clear/set/toggle are changeable, don't see any legit return-value-usage here. For 100% backward compatibility, one could leave them as they are and use 0|1 as new actions with return 0, as proposed. Hm... I

[U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-05 Thread Andreas Pretzsch
As of today (2011.06), the generic gpio command (common/cmd_gpio.c) gpio input|set|clear|toggle portpin - input/set/clear/toggle the specified pin (e.g. PF10) always returns the value read or set. While this is sensible for read (input) and maybe (questionable) for toggle, I

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-05 Thread Mike Frysinger
On Tuesday, July 05, 2011 12:59:16 Andreas Pretzsch wrote: As of today (2011.06), the generic gpio command (common/cmd_gpio.c) gpio input|set|clear|toggle portpin - input/set/clear/toggle the specified pin (e.g. PF10) always returns the value read or set. While this is

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-05 Thread Andreas Pretzsch
Am Dienstag, den 05.07.2011, 13:44 -0400 schrieb Mike Frysinger: On Tuesday, July 05, 2011 12:59:16 Andreas Pretzsch wrote: As of today (2011.06), the generic gpio command (common/cmd_gpio.c) gpio input|set|clear|toggle portpin - input/set/clear/toggle the specified pin (e.g.

Re: [U-Boot] [RFC] gpio command: return value on write, additional actions

2011-07-05 Thread Mike Frysinger
On Tuesday, July 05, 2011 15:15:15 Andreas Pretzsch wrote: Am Dienstag, den 05.07.2011, 13:44 -0400 schrieb Mike Frysinger: unintentional side effects like gpio value. then we could change all the others to return 0/1 based on whether they succeeded, not based on the level of the gpio pin.