]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: Support for unified device properties interface
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 21 Oct 2014 11:33:59 +0000 (13:33 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 4 Nov 2014 20:58:23 +0000 (21:58 +0100)
commit3b9e80ef6c828c8c47d55265c5f615278e922be5
tree4f8e3c4227be32777fc1d1feed621a228804d8b2
parenta3bf8e0b874478eb7251db5585fd0fea00d911b5
gpio: Support for unified device properties interface

Some drivers need to deal with only firmware representation of its
GPIOs. An example would be a GPIO button array driver where each button
is described as a separate firmware node in device tree. Typically these
child nodes do not have physical representation in the Linux device
model.

In order to help device drivers to handle such firmware child nodes we
add dev[m]_get_named_gpiod_from_child() that takes a child firmware
node pointer as its second argument (the first one is the parent device
itself), finds the GPIO using whatever is the underlying firmware
method, and requests the GPIO properly.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/gpio/devres.c
drivers/gpio/gpiolib.c
include/linux/gpio/consumer.h