aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-palmas.c
AgeCommit message (Collapse)AuthorFilesLines
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-05-24gpio: palmas: Include the right headerLinus Walleij1-1/+1
This is a GPIO driver, include only <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <[email protected]>
2018-05-16gpio: palmas: Use of_device_get_match_data()Thierry Reding1-5/+1
Use of_device_get_match_data() instead of open-coding it. Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-09-15gpio: palmas: fix implicit assumption module.h is presentPaul Gortmaker1-1/+0
This file is currently getting module.h from a global gpio header and it will fail to build once we remove module.h from that. However, the driver is controlled with the following Kconfig: drivers/gpio/Kconfig:config GPIO_PALMAS drivers/gpio/Kconfig: bool "TI PALMAS series PMICs GPIO" and hence the line of MODULE_DEVICE_TABLE is a no-op that can simply be deleted. In fact it should have been removed in an earlier commit that did demodularization, however the unseen include prevented my build testing from detecting it. Cc: Linus Walleij <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-06-07gpio: remove redundant owner assignments of driversMasahiro Yamada1-1/+0
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 <[email protected]> Acked-by: Charles Keepax <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-04-05gpio: palmas: make explicitly non-modularPaul Gortmaker1-12/+1
The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_PALMAS drivers/gpio/Kconfig: bool "TI PALMAS series PMICs GPIO" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: Laxman Dewangan <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-02-23gpio: palmas: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan1-10/+2
Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <[email protected]>
2016-01-05gpio: palmas: use gpiochip data pointerLinus Walleij1-11/+6
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: Andrew Chew <[email protected]> Cc: Stephen Warren <[email protected]> Acked-by: Laxman Dewangan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2015-12-21Merge tag 'v4.4-rc6' into develLinus Walleij1-0/+2
Linux 4.4-rc6
2015-11-19gpio: change member .dev to .parentLinus Walleij1-6/+8
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 <[email protected]> Cc: Rafał Miłecki <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Alek Du <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Lee Jones <[email protected]> Acked-by: Jiri Kosina <[email protected]> Acked-by: Hans-Christian Egtvedt <[email protected]> Acked-by: Jacek Anaszewski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2015-11-17gpio: palmas: fix a possible NULL dereferenceLABBE Corentin1-0/+2
of_match_device could return NULL, and so cause a NULL pointer dereference later. Reported-by: coverity (CID 1130700) Signed-off-by: LABBE Corentin <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-07-22gpio: remove all usage of gpio_remove retval in driver/gpioabdoulaye berthe1-1/+2
Signed-off-by: abdoulaye berthe <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-05-09gpio: palmas: Make of_device_id array constJingoo Han1-1/+1
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-05-09gpio: palmas: remove unnecessary OOM messagesJingoo Han1-3/+1
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-12-04gpio/pinctrl: make gpio_chip members typed booleanLinus Walleij1-1/+1
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 <[email protected]>
2013-09-19gpio: palmas: add support for TPS80036Laxman Dewangan1-35/+69
TI Palmas series device TPS80036 supports 16 GPIOs. Register its all 16 gpios when this device is selected. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio: palmas: Fix misreported GPIO out valueAndrew Chew1-2/+15
It seems that the value read back from the PALMAS_GPIO_DATA_IN register isn't valid if the GPIO direction is out. When that's the case, we can read back the PALMAS_GPIO_DATA_OUT register to get the proper output value. Signed-off-by: Andrew Chew <[email protected]> Acked-by: Laxman Dewangan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-07-29gpio: palmas: add dt supportLaxman Dewangan1-1/+11
Add of_device_id table for Palma GPIO to be enable the driver from DT file. The driver can be registered from DT file as: palmas: tps65913@58 { ::::::::::: palmas_gpio: palmas_gpio { compatible = "ti,palmas-gpio"; gpio-controller; #gpio-cells = <2>; }; }; Signed-off-by: Laxman Dewangan <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-02-14gpio: palmas: Add support for Palmas GPIOLaxman Dewangan1-0/+184
Add gpio driver for TI Palmas series PMIC. This has 8 gpio which can work as input/output. Signed-off-by: Laxman Dewangan <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>