On Fri, Apr 11, 2014 at 8:14 AM, Axel Lin <axel.lin@xxxxxxxxxx> wrote: > The valid gpio is GPIO0 ~ GPIO58, so ngpio should be RDC321X_MAX_GPIO + 1. > > Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx> (...) > - 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 Which establishes the true character of this device. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html