Here are a few pinctrl fixes for the v3.9 rc series:
- Usecount bounds checking so we do not go below zero on mux usecounts. - Loop range checking in GPIO ranges in the DT range parser. - Proper print in debugfs for pinconf state. - Fix compilation bug in generic pinconf code. - Minor bugfixes to abx500 and mvebu drivers. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJRS1t1AAoJEEEQszewGV1zV9EP/jb34Bk5gjeDFg5+tFYTRTyn RUq69aN20hTrmFkTYqF5oP6e+4QU6WMuLOkuQCcLIzxaA8IgCr75qKzetzF7kWjx ymR8t0wtI34r8mw4D+SNEg3Jz/99IIDmZP3lMd7A6Pccz0TsGQ4J78m5l2MPPnXt pQRtixyoLocJOwum5UTVaKj5s8zPwZR3LyRk9bXRk6hbVRvmYEv/N6xTIZE5SjwF QaBrBHUd4ZTvQIqYk1ECOoUpvZecE8FDIewybcZfIzHr0KCZdLAXYuW94k4GY/J3 bI7OwHX576N4GrNWnYHklapN4SY+DFdMXHREaFbAi+Ei3gPyA3DJ1mtr33Fj5Mgk hucvU3a4ZvgEKIOPorW0ZINllwWkQGkmeZ7uqSRS17RYRyjc6tW51PMGhcx55cmB RCosGhwWeKU8zX9Hs8QiVprigtjpFNx8o8baEOqtKYgXa+jnsgPghJkGLbfhDYCV c9mmrKzU6fD9Si9X8Yf9WoN+z1hy/UpL4NhetaFt1kUAcDXEHGwMhSz8Wt+FTXYw XjpJ3FHzyFlxiQStzORy15E6O7PFEmfDuFca1P8Zj9MKcqvgFg0aLpaqJir7/U+e fjYwpMVQzv6f1ZmxbOtYbzBMVJst7g6RFJh6AjxfuI5p//j44VfOTinBNrDAQ5a9 X/1cEY6m5Q+x9gKmtYvd =9iL3 -----END PGP SIGNATURE----- Merge tag 'pinctrl-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl fixes from Linus Walleij: "Here are a few pinctrl fixes for the v3.9 rc series: - Usecount bounds checking so we do not go below zero on mux usecounts. - Loop range checking in GPIO ranges in the DT range parser. - Proper print in debugfs for pinconf state. - Fix compilation bug in generic pinconf code. - Minor bugfixes to abx500 and mvebu drivers." * tag 'pinctrl-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinmux: forbid mux_usecount to be set at UINT_MAX pinctrl: mvebu: fix checking for SoC specific controls pinctrl: generic: Fix compilation error pinctrl: Print the correct information in debugfs pinconf-state file pinctrl: abx500: Fix checking if pin use AlternateFunction register gpio: fix wrong checking condition for gpio range
This commit is contained in:
commit
3912a677f6
|
@ -193,7 +193,7 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip)
|
|||
if (!np)
|
||||
return;
|
||||
|
||||
do {
|
||||
for (;; index++) {
|
||||
ret = of_parse_phandle_with_args(np, "gpio-ranges",
|
||||
"#gpio-range-cells", index, &pinspec);
|
||||
if (ret)
|
||||
|
@ -222,8 +222,7 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip)
|
|||
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
} while (index++);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
|
@ -620,7 +620,7 @@ int mvebu_pinctrl_probe(struct platform_device *pdev)
|
|||
|
||||
/* special soc specific control */
|
||||
if (ctrl->mpp_get || ctrl->mpp_set) {
|
||||
if (!ctrl->name || !ctrl->mpp_set || !ctrl->mpp_set) {
|
||||
if (!ctrl->name || !ctrl->mpp_get || !ctrl->mpp_set) {
|
||||
dev_err(&pdev->dev, "wrong soc control info\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -622,7 +622,7 @@ static const struct file_operations pinconf_dbg_pinname_fops = {
|
|||
static int pinconf_dbg_state_print(struct seq_file *s, void *d)
|
||||
{
|
||||
if (strlen(dbg_state_name))
|
||||
seq_printf(s, "%s\n", dbg_pinname);
|
||||
seq_printf(s, "%s\n", dbg_state_name);
|
||||
else
|
||||
seq_printf(s, "No pin state set\n");
|
||||
return 0;
|
||||
|
|
|
@ -90,7 +90,7 @@ static inline void pinconf_init_device_debugfs(struct dentry *devroot,
|
|||
* pin config.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_GENERIC_PINCONF
|
||||
#if defined(CONFIG_GENERIC_PINCONF) && defined(CONFIG_DEBUG_FS)
|
||||
|
||||
void pinconf_generic_dump_pin(struct pinctrl_dev *pctldev,
|
||||
struct seq_file *s, unsigned pin);
|
||||
|
|
|
@ -422,7 +422,7 @@ static u8 abx500_get_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
|
|||
}
|
||||
|
||||
/* check if pin use AlternateFunction register */
|
||||
if ((af.alt_bit1 == UNUSED) && (af.alt_bit1 == UNUSED))
|
||||
if ((af.alt_bit1 == UNUSED) && (af.alt_bit2 == UNUSED))
|
||||
return mode;
|
||||
/*
|
||||
* if pin GPIOSEL bit is set and pin supports alternate function,
|
||||
|
|
|
@ -194,6 +194,11 @@ static const char *pin_free(struct pinctrl_dev *pctldev, int pin,
|
|||
}
|
||||
|
||||
if (!gpio_range) {
|
||||
/*
|
||||
* A pin should not be freed more times than allocated.
|
||||
*/
|
||||
if (WARN_ON(!desc->mux_usecount))
|
||||
return NULL;
|
||||
desc->mux_usecount--;
|
||||
if (desc->mux_usecount)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue