Add platform driver on top of the new
Review
Quoted 3 lines
(quoted diff) +3
-0+#ifdef CONFIG_GENERIC_GPIO +#include <asm/gpio.h> +#endif
You should #include <linux/gpio.h> now and avoid a lot of this #ifdeffery ... which is something I think you'd be told by running checkpatch.pl on 2.6.25-rc5, as well as most RC4 kernels.
Review
Quoted 1 line
(quoted diff) +1
-0+ /* Use NO_GPIO when this macro is in mainline */
I hope you mean gpio_is_valid() instead... that's in MM, but not yet mainline (except when <linux/gpio.h> is all stubs).
- Dave
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): 200803101002.52153.david-b-yBeKhBN/[email protected]
Quoted 4 lines · David Brownell
You should #include <
linux/gpio.h> now and avoid a lot of this #ifdeffery ... which is something I think you'd be told by running checkpatch.pl on 2.6.25-rc5, as well as most RC4 kernels.
Last time I changed my #includes from asm/foo.h to linux/foo.h, it was also wrong :) But now I researched that for irq.h checkpatch.pl had a bug (patch sent), for io.h it is unknown and uncommon to replace it (still recommended according to lkml) and for gpio.h it is probably the right thing to do.
Still, using <linux/gpio.h> does not really avoid the #ifdefs if the priority is to produce less code in the driver. It does avoid them if the priority is simply to remove them (for the price of having an integer and two small blocks of code as unused overhead). May I assume that it getting rid of #ifdefs has priority?
Quoted 4 lines
Review
Quoted 1 line
(quoted diff) +1
-0+ /* Use NO_GPIO when this macro is in mainline */I hope you mean
gpio_is_valid()instead... that's in MM, but not yet mainline (except when <linux/gpio.h> is all stubs).
Will change the comment.
I also realized that I should register/deregister the gpio-pin in the driver; used to have this in the boardsetup, sigh. Will send an updated version later today.
All the best,
Wolfram
Signature · 2 lines
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c