diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-08 19:23:54 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-08 19:23:54 +0200 |
commit | fe460a6df6a8427d4ce7c731a0de43b6e10e9f6b (patch) | |
tree | 7b073b94f6f66ec82d8c9c6b1d2d78fb8a802848 /drivers/pinctrl/freescale | |
parent | Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi (diff) | |
parent | pinctrl: mcp23s08: Do not complain about unsupported params (diff) | |
download | linux-fe460a6df6a8427d4ce7c731a0de43b6e10e9f6b.tar.xz linux-fe460a6df6a8427d4ce7c731a0de43b6e10e9f6b.zip |
Merge tag 'pinctrl-v5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control updates from Linus Walleij:
"It is pretty calm and chill in pin control for the moment. Just
incremental development.
There is an odd patch to the Super-H architecture, it's coming from
the maintainers so should be fine.
Summary:
New drivers:
- Bitmain BM1880 pin controller
- Mediatek MT8516
- Cirrus Logich Lochnagar PMIC pins
Updates:
- Incremental development on Renesas SH-PFC
- Incremental development on Intel pin controller and some particular
updates for Cedarfork.
- Pin configuration support in Allwinner SunXi drivers
- Suspend/resume support in the NXP/Freescale i.MX8MQ driver
- Support for more packaging of the ST Micro STM32"
* tag 'pinctrl-v5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (72 commits)
pinctrl: mcp23s08: Do not complain about unsupported params
pinctrl: Rework Kconfig dependency for BM1880 pinctrl driver
MAINTAINERS: Add entry for BM1880 pinctrl
pinctrl: Add pinctrl support for BM1880 SoC
dt-bindings: pinctrl: Add BM1880 pinctrl binding
pinctrl: stm32: check irq controller availability at probe
pinctrl: mediatek: Add MT8516 Pinctrl driver
pinctrl: zte: fix leaked of_node references
pinctrl: intel: Increase readability of intel_gpio_update_pad_mode()
pinctrl: intel: Retain HOSTSW_OWN for requested gpio pin
pinctrl: pistachio: fix leaked of_node references
pinctrl: sunxi: Support I/O bias voltage setting on H6
pinctrl: sunxi: Prepare for alternative bias voltage setting methods
pinctrl: st: fix leaked of_node references
pinctrl: samsung: fix leaked of_node references
pinctrl: stm32: align stm32mp157 pin names
pinctrl: stm32: add package information for stm32mp157c
pinctrl: stm32: introduce package support
dt-bindings: pinctrl: stm32: add new entry for package information
pinctrl: imx8mq: Add suspend/resume ops
...
Diffstat (limited to 'drivers/pinctrl/freescale')
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-imx.c | 25 | ||||
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-imx.h | 1 | ||||
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-imx8mq.c | 1 | ||||
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-scu.c | 2 |
4 files changed, 24 insertions, 5 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index 188001beb298..83ff9532bae6 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -449,7 +449,7 @@ static void imx_pinconf_dbg_show(struct pinctrl_dev *pctldev, } } else { pin_reg = &ipctl->pin_regs[pin_id]; - if (!pin_reg || pin_reg->conf_reg == -1) { + if (pin_reg->conf_reg == -1) { seq_puts(s, "N/A"); return; } @@ -785,7 +785,6 @@ int imx_pinctrl_probe(struct platform_device *pdev, struct pinctrl_desc *imx_pinctrl_desc; struct device_node *np; struct imx_pinctrl *ipctl; - struct resource *res; struct regmap *gpr; int ret, i; @@ -817,8 +816,7 @@ int imx_pinctrl_probe(struct platform_device *pdev, ipctl->pin_regs[i].conf_reg = -1; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ipctl->base = devm_ioremap_resource(&pdev->dev, res); + ipctl->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ipctl->base)) return PTR_ERR(ipctl->base); @@ -887,3 +885,22 @@ free: return ret; } + +static int __maybe_unused imx_pinctrl_suspend(struct device *dev) +{ + struct imx_pinctrl *ipctl = dev_get_drvdata(dev); + + return pinctrl_force_sleep(ipctl->pctl); +} + +static int __maybe_unused imx_pinctrl_resume(struct device *dev) +{ + struct imx_pinctrl *ipctl = dev_get_drvdata(dev); + + return pinctrl_force_default(ipctl->pctl); +} + +const struct dev_pm_ops imx_pinctrl_pm_ops = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(imx_pinctrl_suspend, + imx_pinctrl_resume) +}; diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h index 98a4889af4ef..333d32b947b1 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.h +++ b/drivers/pinctrl/freescale/pinctrl-imx.h @@ -17,6 +17,7 @@ struct platform_device; extern struct pinmux_ops imx_pmx_ops; +extern const struct dev_pm_ops imx_pinctrl_pm_ops; /** * struct imx_pin_mmio - MMIO pin configurations diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mq.c b/drivers/pinctrl/freescale/pinctrl-imx8mq.c index 8d39af541d5f..50aa1c00c4b2 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx8mq.c +++ b/drivers/pinctrl/freescale/pinctrl-imx8mq.c @@ -339,6 +339,7 @@ static struct platform_driver imx8mq_pinctrl_driver = { .driver = { .name = "imx8mq-pinctrl", .of_match_table = of_match_ptr(imx8mq_pinctrl_of_match), + .pm = &imx_pinctrl_pm_ops, .suppress_bind_attrs = true, }, .probe = imx8mq_pinctrl_probe, diff --git a/drivers/pinctrl/freescale/pinctrl-scu.c b/drivers/pinctrl/freescale/pinctrl-scu.c index 83e69c0f39e6..73bf1d9f9cc6 100644 --- a/drivers/pinctrl/freescale/pinctrl-scu.c +++ b/drivers/pinctrl/freescale/pinctrl-scu.c @@ -35,7 +35,7 @@ struct imx_sc_msg_resp_pad_get { u32 val; } __packed; -struct imx_sc_ipc *pinctrl_ipc_handle; +static struct imx_sc_ipc *pinctrl_ipc_handle; int imx_pinctrl_sc_ipc_init(struct platform_device *pdev) { |