mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
These are some v4.4 pin control fixes:
- Drop a redundant if-clause from Kconfig - Fix a missing of_node_put() memory leak in the Freescale i.MX driver - Fix 64bit compilation of the Qualcomm SSBI driver. - Fix a logic inversion in the Mediatek driver. - Fix a compilation error for the odd one off in the Super-H instance of the SH PFC driver. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWXv4gAAoJEEEQszewGV1zl0AQAMljInkraH4CGdP7i3ynPYjn BIDzbm6Hbgn89KTodYvwmufTvDsIcmMY8eIsm+LfaavHRhc3/ddznsIB1ow6MzAr uwDtUSGvVw/lBnbsXAQw41at1fOihTZfeIgrXL1uhBL1TX7gKFthRbKp73hiCUnk RkrwLu/vt1YbTFRbLW6PymV/9zNyV5Cm9iimfwlTRft3wmzs1gYD5w5s9b7grtNm lCL1h+HBawuv+RSSqgHohc3zXqAkI+PfU1WZWpseIEZt5QfZ/31ogFvG/9bA0Ifq WAc0cHDF7sPnv8jHNeJ4O0g2Kg8vyqeyfkDP2qREv2QmmNv0FF0o/HEGV9Efc6lL hPQeOxcew7OKhJ+vTy/SA/wIlrZmbqk3Mw3j8yxoezuQAuQ5qGJqeLkWhMWrOsXr UixxMBFhMW2BuNs9JScTm5+mUAf8t+nRY8dqEKdRlLReOy1FJ0Yd7ZJh+vBpMqmf R7uh2DUsNrzwUfcF4XjGcb3wuEOECwW76CcOznCSPrG7XB3+nQG78Ia63IC4CfPs 9+CzGQWBVDZziSgKDsaNzBSyE4Ipfn2dxdBLRDuUU/lwg368Xp8Ac2vzyiMdOXi1 FIB/00U8dEBC7Nn2q/cumO+pVbYVjdzu51NsBR5QQHez7e3d+DlTumcOftEe7iTp t6BXUesJY0rUmDLZtjf4 =f61M -----END PGP SIGNATURE----- Merge tag 'pinctrl-v4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pincontrol fixes from Linus Walleij: "These are some v4.4 pin control fixes: - Drop a redundant if-clause from Kconfig - Fix a missing of_node_put() memory leak in the Freescale i.MX driver - Fix 64bit compilation of the Qualcomm SSBI driver. - Fix a logic inversion in the Mediatek driver. - Fix a compilation error for the odd one off in the Super-H instance of the SH PFC driver" * tag 'pinctrl-v4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: sh-pfc: sh7734: Add missing cfg macro parameter to fix build pinctrl: mediatek: Add get_direction support. pinctrl: fix qcom ssbi drivers for 64-bit compilation pinctrl: imx1-core: add missing of_node_put pinctrl: remove redundant if conditional from Kconfig
This commit is contained in:
commit
357436af49
@ -5,8 +5,6 @@
|
||||
config PINCTRL
|
||||
bool
|
||||
|
||||
if PINCTRL
|
||||
|
||||
menu "Pin controllers"
|
||||
depends on PINCTRL
|
||||
|
||||
@ -274,5 +272,3 @@ config PINCTRL_TB10X
|
||||
select GPIOLIB
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
@ -538,8 +538,10 @@ static int imx1_pinctrl_parse_functions(struct device_node *np,
|
||||
func->groups[i] = child->name;
|
||||
grp = &info->groups[grp_index++];
|
||||
ret = imx1_pinctrl_parse_groups(child, grp, info, i++);
|
||||
if (ret == -ENOMEM)
|
||||
if (ret == -ENOMEM) {
|
||||
of_node_put(child);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -582,8 +584,10 @@ static int imx1_pinctrl_parse_dt(struct platform_device *pdev,
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
ret = imx1_pinctrl_parse_functions(child, info, ifunc++);
|
||||
if (ret == -ENOMEM)
|
||||
if (ret == -ENOMEM) {
|
||||
of_node_put(child);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -747,7 +747,7 @@ static int mtk_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
|
||||
reg_addr = mtk_get_port(pctl, offset) + pctl->devdata->dir_offset;
|
||||
bit = BIT(offset & 0xf);
|
||||
regmap_read(pctl->regmap1, reg_addr, &read_val);
|
||||
return !!(read_val & bit);
|
||||
return !(read_val & bit);
|
||||
}
|
||||
|
||||
static int mtk_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
@ -757,12 +757,8 @@ static int mtk_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
unsigned int read_val = 0;
|
||||
struct mtk_pinctrl *pctl = dev_get_drvdata(chip->dev);
|
||||
|
||||
if (mtk_gpio_get_direction(chip, offset))
|
||||
reg_addr = mtk_get_port(pctl, offset) +
|
||||
pctl->devdata->dout_offset;
|
||||
else
|
||||
reg_addr = mtk_get_port(pctl, offset) +
|
||||
pctl->devdata->din_offset;
|
||||
reg_addr = mtk_get_port(pctl, offset) +
|
||||
pctl->devdata->din_offset;
|
||||
|
||||
bit = BIT(offset & 0xf);
|
||||
regmap_read(pctl->regmap1, reg_addr, &read_val);
|
||||
@ -997,6 +993,7 @@ static struct gpio_chip mtk_gpio_chip = {
|
||||
.owner = THIS_MODULE,
|
||||
.request = gpiochip_generic_request,
|
||||
.free = gpiochip_generic_free,
|
||||
.get_direction = mtk_gpio_get_direction,
|
||||
.direction_input = mtk_gpio_direction_input,
|
||||
.direction_output = mtk_gpio_direction_output,
|
||||
.get = mtk_gpio_get,
|
||||
|
@ -672,7 +672,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
pctrl->dev = &pdev->dev;
|
||||
pctrl->npins = (unsigned)of_device_get_match_data(&pdev->dev);
|
||||
pctrl->npins = (unsigned long)of_device_get_match_data(&pdev->dev);
|
||||
|
||||
pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
|
||||
if (!pctrl->regmap) {
|
||||
|
@ -763,7 +763,7 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
pctrl->dev = &pdev->dev;
|
||||
pctrl->npins = (unsigned)of_device_get_match_data(&pdev->dev);
|
||||
pctrl->npins = (unsigned long)of_device_get_match_data(&pdev->dev);
|
||||
|
||||
pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
|
||||
if (!pctrl->regmap) {
|
||||
|
@ -31,11 +31,11 @@
|
||||
PORT_GP_12(5, fn, sfx)
|
||||
|
||||
#undef _GP_DATA
|
||||
#define _GP_DATA(bank, pin, name, sfx) \
|
||||
#define _GP_DATA(bank, pin, name, sfx, cfg) \
|
||||
PINMUX_DATA(name##_DATA, name##_FN, name##_IN, name##_OUT)
|
||||
|
||||
#define _GP_INOUTSEL(bank, pin, name, sfx) name##_IN, name##_OUT
|
||||
#define _GP_INDT(bank, pin, name, sfx) name##_DATA
|
||||
#define _GP_INOUTSEL(bank, pin, name, sfx, cfg) name##_IN, name##_OUT
|
||||
#define _GP_INDT(bank, pin, name, sfx, cfg) name##_DATA
|
||||
#define GP_INOUTSEL(bank) PORT_GP_32_REV(bank, _GP_INOUTSEL, unused)
|
||||
#define GP_INDT(bank) PORT_GP_32_REV(bank, _GP_INDT, unused)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user