
3 Jun
2011
3 Jun
'11
6:55 a.m.
On Thursday, June 02, 2011 17:55:55 Tom Warren wrote:
Actually, if you do a kompare between cmd_gpio.c and tegra2_gpio.c, there's virtually no 'duplicated' code, just 2 different implementations of do_gpio, with different args and parsing of params, etc. I use info, port, input and output, and cmd_gpio uses input, set, clear and toggle.
you're duplicating functionality. if the common cmd_gpio.c lacks features that yours adds, then send a patch to extend cmd_gpio.c. the fact that yours takes different arguments to do the same thing is irrelevant. change your scripts and/or muscle memory to the common cmd_gpio.c.
Note that the PCA953x GPIO driver also does it's own cmd parsing in do_pca953x().
then someone should clean it up -mike