aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-xra1403.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-20gpio: xra1403: Make use of for_each_requested_gpio()Andy Shevchenko1-6/+2
Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Nandor Han <[email protected]> Cc: Semi Malinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2019-11-07gpio: Use new GPIO_LINE_DIRECTIONMatti Vaittinen1-1/+4
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]>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201Thomas Gleixner1-12/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 228 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Steve Winslow <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-04-27gpio: xra1403: Switch to a fixed upper bound for registersLaura Abbott1-10/+5
Geert Uytterhoeven pointed out that the number of register was a fixed upper bound so there's no need to use a dynamically allocated array in place of a VLA. Use the defined upper bound. Suggested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Laura Abbott <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2018-03-27gpio: Remove VLA from xra1403 driverLaura Abbott1-1/+7
The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) This patch replaces a VLA with an appropriate call to kmalloc_array. Signed-off-by: Laura Abbott <[email protected]> Reviewed-by: Nandor Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2017-05-22gpio: xra1403: Add EXAR XRA1403 SPI GPIO expander driverNandor Han1-0/+237
This driver support basic XRA1403 functionalities: - set gpio direction - get gpio direction - set gpio high/low - get gpio status Signed-off-by: Nandor Han <[email protected]> Signed-off-by: Semi Malinen <[email protected]> Signed-off-by: Linus Walleij <[email protected]>