Greg Freemyer wrote:
Also, why the return 0 in the below (cut and pasted from above.)
Seems like it should be a void return.
> +static int pc8736x_gpio_current(unsigned index)
> +{
> + printk(KERN_WARNING NAME ": pc8736x_gpio_current
unimplemented\n");
> + return 0;
> +}
An int return is needed there - the function tells you what the
pin-output register
is currently set to. This is different than what voltage is read from
the pin.
Anyway - this impl is a placeholder, it should return 0/1, after
actually reading the pin.
The full impl awaits the shadow-register patch (18/20).
I suppose theres an 'opportunity' to juggle bits of the patchset around to
improve clarity, reduce patch-count. Judgment required..
Forex:
- could do better here than the stub - could (probly - must check)
read the pin w/o worrying about shadowing.
Greg
thanks for joining/partaking,
-jimc
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/