Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pinctrl-v4.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
"Here is a smallish set of pin control fixes for the v4.1 cycle,
collected the last two weeks:

- fix a real nasty legacy bug that has screwed up the protection of
adding pinctrl maps dynamically. Normally this didn't happen so
much but Dough Anderson ran into it and fixed it, kudos!

- minor driver fixes for Qualcomm spmi, mediatek and Marvell drivers"

* tag 'pinctrl-v4.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinctrl: Don't just pretend to protect pinctrl_maps, do it for real
pinctrl: mediatek: mtk-common: initialize unmask
pinctrl: qcom-spmi-mpp: Fix input value report
pinctrl: qcom-spmi: Fix pin direction configuration
pinctrl: mvebu: Fix mapping of pin 63 (gpo -> gpio)

+16 -13
+4 -6
drivers/pinctrl/core.c
··· 1110 1110 EXPORT_SYMBOL_GPL(devm_pinctrl_put); 1111 1111 1112 1112 int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, 1113 - bool dup, bool locked) 1113 + bool dup) 1114 1114 { 1115 1115 int i, ret; 1116 1116 struct pinctrl_maps *maps_node; ··· 1178 1178 maps_node->maps = maps; 1179 1179 } 1180 1180 1181 - if (!locked) 1182 - mutex_lock(&pinctrl_maps_mutex); 1181 + mutex_lock(&pinctrl_maps_mutex); 1183 1182 list_add_tail(&maps_node->node, &pinctrl_maps); 1184 - if (!locked) 1185 - mutex_unlock(&pinctrl_maps_mutex); 1183 + mutex_unlock(&pinctrl_maps_mutex); 1186 1184 1187 1185 return 0; 1188 1186 } ··· 1195 1197 int pinctrl_register_mappings(struct pinctrl_map const *maps, 1196 1198 unsigned num_maps) 1197 1199 { 1198 - return pinctrl_register_map(maps, num_maps, true, false); 1200 + return pinctrl_register_map(maps, num_maps, true); 1199 1201 } 1200 1202 1201 1203 void pinctrl_unregister_map(struct pinctrl_map const *map)
+1 -1
drivers/pinctrl/core.h
··· 183 183 } 184 184 185 185 int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, 186 - bool dup, bool locked); 186 + bool dup); 187 187 void pinctrl_unregister_map(struct pinctrl_map const *map); 188 188 189 189 extern int pinctrl_force_sleep(struct pinctrl_dev *pctldev);
+1 -1
drivers/pinctrl/devicetree.c
··· 92 92 dt_map->num_maps = num_maps; 93 93 list_add_tail(&dt_map->node, &p->dt_maps); 94 94 95 - return pinctrl_register_map(map, num_maps, false, true); 95 + return pinctrl_register_map(map, num_maps, false); 96 96 } 97 97 98 98 struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
+2
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
··· 881 881 if (!mtk_eint_get_mask(pctl, eint_num)) { 882 882 mtk_eint_mask(d); 883 883 unmask = 1; 884 + } else { 885 + unmask = 0; 884 886 } 885 887 886 888 clr_bit = 0xff << eint_offset;
+1 -1
drivers/pinctrl/mvebu/pinctrl-armada-370.c
··· 364 364 MPP_FUNCTION(0x5, "audio", "mclk"), 365 365 MPP_FUNCTION(0x6, "uart0", "cts")), 366 366 MPP_MODE(63, 367 - MPP_FUNCTION(0x0, "gpo", NULL), 367 + MPP_FUNCTION(0x0, "gpio", NULL), 368 368 MPP_FUNCTION(0x1, "spi0", "sck"), 369 369 MPP_FUNCTION(0x2, "tclk", NULL)), 370 370 MPP_MODE(64,
+1
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 260 260 val = 1; 261 261 } 262 262 263 + val = val << PMIC_GPIO_REG_MODE_DIR_SHIFT; 263 264 val |= pad->function << PMIC_GPIO_REG_MODE_FUNCTION_SHIFT; 264 265 val |= pad->out_value & PMIC_GPIO_REG_MODE_VALUE_SHIFT; 265 266
+6 -4
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
··· 370 370 } 371 371 } 372 372 373 + val = val << PMIC_MPP_REG_MODE_DIR_SHIFT; 373 374 val |= pad->function << PMIC_MPP_REG_MODE_FUNCTION_SHIFT; 374 375 val |= pad->out_value & PMIC_MPP_REG_MODE_VALUE_MASK; 375 376 ··· 577 576 578 577 if (pad->input_enabled) { 579 578 ret = pmic_mpp_read(state, pad, PMIC_MPP_REG_RT_STS); 580 - if (!ret) { 581 - ret &= PMIC_MPP_REG_RT_STS_VAL_MASK; 582 - pad->out_value = ret; 583 - } 579 + if (ret < 0) 580 + return; 581 + 582 + ret &= PMIC_MPP_REG_RT_STS_VAL_MASK; 583 + pad->out_value = ret; 584 584 } 585 585 586 586 seq_printf(s, " %-4s", pad->output_enabled ? "out" : "in");