[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <ED4952FE-A292-4724-9283-B5226AB20E3E@me.com>
Date: Sat, 16 Aug 2014 16:24:06 +0100
From: Daniel <delta.tatham@...com>
To: "Ivan T. Ivanov" <iivanov@...sol.com>
Cc: Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Bjorn Andersson <bjorn.andersson@...ymobile.com>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/6] pinctrl: Device tree bindings for Qualcomm pm8xxx
gpio block
@Ivan: sorry about the double post.
Am 11.08.2014 um 16:40 schrieb Ivan T. Ivanov <iivanov@...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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists