android_kernel_sony_sdm845/drivers/pinctrl
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Douglas Anderson e8c398a694 pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant
[ Upstream commit 1cf86bc21257a330e3af51f2a4e885f1a705f6a5 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:36:40 +02:00
..
aspeed pinctrl-aspeed-g5: Never set SCU90[6] 2016-11-07 10:31:33 +01:00
bcm pinctrl: nsp: Fix potential NULL dereference 2018-08-24 13:12:39 +02:00
berlin pinctrl: berlin-bg4ct: fix the value for "sd1a" of pin SCRD0_CRD_PRES 2017-06-17 06:41:53 +02:00
freescale pinctrl: freescale: off by one in imx1_pinconf_group_dbg_show() 2018-09-05 09:20:09 +02:00
intel pinctrl: intel: Read back TX buffer state 2018-08-06 16:23:02 +02:00
mediatek
meson pinctrl: meson-gxbb: remove non-existing pin GPIOX_22 2018-04-13 19:48:25 +02:00
mvebu
nomadik
pxa pinctrl: pxa: pxa2xx: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2018-02-13 12:35:55 +01:00
qcom pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant 2018-09-26 08:36:40 +02:00
samsung pinctrl: samsung: Remove bogus irq_[un]mask from resource management 2017-08-16 13:43:23 -07:00
sh-pfc pinctrl: sh-pfc: r8a7796: Fix MOD_SEL register pin assignment for SSI pins group 2018-05-30 07:50:50 +02:00
sirf pinctrl: sirf: atlas7: Add missing 'of_node_put()' 2017-11-30 08:39:12 +00:00
spear
stm32 pinctrl: stm32: Fix bad function call 2017-07-12 15:01:05 +02:00
sunxi pinctrl: sunxi: Fix A64 UART mux value 2018-02-25 11:05:46 +01:00
tegra
uniphier pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD20 2017-08-16 13:43:23 -07:00
vt8500
core.c pinctrl: Really force states during suspend/resume 2018-03-24 11:00:25 +01:00
core.h
devicetree.c
devicetree.h
Kconfig pinctrl: adi2: Fix Kconfig build problem 2017-12-20 10:07:32 +01:00
Makefile
pinconf-generic.c
pinconf.c
pinconf.h
pinctrl-adi2-bf54x.c
pinctrl-adi2-bf60x.c
pinctrl-adi2.c
pinctrl-adi2.h
pinctrl-amd.c pinctrl/amd: save pin registers over suspend/resume 2017-09-27 14:39:19 +02:00
pinctrl-amd.h pinctrl/amd: save pin registers over suspend/resume 2017-09-27 14:39:19 +02:00
pinctrl-as3722.c
pinctrl-at91-pio4.c pinctrl: at91-pio4: add missing of_node_put 2018-08-03 07:55:19 +02:00
pinctrl-at91.c
pinctrl-at91.h
pinctrl-coh901.c
pinctrl-coh901.h
pinctrl-digicolor.c
pinctrl-falcon.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c
pinctrl-max77620.c
pinctrl-oxnas.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c
pinctrl-rockchip.c pinctrl: rockchip: enable clock when reading pin direction register 2018-03-24 11:00:25 +01:00
pinctrl-single.c
pinctrl-st.c pinctrl: st: add irq_request/release_resources callbacks 2017-12-25 14:23:39 +01:00
pinctrl-tb10x.c
pinctrl-tz1090-pdc.c
pinctrl-tz1090.c
pinctrl-u300.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c
pinmux.c
pinmux.h