summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-viperboard.c
AgeCommit message (Collapse)Author
2019-08-05gpio: viperboard: Replace 'unsigned' with 'unsigned int'Hennie Muller
Fixes a couple of warnings by checkpatch and sparse. Signed-off-by: Hennie Muller <hm@bitlabs.co.za> Link: https://lore.kernel.org/r/20190721125259.13990-1-hm@bitlabs.co.za Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-09-17gpio: viperboard: Cut down on boilerplateLinus Walleij
Just use the SPDX header for the license. Cc: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-09-17gpio: viperboard: Include the right headerLinus Walleij
This is a GPIO driver so include only <linux/gpio/driver.h>. Cc: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-06-07gpio: remove redundant owner assignments of driversMasahiro Yamada
A platform_driver need not set an owner since it will be populated by platform_driver_register(). Likewise for mcb_driver (gpio-menz127.c). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-02-23gpio: viperboard: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan
Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2016-01-05gpio: viperboard: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-12-26gpio: viperboard: Be sure to clamp return valueLinus Walleij
As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-11-19gpio: change member .dev to .parentLinus Walleij
The name .dev in a struct is normally reserved for a struct device that is let us say a superclass to the thing described by the struct. struct gpio_chip stands out by confusingly using a struct device *dev to point to the parent device (such as a platform_device) that represents the hardware. As we want to give gpio_chip:s real devices, this is not working. We need to rename this member to parent. This was done by two coccinelle scripts, I guess it is possible to combine them into one, but I don't know such stuff. They look like this: @@ struct gpio_chip *var; @@ -var->dev +var->parent and: @@ struct gpio_chip var; @@ -var.dev +var.parent and: @@ struct bgpio_chip *var; @@ -var->gc.dev +var->gc.parent Plus a few instances of bgpio that I couldn't figure out how to teach Coccinelle to rewrite. This patch hits all over the place, but I *strongly* prefer this solution to any piecemal approaches that just exercise patch mechanics all over the place. It mainly hits drivers/gpio and drivers/pinctrl which is my own backyard anyway. Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Rafał Miłecki <zajec5@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Alek Du <alek.du@intel.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-07-22gpio: remove all usage of gpio_remove retval in driver/gpioabdoulaye berthe
Signed-off-by: abdoulaye berthe <berthe.ab@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-04gpio/pinctrl: make gpio_chip members typed booleanLinus Walleij
This switches the two members of struct gpio_chip that were defined as unsigned foo:1 to bool, because that is indeed what they are. Switch all users in the gpio and pinctrl subsystems to assign these values with true/false instead of 0/1. The users outside these subsystems will survive since true/false is 1/0, atleast we set some kind of more strict typing example. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-05-20gpio: Don't override the error code in probe error handlingAxel Lin
Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: Tomoya MORINAGA <tomoya.rohm@gmail.com> Cc: Denis Turischev <denis@compulab.co.il> Cc: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-27gpio: viperboard: Remove duplicate code to set gpio->gpiob_valAxel Lin
Set it once is enough, and it's done in vprbrd_gpiob_set() which is called by vprbrd_gpiob_direction_output(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Lars Poeschel <poeschel@lemonage.de> Acked-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-01-03Drivers: misc: remove __dev* attributes.Greg Kroah-Hartman
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-20gpio: Add viperboard gpio driverLars Poeschel
This adds the mfd cell to use the gpio a and gpio b part of the Nano River Technologies viperboard. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>