2014-04-23 21:25 GMT+08:00 Linus Walleij <[email protected]>:
> On Fri, Apr 11, 2014 at 8:14 AM, Axel Lin <[email protected]> wrote:
>
>> The valid gpio is GPIO0 ~ GPIO58, so ngpio should be RDC321X_MAX_GPIO + 1.
>>
>> Signed-off-by: Axel Lin <[email protected]>
> (...)
>> -       rdc321x_gpio_dev->chip.ngpio = pdata->max_gpios;
>> +       rdc321x_gpio_dev->chip.ngpio = pdata->max_gpios + 1;
>
> This is counter-intuitive. "max_gpios" should be a name for the
> maximum number of gpios right? Not the maximum number of
> GPIOs minus one!
>
> It is better to patch include/linux/mfd/rdc321x.h:
>
> -#define RDC321X_MAX_GPIO    58
> +#define RDC321X_MAX_GPIO    59
Hi Linus,

I'm wondering if it is better to define RDC321X_NUM_GPIO  (59) rather
than RDC321X_MAX_GPIO.
How do you think?

Regards,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to