Re: [PATCH v3 1/6] pinctrl: Device tree bindings for Qualcomm pm8xxx gpio block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




@Ivan: sorry about the double post.

Am 11.08.2014 um 16:40 schrieb Ivan T. Ivanov <iivanov@xxxxxxxxxx>:
> 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--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux