aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-pisosr.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-28gpio: pisosr: Simplify with dev_err_probe()Krzysztof Kozlowski1-6/+3
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2019-12-04gpio: pisosr: utilize the for_each_set_clump8 macroWilliam Breathitt Gray1-6/+6
Replace verbose implementation in get_multiple callback with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/8a39ee772247d4b7d752b32dbacc06c1cdcb60b5.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Morten Hein Tiljeset <[email protected]> Cc: Sean Nyekjaer <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Bartosz Golaszewski <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Lukas Wunner <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Mathias Duckeck <[email protected]> Cc: Phil Reid <[email protected]> Cc: Rasmus Villemoes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2019-11-07gpio: Use new GPIO_LINE_DIRECTIONMatti Vaittinen1-1/+1
It's hard for occasional GPIO code reader/writer to know if values 0/1 equal to IN or OUT. Use defined GPIO_LINE_DIRECTION_IN and GPIO_LINE_DIRECTION_OUT to help them out. NOTE - for gpio-amd-fch and gpio-bd9571mwv: This commit also changes the return value for direction get to equal 1 for direction INPUT. Prior this commit these drivers might have returned some other positive value but 1 for INPUT. Signed-off-by: Matti Vaittinen <[email protected]> Acked-by: Scott Branden <[email protected]> Reviewed-by: Grygorii Strashko <[email protected]> Reviewed-by: Michal Simek <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Acked-by: William Breathitt Gray <[email protected]> Acked-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-07-29gpio-pisosr: add support for get_multipleMorten Hein Tiljeset1-0/+22
Signed-off-by: Morten Hein Tiljeset <[email protected]> Reviewed-by: Sean Nyekjaer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-09-13gpio: constify gpio_chip structuresJulia Lawall1-1/+1
These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct gpio_chip e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct gpio_chip i = { ... }; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Joachim Eastwood <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-02-25gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh()Axel Lin1-2/+2
This driver has .can_sleep flag set. So the pisosr_gpio_get() can be called from contexts that can sleep. Thus use the cansleep() variant in pisosr_gpio_refresh(). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-02-25gpio: pisosr: Use devm_gpiod_get_optional for gpio->load_gpioAxel Lin1-7/+4
gpio->load_gpio is optional, so use devm_gpiod_get_optional instead. Signed-off-by: Axel Lin <[email protected]> Acked-by: Andrew F. Davis <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-02-19gpio: pisosr: add missing unlockSudip Mukherjee1-3/+1
If spi_read() fails then we just returned but we missed unlocking the mutex. Signed-off-by: Sudip Mukherjee <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-02-10gpio: Add driver for SPI serializersAndrew F. Davis1-0/+188
Add generic parallel-in/serial-out shift register GPIO driver. This includes SPI compatible devices like SN74165 serial-out shift registers and the SN65HVS88x series of industrial serializers that can be read over the SPI bus and used for GPI (General Purpose Input). Signed-off-by: Andrew F. Davis <[email protected]> Tested-by: Sean Nyekjaer <[email protected]> Signed-off-by: Linus Walleij <[email protected]>