mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
gpiolib: Pass array info to get/set array functions
In order to make use of array info obtained from gpiod_get_array() and speed up processing of arrays matching single GPIO chip layout, that information must be passed to get/set array functions. Extend the functions' API with that additional parameter and update all users. Pass NULL if a user builds an array itself from single GPIOs. Cc: Jonathan Corbet <[email protected]> Cc: Miguel Ojeda Sandonis <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Sebastien Bourdelin <[email protected]> Cc: Lukas Wunner <[email protected]> Cc: Peter Korsgaard <[email protected]> Cc: Peter Rosin <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Rojhalat Ibrahim <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: Russell King <[email protected]> Cc: Kishon Vijay Abraham I <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Cc: Michael Hennerich <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Hartmut Knaack <[email protected]> Cc: Peter Meerwald-Stadler <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Yegor Yefremov <[email protected]> Cc: Uwe Kleine-König <[email protected]> Signed-off-by: Janusz Krzysztofik <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
bf9346f5d4
commit
77588c14ac
15 changed files with 86 additions and 26 deletions
|
|
@ -70,7 +70,7 @@ static void hd44780_write_gpio8(struct hd44780 *hd, u8 val, unsigned int rs)
|
|||
n = hd->pins[PIN_CTRL_RW] ? 10 : 9;
|
||||
|
||||
/* Present the data to the port */
|
||||
gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA0], values);
|
||||
gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA0], NULL, values);
|
||||
|
||||
hd44780_strobe_gpio(hd);
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ static void hd44780_write_gpio4(struct hd44780 *hd, u8 val, unsigned int rs)
|
|||
n = hd->pins[PIN_CTRL_RW] ? 6 : 5;
|
||||
|
||||
/* Present the data to the port */
|
||||
gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], values);
|
||||
gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], NULL, values);
|
||||
|
||||
hd44780_strobe_gpio(hd);
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ static void hd44780_write_gpio4(struct hd44780 *hd, u8 val, unsigned int rs)
|
|||
values[0] |= val & 0x0f;
|
||||
|
||||
/* Present the data to the port */
|
||||
gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], values);
|
||||
gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], NULL, values);
|
||||
|
||||
hd44780_strobe_gpio(hd);
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ static void hd44780_write_cmd_raw_gpio4(struct charlcd *lcd, int cmd)
|
|||
n = hd->pins[PIN_CTRL_RW] ? 6 : 5;
|
||||
|
||||
/* Present the data to the port */
|
||||
gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], values);
|
||||
gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], NULL, values);
|
||||
|
||||
hd44780_strobe_gpio(hd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue