lkml.org 
[lkml]   [2014]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/6] pinctrl: Device tree bindings for Qualcomm pm8xxx gpio block
From
Date
@Ivan: sorry about the double post.

Am 11.08.2014 um 16:40 schrieb Ivan T. Ivanov <iivanov@mm-sol.com>:
> diff --git a/include/dt-bindings/pinctrl/qcom,pmic-gpio.h b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h
> new file mode 100644
> index 0000000..994e748
> --- /dev/null
> +++ b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h
> @@ -0,0 +1,107 @@
> +/*
> + * This header provides constants for the Qualcomm PMIC gpio binding.
> + */
> +
> +#ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H
> +#define _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H
> +
> +#define PMIC_GPIO_PULL_UP_30 1
> +#define PMIC_GPIO_PULL_UP_1P5 2
> +#define PMIC_GPIO_PULL_UP_31P5 3
> +#define PMIC_GPIO_PULL_UP_1P5_30 4

Looking at drivers/pinctrl/qcom/pinctrl-ssbi-pmic.c, shouldn't these defines start at 0?
e.g. #define PMIC_GPIO_PULL_UP_30 0

after shifting those 4 defines by -1, /sys/kernel/debug/gpio gives me the proper values for the pins configured to be pull-up:

cat /sys/kernel/debug/gpio
GPIOs 212-255, platform/500000.qcom,ssbi:pmic@0:gpio@150, 500000.qcom,ssbi:pmic@0:gpio@150:
...
gpio4 : in normal VIN2 pull-up 30uA push-pull low no inverted
...
gpio38: in normal VIN2 pull-up 30uA push-pull low no inverted
...
____
dts:
[snip]
pm8921_gpio_keys: gpio-keys {
volume-keys {
pins = "gpio4", "gpio38";
function = PMIC_GPIO_FUNC_NORMAL;

input-enable;
drive-push-pull;
qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
power-source = <PM8921_GPIO_S4>;
};
};
[/snip]

However, I still cannot get any data from those 2 pins if I export them through /sys/class/gpio...

Device: Nexus 7 2013 WiFi
Board: APQ8064

Cheers,
D

\
 
 \ /
  Last update: 2014-08-16 18:41    [W:0.115 / U:10.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site