Re: [PATCH 1/3] gpio: pca953x: make the register access by GPIO bank

2013-01-07 Thread Maxime Ripard
Hi Gregory, Le 06/01/2013 18:34, Gregory CLEMENT a écrit : > +static int pca953x_write_regs(struct pca953x_chip *chip, int reg, u8 *val) > { > int ret = 0; > > if (chip->gpio_chip.ngpio <= 8) > - ret = i2c_smbus_write_byte_data(chip->client, reg, val); > - else if

Re: [PATCH 1/3] gpio: pca953x: make the register access by GPIO bank

2013-01-07 Thread Maxime Ripard
Hi Gregory, Le 06/01/2013 18:34, Gregory CLEMENT a écrit : +static int pca953x_write_regs(struct pca953x_chip *chip, int reg, u8 *val) { int ret = 0; if (chip-gpio_chip.ngpio = 8) - ret = i2c_smbus_write_byte_data(chip-client, reg, val); - else if

[PATCH 1/3] gpio: pca953x: make the register access by GPIO bank

2013-01-06 Thread Gregory CLEMENT
Until now the pca953x driver accessed all the bank of a given register in a single command using only a 32 bits variable. New expanders from the pca53x family come with 40 GPIOs which no more fit in a 32 variable. This patch make access to the registers more generic by relying on an array of u8

[PATCH 1/3] gpio: pca953x: make the register access by GPIO bank

2013-01-06 Thread Gregory CLEMENT
Until now the pca953x driver accessed all the bank of a given register in a single command using only a 32 bits variable. New expanders from the pca53x family come with 40 GPIOs which no more fit in a 32 variable. This patch make access to the registers more generic by relying on an array of u8