summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib-devprop.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-08gpiolib: devprop: Fix syntax errorLinus Walleij1-2/+2
EXPORT_SYMBOL_GPL() needs a semicolon at the end, also explicitly include <linux/export.h> as well. Fixes: 64ebde5b0fdb ("gpiolib: export devprop_gpiochip_set_names()") Acked-by: Jan Kundrát <jan.kundrat@cesnet.cz> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-03-24gpiolib: export devprop_gpiochip_set_names()Jan Kundrát1-0/+2
This function is needed in mcp23s08. That driver is a special snowflake because it supports several hardware chips as a single "GPIO chip" under Linux. Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Phil Reid <preid@electromag.com.au> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-10-01Accept partial 'gpio-line-names' property.Christophe Blaess1-12/+9
Documentation/devicetree/bindings/gpio/gpio.txt says: "The names are assigned starting from line offset 0 from left to right from the passed array. An incomplete array (where the number of passed named are less than ngpios) will still be used up until the last provided valid line index". This patch makes it actually work this way. Signed-off-by: Christophe Blaess <christophe.blaess@logilin.fr> Signed-off-by: Patrick Boettcher <p@yai.se> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-09-25gpio: Use SPDX header for core libraryLinus Walleij1-4/+1
Use the SPDX headers and cut down on boilerplate to indicate the license in the core gpiolib implementation. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-12-22gpio: fix "gpio-line-names" property retrievalChristophe Leroy1-10/+7
Following commit 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names() to use device property accessors"), "gpio-line-names" DT property is not retrieved anymore when chip->parent is not set by the driver. This is due to OF based property reads having been replaced by device based property reads. This patch fixes that by making use of fwnode_property_read_string_array() instead of device_property_read_string_array() and handing over either of_fwnode_handle(chip->of_node) or dev_fwnode(chip->parent) to that function. Fixes: 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names() to use device property accessors") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-10-25gpio: gpiolib-devprop: Check chip->parent pointer before dereferencingThor Thayer1-0/+5
Confirm the chip->parent is valid before dereferencing because the parent parameter is optional. Signed-off-by: Thor Thayer <tthayer@opensource.altera.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-10-24gpio: Rework of_gpiochip_set_names() to use device property accessorsMika Westerberg1-0/+62
In order to use "gpio-line-names" property in systems not having DT as their boot firmware, rework of_gpiochip_set_names() to use device property accessors. This reworked function is placed in a separate file making it clear it deals with universal device properties. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>