pinctrl&gpio: add new interface to set pull-down/up
authorxingyu.chen <xingyu.chen@amlogic.com>
Wed, 7 Jun 2017 08:02:31 +0000 (16:02 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Sat, 10 Jun 2017 03:16:29 +0000 (20:16 -0700)
commitd39d45ead6cda4bb4eec38c39e58965a87678464
treebd32aa3fa6dc5ccf84694d3c2f2e0326042808dd
parentb462fea81d53d2dfe2919a3e92181812426853ce
pinctrl&gpio: add new interface to set pull-down/up

PD#142470: pinctrl&gpio: add new interface to set pull-down/up

1. add property file 'pull' in directory /sys/class/gpio/gpioX/
pull-up:      echo up > pull
pull-down:    echo down > pull
pull-disable: echo disable > pull

2. add new functions, as follows:
+ gpiod_set_pull(struct gpio_desc *desc, int value)
+ gpiod_set_pull_cansleep(struct gpio_desc *desc, int value)

'value' can be set:
GPIOD_PULL_DIS
GPIOD_PULL_DOWN
GPIOD_PULL_UP

Change-Id: Iba750729288651a897ebac827093ebc6c143f16b
Signed-off-by: xingyu.chen <xingyu.chen@amlogic.com>
drivers/amlogic/pinctrl/pinctrl-meson.c
drivers/gpio/gpiolib-sysfs.c
drivers/gpio/gpiolib.c
include/linux/gpio/consumer.h
include/linux/gpio/driver.h