linux_dsm_epyc7002/drivers/pinctrl/qcom
Douglas Anderson 1cf86bc212 pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant
If you do this on an sdm845 board:
  grep "" /sys/kernel/debug/pinctrl/*spmi:pmic*/pinconf-groups

...it looks like nonsense.  For every pin you see listed:
  input bias disabled, input bias high impedance, input bias pull down, input bias pull up, ...

That's because pmic_gpio_config_get() isn't complying with the rules
that pinconf_generic_dump_one() expects.  Specifically for boolean
parameters (anything with a "struct pin_config_item" where has_arg is
false) the function expects that the function should return its value
not through the "config" parameter but should return "0" if the value
is set and "-EINVAL" if the value isn't set.

Let's fix this.

From a quick sample of other pinctrl drivers, it appears to be
tradition to also return 1 through the config parameter for these
boolean parameters when they exist.  I'm not one to knock tradition,
so I'll follow tradition and return 1 in these cases.  While I'm at
it, I'll also continue searching for four leaf clovers, kocking on
wood three times, and trying not to break mirrors.

NOTE: This also fixes an apparent typo for reading
PIN_CONFIG_BIAS_DISABLE where the old driver was accidentally
using "=" instead of "==" and thus was setting some internal
state when you tried to query PIN_CONFIG_BIAS_DISABLE.  Oops.

Fixes: eadff30244 ("pinctrl: Qualcomm SPMI PMIC GPIO pin controller driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-07-09 13:16:01 +02:00
..
Kconfig
Makefile
pinctrl-apq8064.c
pinctrl-apq8084.c
pinctrl-ipq4019.c
pinctrl-ipq8064.c
pinctrl-ipq8074.c
pinctrl-mdm9615.c
pinctrl-msm8x74.c
pinctrl-msm8660.c
pinctrl-msm8916.c
pinctrl-msm8960.c
pinctrl-msm8994.c
pinctrl-msm8996.c
pinctrl-msm8998.c
pinctrl-msm.c pinctrl: msm: Fix msm_config_group_get() to be compliant 2018-07-09 13:14:09 +02:00
pinctrl-msm.h
pinctrl-qdf2xxx.c pinctrl: qcom: qdf2xxx: add support for new ACPI HID QCOM8002 2018-05-02 14:36:08 +02:00
pinctrl-sdm845.c
pinctrl-spmi-gpio.c pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant 2018-07-09 13:16:01 +02:00
pinctrl-spmi-mpp.c
pinctrl-ssbi-gpio.c
pinctrl-ssbi-mpp.c