linux/drivers/pinctrl
Laxman Dewangan b22ef2a097 pinctrl: tegra: Correctly check the supported configuration
The pincontrol registers of Tegra chips has multiple filed per
registers. There is two type of registers mux and drive. All
configurations belongs to one of these registers.

If any configurations are supported then <config>_bit is set to
bit position of these registers otherwise -1 to not support it.
The member is defined as
	s32 <config>_bit:6;

So if config is not supported ifor given SoC then it is set to -1
in soc pinmmux table.
In common driver code, to find out that given config is supported
or not, it is checked as:

s8 bit = <config>_bit;
if (bit > 31) {
	/* Not supported config */
}

But in this case, bit is s8 and hence for non supporting it is -1.

Correct the check as:
if (bit < 0) {
	/* Not supported config */
}

Fixes: e4c02dced9 ("pinctrl: tegra: use signed bitfields for optional fields")
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-11 11:22:57 +02:00
..
bcm pinctrl: ns2: rename pinctrl_utils_dt_free_map 2016-05-09 11:42:37 +02:00
berlin pinctrl: berlin: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:02:13 +02:00
freescale pinctrl: imxl: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:02:21 +02:00
intel pinctrl: baytrail: fix some error handling in debugfs 2016-04-30 13:34:53 +02:00
mediatek pinctrl: mtk-common: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:02:31 +02:00
meson pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC 2016-05-11 10:47:11 +02:00
mvebu pinctrl: mvebu: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:02:39 +02:00
nomadik pinctrl: nomadik: hide nmk_gpio_get_mode when unused 2016-05-09 11:58:57 +02:00
pxa pinctrl: pxa: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:03:04 +02:00
qcom pinctrl: msm: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:03:00 +02:00
samsung pinctrl: exynos5440: Use off-stack memory for pinctrl_gpio_range 2016-04-26 15:52:46 +02:00
sh-pfc pinctrl: sh-pfc: Updates for v4.7 (take two) 2016-05-02 13:50:47 +02:00
sirf pinctrl: sirf/atlas7: trivial fix of spelling mistake on flagged 2016-04-29 11:30:35 +02:00
spear pinctrl: spear: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:03:18 +02:00
stm32 pinctrl: stm32: Implement .pin_config_dbg_show() 2016-05-10 13:48:26 +02:00
sunxi pinctrl: ssbi-mpp: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:03:24 +02:00
tegra pinctrl: tegra: Correctly check the supported configuration 2016-05-11 11:22:57 +02:00
uniphier pinctrl: uniphier: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:03:35 +02:00
vt8500 pinctrl: vt8500: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:20 +02:00
core.c pinctrl: zynq: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:27 +02:00
core.h pinctrl: core: create nolock version of pinctrl_find_gpio_range_from_pin 2016-03-07 10:41:20 +07:00
devicetree.c pinctrl: simplify of_pinctrl_get() 2015-07-16 09:39:03 +02:00
devicetree.h
Kconfig pinctrl: Turn AMD support to tristate 2016-02-16 00:11:49 +01:00
Makefile pinctrl: mediatek: guard sub-directory with CONFIG_PINCTRL_MTK 2016-02-13 23:34:19 +01:00
pinconf-generic.c pinctrl: Rename pinctrl_utils_dt_free_map to pinctrl_utils_free_map 2016-04-01 15:06:36 +02:00
pinconf.c pinctrl: pinconf: remove needless loop 2015-10-31 22:13:07 +01:00
pinconf.h
pinctrl-adi2-bf54x.c
pinctrl-adi2-bf60x.c added tabs instead of spaces 2015-07-16 09:39:01 +02:00
pinctrl-adi2.c pinctrl: adi2: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:20 +02:00
pinctrl-adi2.h
pinctrl-amd.c pinctrl: amd: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:21 +02:00
pinctrl-amd.h Fix inconsistent spinlock of AMD GPIO driver which can be 2015-04-07 11:36:49 +02:00
pinctrl-as3722.c pinctrl: as3722: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:21 +02:00
pinctrl-at91-pio4.c pinctrl: at91-pio4: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:22 +02:00
pinctrl-at91.c pinctrl: at91: Merge clk_prepare and clk_enable into clk_prepare_enable 2016-05-02 13:53:07 +02:00
pinctrl-at91.h
pinctrl-coh901.c pinctrl: coh901: fix initconst annotation 2016-02-15 20:40:52 +01:00
pinctrl-coh901.h
pinctrl-digicolor.c pinctrl: digicolor: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:22 +02:00
pinctrl-falcon.c
pinctrl-lantiq.c pinctrl: lantiq: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:23 +02:00
pinctrl-lantiq.h pinctrl/lantiq: introduce new dedicated devicetree bindings 2015-11-30 13:12:07 +01:00
pinctrl-lpc18xx.c pinctrl: lpc18xx: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:23 +02:00
pinctrl-palmas.c pinctrl: palmas: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:23 +02:00
pinctrl-pic32.c pinctrl: pic32: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:24 +02:00
pinctrl-pic32.h pinctrl: pinctrl-pic32: Add PIC32 pin control driver 2016-02-05 23:54:47 +01:00
pinctrl-pistachio.c pinctrl: pistachio: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:24 +02:00
pinctrl-rockchip.c pinctrl: rockchip: fix pull setting error for rk3399 2016-05-11 10:43:21 +02:00
pinctrl-single.c pinctrl: single: Use a separate lockdep class 2016-03-11 23:03:06 +07:00
pinctrl-st.c pinctrl: st: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:25 +02:00
pinctrl-tb10x.c pinctrl: tb10x: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:25 +02:00
pinctrl-tz1090-pdc.c pinctrl: tz1090-pdc: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:26 +02:00
pinctrl-tz1090.c pinctrl: tz1090 Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:26 +02:00
pinctrl-u300.c pinctrl: u300: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:26 +02:00
pinctrl-utils.c pinctrl: Rename pinctrl_utils_dt_free_map to pinctrl_utils_free_map 2016-04-01 15:06:36 +02:00
pinctrl-utils.h pinctrl: Rename pinctrl_utils_dt_free_map to pinctrl_utils_free_map 2016-04-01 15:06:36 +02:00
pinctrl-xway.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
pinctrl-zynq.c pinctrl: zynq: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:27 +02:00
pinmux.c pinctrl: convert to use match_string() helper 2016-03-17 15:09:34 -07:00
pinmux.h