[PATCH 035/102] st-rc: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Patrice Chotard 
Cc: linux-me...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/media/rc/st_rc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index a08e1dd061249..d48304f6c3de0 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -280,7 +280,7 @@ static int st_rc_probe(struct platform_device *pdev)
else
rc_dev->rx_base = rc_dev->base;
 
-   rc_dev->rstc = reset_control_get_optional(dev, NULL);
+   rc_dev->rstc = reset_control_get_optional_exclusive(dev, NULL);
if (IS_ERR(rc_dev->rstc)) {
ret = PTR_ERR(rc_dev->rstc);
goto err;
-- 
2.11.0



[PATCH 030/102] i2c: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Laxman Dewangan 
Cc: Wolfram Sang 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/i2c/busses/i2c-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 4af9bbae20dfd..a23884445fa2f 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -911,7 +911,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
i2c_dev->cont_id = pdev->id;
i2c_dev->dev = &pdev->dev;
 
-   i2c_dev->rst = devm_reset_control_get(&pdev->dev, "i2c");
+   i2c_dev->rst = devm_reset_control_get_exclusive(&pdev->dev, "i2c");
if (IS_ERR(i2c_dev->rst)) {
dev_err(&pdev->dev, "missing controller reset\n");
return PTR_ERR(i2c_dev->rst);
-- 
2.11.0



[PATCH 019/102] drm: kirin: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Xinliang Liu 
Cc: Rongrong Zou 
Cc: Xinwei Kong 
Cc: Chen Feng 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Philipp Zabel 
---
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c 
b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
index c96c228a98980..5cef7ee83a168 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
@@ -933,7 +933,7 @@ static int ade_dts_parse(struct platform_device *pdev, 
struct ade_hw_ctx *ctx)
return  PTR_ERR(ctx->base);
}
 
-   ctx->reset = devm_reset_control_get(dev, NULL);
+   ctx->reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(ctx->reset))
return PTR_ERR(ctx->reset);
 
-- 
2.11.0



[PATCH 028/102] i2c: stm32f4: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Wolfram Sang 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/i2c/busses/i2c-stm32f4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c
index f9dd7e86b861a..4da3ce0865ebd 100644
--- a/drivers/i2c/busses/i2c-stm32f4.c
+++ b/drivers/i2c/busses/i2c-stm32f4.c
@@ -798,7 +798,7 @@ static int stm32f4_i2c_probe(struct platform_device *pdev)
return ret;
}
 
-   rst = devm_reset_control_get(&pdev->dev, NULL);
+   rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(rst)) {
dev_err(&pdev->dev, "Error: Missing controller reset\n");
ret = PTR_ERR(rst);
-- 
2.11.0



[PATCH 016/102] dmaengine: stm32-dma: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Dan Williams 
Cc: Vinod Koul 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: dmaeng...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/dma/stm32-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
index 786fc8fcc38ed..73486af244744 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32-dma.c
@@ -1058,7 +1058,7 @@ static int stm32_dma_probe(struct platform_device *pdev)
dmadev->mem2mem = of_property_read_bool(pdev->dev.of_node,
"st,mem2mem");
 
-   dmadev->rst = devm_reset_control_get(&pdev->dev, NULL);
+   dmadev->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (!IS_ERR(dmadev->rst)) {
reset_control_assert(dmadev->rst);
udelay(2);
-- 
2.11.0



[PATCH 017/102] dmaengine: sun6i: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Vinod Koul 
Cc: Dan Williams 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: dmaeng...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/dma/sun6i-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index a2358780ab2c3..7903c9971b8d2 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -1070,7 +1070,7 @@ static int sun6i_dma_probe(struct platform_device *pdev)
return PTR_ERR(sdc->clk);
}
 
-   sdc->rstc = devm_reset_control_get(&pdev->dev, NULL);
+   sdc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(sdc->rstc)) {
dev_err(&pdev->dev, "No reset controller specified\n");
return PTR_ERR(sdc->rstc);
-- 
2.11.0



[PATCH 029/102] i2c: sun6i-pw2i: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Wolfram Sang 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/i2c/busses/i2c-sun6i-p2wi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c 
b/drivers/i2c/busses/i2c-sun6i-p2wi.c
index 7668e2e9b8fd2..68a4567ad974e 100644
--- a/drivers/i2c/busses/i2c-sun6i-p2wi.c
+++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c
@@ -258,7 +258,7 @@ static int p2wi_probe(struct platform_device *pdev)
 
parent_clk_freq = clk_get_rate(p2wi->clk);
 
-   p2wi->rstc = devm_reset_control_get(dev, NULL);
+   p2wi->rstc = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(p2wi->rstc)) {
ret = PTR_ERR(p2wi->rstc);
dev_err(dev, "failed to retrieve reset controller: %d\n", ret);
-- 
2.11.0



[PATCH 021/102] drm/rockchip: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Mark Yao 
Cc: Heiko Stuebner 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +-
 drivers/gpu/drm/rockchip/cdn-dp-core.c  | 8 
 drivers/gpu/drm/rockchip/dw-mipi-dsi.c  | 2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c 
b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index 9606121fa185a..172930e7645e7 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -297,7 +297,7 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp)
return PTR_ERR(dp->pclk);
}
 
-   dp->rst = devm_reset_control_get(dev, "dp");
+   dp->rst = devm_reset_control_get_exclusive(dev, "dp");
if (IS_ERR(dp->rst)) {
dev_err(dev, "failed to get dp reset control\n");
return PTR_ERR(dp->rst);
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c 
b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index 9b0b0588bbedb..b7f5c5d9f245d 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -765,25 +765,25 @@ static int cdn_dp_parse_dt(struct cdn_dp_device *dp)
return PTR_ERR(dp->grf_clk);
}
 
-   dp->spdif_rst = devm_reset_control_get(dev, "spdif");
+   dp->spdif_rst = devm_reset_control_get_exclusive(dev, "spdif");
if (IS_ERR(dp->spdif_rst)) {
DRM_DEV_ERROR(dev, "no spdif reset control found\n");
return PTR_ERR(dp->spdif_rst);
}
 
-   dp->dptx_rst = devm_reset_control_get(dev, "dptx");
+   dp->dptx_rst = devm_reset_control_get_exclusive(dev, "dptx");
if (IS_ERR(dp->dptx_rst)) {
DRM_DEV_ERROR(dev, "no uphy reset control found\n");
return PTR_ERR(dp->dptx_rst);
}
 
-   dp->core_rst = devm_reset_control_get(dev, "core");
+   dp->core_rst = devm_reset_control_get_exclusive(dev, "core");
if (IS_ERR(dp->core_rst)) {
DRM_DEV_ERROR(dev, "no core reset control found\n");
return PTR_ERR(dp->core_rst);
}
 
-   dp->apb_rst = devm_reset_control_get(dev, "apb");
+   dp->apb_rst = devm_reset_control_get_exclusive(dev, "apb");
if (IS_ERR(dp->apb_rst)) {
DRM_DEV_ERROR(dev, "no apb reset control found\n");
return PTR_ERR(dp->apb_rst);
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c 
b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
index 21b9737662ae9..c3501ae59db35 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
@@ -1221,7 +1221,7 @@ static int dw_mipi_dsi_bind(struct device *dev, struct 
device *master,
 * Note that the reset was not defined in the initial device tree, so
 * we have to be prepared for it not being found.
 */
-   apb_rst = devm_reset_control_get(dev, "apb");
+   apb_rst = devm_reset_control_get_exclusive(dev, "apb");
if (IS_ERR(apb_rst)) {
ret = PTR_ERR(apb_rst);
if (ret == -ENOENT) {
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c 
b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 5d450332c2fd7..18b582cd81e50 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1443,7 +1443,7 @@ static int vop_initial(struct vop *vop)
/*
 * do hclk_reset, reset all vop registers.
 */
-   ahb_rst = devm_reset_control_get(vop->dev, "ahb");
+   ahb_rst = devm_reset_control_get_exclusive(vop->dev, "ahb");
if (IS_ERR(ahb_rst)) {
dev_err(vop->dev, "failed to get ahb reset\n");
ret = PTR_ERR(ahb_rst);
@@ -1469,7 +1469,7 @@ static int vop_initial(struct vop *vop)
/*
 * do dclk_reset, let all config take affect.
 */
-   vop->dclk_rst = devm_reset_control_get(vop->dev, "dclk");
+   vop->dclk_rst = devm_reset_control_get_exclusive(vop->dev, "dclk");
if (IS_ERR(vop->dclk_rst)) {
dev_err(vop->dev, "failed to get dclk reset\n");
ret = PTR_ERR(vop->dclk_rst);
-- 
2.11.0



[PATCH 020/102] drm/nouveau/tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c 
b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index 189ed80e21ffb..ac5d4cf058c25 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -282,7 +282,7 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func 
*func,
}
}
 
-   tdev->rst = devm_reset_control_get(&pdev->dev, "gpu");
+   tdev->rst = devm_reset_control_get_exclusive(&pdev->dev, "gpu");
if (IS_ERR(tdev->rst)) {
ret = PTR_ERR(tdev->rst);
goto free;
-- 
2.11.0



[PATCH 022/102] drm/sti: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Benjamin Gaignard 
Cc: Vincent Abriou 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Philipp Zabel 
---
 drivers/gpu/drm/sti/sti_hdmi.c  | 2 +-
 drivers/gpu/drm/sti/sti_hqvdp.c | 2 +-
 drivers/gpu/drm/sti/sti_tvout.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index a59c95a8081b7..ea6e5b5a3725b 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.c
+++ b/drivers/gpu/drm/sti/sti_hdmi.c
@@ -1428,7 +1428,7 @@ static int sti_hdmi_probe(struct platform_device *pdev)
if (!hdmi->notifier)
goto release_adapter;
 
-   hdmi->reset = devm_reset_control_get(dev, "hdmi");
+   hdmi->reset = devm_reset_control_get_exclusive(dev, "hdmi");
/* Take hdmi out of reset */
if (!IS_ERR(hdmi->reset))
reset_control_deassert(hdmi->reset);
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index a1c161f778044..2809db8c03216 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -1375,7 +1375,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev)
}
 
/* Get reset resources */
-   hqvdp->reset = devm_reset_control_get(dev, "hqvdp");
+   hqvdp->reset = devm_reset_control_get_exclusive(dev, "hqvdp");
if (!IS_ERR(hqvdp->reset))
reset_control_deassert(hqvdp->reset);
 
diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
index 8959fcc743a8e..cbe0f5c162348 100644
--- a/drivers/gpu/drm/sti/sti_tvout.c
+++ b/drivers/gpu/drm/sti/sti_tvout.c
@@ -857,7 +857,7 @@ static int sti_tvout_probe(struct platform_device *pdev)
return -ENOMEM;
 
/* get reset resources */
-   tvout->reset = devm_reset_control_get(dev, "tvout");
+   tvout->reset = devm_reset_control_get_exclusive(dev, "tvout");
/* take tvout out of reset */
if (!IS_ERR(tvout->reset))
reset_control_deassert(tvout->reset);
-- 
2.11.0



[PATCH 024/102] drm/sun4i: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Philipp Zabel 
---
 drivers/gpu/drm/sun4i/sun4i_backend.c | 4 ++--
 drivers/gpu/drm/sun4i/sun4i_tcon.c| 2 +-
 drivers/gpu/drm/sun4i/sun4i_tv.c  | 2 +-
 drivers/gpu/drm/sun4i/sun6i_drc.c | 2 +-
 drivers/gpu/drm/sun4i/sun8i_mixer.c   | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c 
b/drivers/gpu/drm/sun4i/sun4i_backend.c
index cf480218daa50..b7eb908798f6e 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
@@ -248,7 +248,7 @@ static int sun4i_backend_init_sat(struct device *dev) {
struct sun4i_backend *backend = dev_get_drvdata(dev);
int ret;
 
-   backend->sat_reset = devm_reset_control_get(dev, "sat");
+   backend->sat_reset = devm_reset_control_get_exclusive(dev, "sat");
if (IS_ERR(backend->sat_reset)) {
dev_err(dev, "Couldn't get the SAT reset line\n");
return PTR_ERR(backend->sat_reset);
@@ -376,7 +376,7 @@ static int sun4i_backend_bind(struct device *dev, struct 
device *master,
return PTR_ERR(backend->engine.regs);
}
 
-   backend->reset = devm_reset_control_get(dev, NULL);
+   backend->reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(backend->reset)) {
dev_err(dev, "Couldn't get our reset line\n");
return PTR_ERR(backend->reset);
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c 
b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index d9791292553ef..2135ae51356a1 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -523,7 +523,7 @@ static int sun4i_tcon_bind(struct device *dev, struct 
device *master,
tcon->id = engine->id;
tcon->quirks = of_device_get_match_data(dev);
 
-   tcon->lcd_rst = devm_reset_control_get(dev, "lcd");
+   tcon->lcd_rst = devm_reset_control_get_exclusive(dev, "lcd");
if (IS_ERR(tcon->lcd_rst)) {
dev_err(dev, "Couldn't get our reset line\n");
return PTR_ERR(tcon->lcd_rst);
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 338b9e5bb2a3e..a8b93b2658c44 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -593,7 +593,7 @@ static int sun4i_tv_bind(struct device *dev, struct device 
*master,
return PTR_ERR(tv->regs);
}
 
-   tv->reset = devm_reset_control_get(dev, NULL);
+   tv->reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(tv->reset)) {
dev_err(dev, "Couldn't get our reset line\n");
return PTR_ERR(tv->reset);
diff --git a/drivers/gpu/drm/sun4i/sun6i_drc.c 
b/drivers/gpu/drm/sun4i/sun6i_drc.c
index 09bba853e2a42..8b018e539a9e3 100644
--- a/drivers/gpu/drm/sun4i/sun6i_drc.c
+++ b/drivers/gpu/drm/sun4i/sun6i_drc.c
@@ -33,7 +33,7 @@ static int sun6i_drc_bind(struct device *dev, struct device 
*master,
return -ENOMEM;
dev_set_drvdata(dev, drc);
 
-   drc->reset = devm_reset_control_get(dev, NULL);
+   drc->reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(drc->reset)) {
dev_err(dev, "Couldn't get our reset line\n");
return PTR_ERR(drc->reset);
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c 
b/drivers/gpu/drm/sun4i/sun8i_mixer.c
index cb193c5f16862..13adac261d1f8 100644
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
@@ -287,7 +287,7 @@ static int sun8i_mixer_bind(struct device *dev, struct 
device *master,
return PTR_ERR(mixer->engine.regs);
}
 
-   mixer->reset = devm_reset_control_get(dev, NULL);
+   mixer->reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(mixer->reset)) {
dev_err(dev, "Couldn't get our reset line\n");
return PTR_ERR(mixer->reset);
-- 
2.11.0



[PATCH 025/102] drm/tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/gpu/drm/tegra/dc.c| 2 +-
 drivers/gpu/drm/tegra/dpaux.c | 3 ++-
 drivers/gpu/drm/tegra/dsi.c   | 2 +-
 drivers/gpu/drm/tegra/gr3d.c  | 6 +++---
 drivers/gpu/drm/tegra/hdmi.c  | 2 +-
 drivers/gpu/drm/tegra/sor.c   | 2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index c875f11786b93..61d476a3006af 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -2011,7 +2011,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
return PTR_ERR(dc->clk);
}
 
-   dc->rst = devm_reset_control_get(&pdev->dev, "dc");
+   dc->rst = devm_reset_control_get_exclusive(&pdev->dev, "dc");
if (IS_ERR(dc->rst)) {
dev_err(&pdev->dev, "failed to get reset\n");
return PTR_ERR(dc->rst);
diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
index 2fde44c3a1b30..1cf18f4f98f06 100644
--- a/drivers/gpu/drm/tegra/dpaux.c
+++ b/drivers/gpu/drm/tegra/dpaux.c
@@ -445,7 +445,8 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
}
 
if (!pdev->dev.pm_domain) {
-   dpaux->rst = devm_reset_control_get(&pdev->dev, "dpaux");
+   dpaux->rst = devm_reset_control_get_exclusive(&pdev->dev,
+ "dpaux");
if (IS_ERR(dpaux->rst)) {
dev_err(&pdev->dev,
"failed to get reset control: %ld\n",
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index 3dea1216bafdc..af8850c74abe9 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -1518,7 +1518,7 @@ static int tegra_dsi_probe(struct platform_device *pdev)
dsi->lanes = 4;
 
if (!pdev->dev.pm_domain) {
-   dsi->rst = devm_reset_control_get(&pdev->dev, "dsi");
+   dsi->rst = devm_reset_control_get_exclusive(&pdev->dev, "dsi");
if (IS_ERR(dsi->rst))
return PTR_ERR(dsi->rst);
}
diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c
index cee2ab645cde9..e8dd13e02483d 100644
--- a/drivers/gpu/drm/tegra/gr3d.c
+++ b/drivers/gpu/drm/tegra/gr3d.c
@@ -260,7 +260,7 @@ static int gr3d_probe(struct platform_device *pdev)
return PTR_ERR(gr3d->clk);
}
 
-   gr3d->rst = devm_reset_control_get(&pdev->dev, "3d");
+   gr3d->rst = devm_reset_control_get_exclusive(&pdev->dev, "3d");
if (IS_ERR(gr3d->rst)) {
dev_err(&pdev->dev, "cannot get reset\n");
return PTR_ERR(gr3d->rst);
@@ -273,8 +273,8 @@ static int gr3d_probe(struct platform_device *pdev)
return PTR_ERR(gr3d->clk_secondary);
}
 
-   gr3d->rst_secondary = devm_reset_control_get(&pdev->dev,
-   "3d2");
+   gr3d->rst_secondary = 
devm_reset_control_get_exclusive(&pdev->dev,
+  "3d2");
if (IS_ERR(gr3d->rst_secondary)) {
dev_err(&pdev->dev, "cannot get secondary reset\n");
return PTR_ERR(gr3d->rst_secondary);
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index cda0491ed6bf8..49d1cade94742 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -1686,7 +1686,7 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
return PTR_ERR(hdmi->clk);
}
 
-   hdmi->rst = devm_reset_control_get(&pdev->dev, "hdmi");
+   hdmi->rst = devm_reset_control_get_exclusive(&pdev->dev, "hdmi");
if (IS_ERR(hdmi->rst)) {
dev_err(&pdev->dev, "failed to get reset\n");
return PTR_ERR(hdmi->rst);
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index a8f528925009e..4a4796ceeb541 100644
--- a/drivers/gpu/drm/t

[PATCH 032/102] iio: dac: stm32-dac-core: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Jonathan Cameron 
Cc: Hartmut Knaack 
Cc: Lars-Peter Clausen 
Cc: Peter Meerwald-Stadler 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/iio/dac/stm32-dac-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/stm32-dac-core.c b/drivers/iio/dac/stm32-dac-core.c
index 75e48788c7ead..f1eeb1549f689 100644
--- a/drivers/iio/dac/stm32-dac-core.c
+++ b/drivers/iio/dac/stm32-dac-core.c
@@ -114,7 +114,7 @@ static int stm32_dac_probe(struct platform_device *pdev)
goto err_vref;
}
 
-   priv->rst = devm_reset_control_get(dev, NULL);
+   priv->rst = devm_reset_control_get_exclusive(dev, NULL);
if (!IS_ERR(priv->rst)) {
reset_control_assert(priv->rst);
udelay(2);
-- 
2.11.0



[PATCH 033/102] Input: tegra-kbc - request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Rakesh Iyer 
Cc: Laxman Dewangan 
Cc: Dmitry Torokhov 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-in...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/input/keyboard/tegra-kbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/tegra-kbc.c 
b/drivers/input/keyboard/tegra-kbc.c
index 0c07e1023a469..c42c825dd982b 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -665,7 +665,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)
return PTR_ERR(kbc->clk);
}
 
-   kbc->rst = devm_reset_control_get(&pdev->dev, "kbc");
+   kbc->rst = devm_reset_control_get_exclusive(&pdev->dev, "kbc");
if (IS_ERR(kbc->rst)) {
dev_err(&pdev->dev, "failed to get keyboard reset\n");
return PTR_ERR(kbc->rst);
-- 
2.11.0



[PATCH 031/102] iio: adc: rockchip_saradc: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Jonathan Cameron 
Cc: Hartmut Knaack 
Cc: Lars-Peter Clausen 
Cc: Peter Meerwald-Stadler 
Cc: Heiko Stuebner 
Cc: linux-...@vger.kernel.org
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/iio/adc/rockchip_saradc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/adc/rockchip_saradc.c 
b/drivers/iio/adc/rockchip_saradc.c
index ae6d3324f5183..1d9300ba07c00 100644
--- a/drivers/iio/adc/rockchip_saradc.c
+++ b/drivers/iio/adc/rockchip_saradc.c
@@ -235,7 +235,8 @@ static int rockchip_saradc_probe(struct platform_device 
*pdev)
 * The reset should be an optional property, as it should work
 * with old devicetrees as well
 */
-   info->reset = devm_reset_control_get(&pdev->dev, "saradc-apb");
+   info->reset = devm_reset_control_get_exclusive(&pdev->dev,
+  "saradc-apb");
if (IS_ERR(info->reset)) {
ret = PTR_ERR(info->reset);
if (ret != -ENOENT)
-- 
2.11.0



[PATCH 053/102] PCI: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Thierry Reding 
Cc: Bjorn Helgaas 
Cc: Jonathan Hunter 
Cc: linux-te...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/pci/host/pci-tegra.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index b3722b7709df8..a64bd0a191767 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1147,15 +1147,15 @@ static int tegra_pcie_resets_get(struct tegra_pcie 
*pcie)
 {
struct device *dev = pcie->dev;
 
-   pcie->pex_rst = devm_reset_control_get(dev, "pex");
+   pcie->pex_rst = devm_reset_control_get_exclusive(dev, "pex");
if (IS_ERR(pcie->pex_rst))
return PTR_ERR(pcie->pex_rst);
 
-   pcie->afi_rst = devm_reset_control_get(dev, "afi");
+   pcie->afi_rst = devm_reset_control_get_exclusive(dev, "afi");
if (IS_ERR(pcie->afi_rst))
return PTR_ERR(pcie->afi_rst);
 
-   pcie->pcie_xrst = devm_reset_control_get(dev, "pcie_x");
+   pcie->pcie_xrst = devm_reset_control_get_exclusive(dev, "pcie_x");
if (IS_ERR(pcie->pcie_xrst))
return PTR_ERR(pcie->pcie_xrst);
 
-- 
2.11.0



[PATCH 034/102] coda: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: linux-me...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/media/platform/coda/coda-common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/coda/coda-common.c 
b/drivers/media/platform/coda/coda-common.c
index f92cc7df58fb8..8e0b1a4e2546b 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -2470,7 +2470,8 @@ static int coda_probe(struct platform_device *pdev)
return ret;
}
 
-   dev->rstc = devm_reset_control_get_optional(&pdev->dev, NULL);
+   dev->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev,
+ NULL);
if (IS_ERR(dev->rstc)) {
ret = PTR_ERR(dev->rstc);
dev_err(&pdev->dev, "failed get reset control: %d\n", ret);
-- 
2.11.0



[PATCH] reset: make (de)assert report success for self-deasserting reset drivers

2017-07-19 Thread Philipp Zabel
By now there are drivers using shared reset controls and (de)assert
calls on platforms with self-deasserting reset lines and thus reset
drivers that do not implement .assert() and .deassert().
As long as the initial state of the reset line is deasserted, there
is no reason for a reset_control_assert call to return an error for
shared reset controls, or for a reset_control_deassert call to return
an error for either shared or exclusive reset controls: after a call
to reset_control_deassert the reset line is guaranteed to be deasserted,
and after a call to reset_control_assert it is valid for the reset
line to stay deasserted for shared reset controls.

Signed-off-by: Philipp Zabel 
Reviewed-by: Linus Walleij 
---
 drivers/reset/core.c | 31 +--
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index c8fb4426b218a..1d21c6f7d56cb 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -280,9 +280,6 @@ int reset_control_assert(struct reset_control *rstc)
if (reset_control_is_array(rstc))
return reset_control_array_assert(rstc_to_array(rstc));
 
-   if (!rstc->rcdev->ops->assert)
-   return -ENOTSUPP;
-
if (rstc->shared) {
if (WARN_ON(atomic_read(&rstc->triggered_count) != 0))
return -EINVAL;
@@ -292,6 +289,21 @@ int reset_control_assert(struct reset_control *rstc)
 
if (atomic_dec_return(&rstc->deassert_count) != 0)
return 0;
+
+   /*
+* Shared reset controls allow the reset line to be in any state
+* after this call, so doing nothing is a valid option.
+*/
+   if (!rstc->rcdev->ops->assert)
+   return 0;
+   } else {
+   /*
+* If the reset controller does not implement .assert(), there
+* is no way to guarantee that the reset line is asserted after
+* this call.
+*/
+   if (!rstc->rcdev->ops->assert)
+   return -ENOTSUPP;
}
 
return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id);
@@ -321,9 +333,6 @@ int reset_control_deassert(struct reset_control *rstc)
if (reset_control_is_array(rstc))
return reset_control_array_deassert(rstc_to_array(rstc));
 
-   if (!rstc->rcdev->ops->deassert)
-   return -ENOTSUPP;
-
if (rstc->shared) {
if (WARN_ON(atomic_read(&rstc->triggered_count) != 0))
return -EINVAL;
@@ -332,6 +341,16 @@ int reset_control_deassert(struct reset_control *rstc)
return 0;
}
 
+   /*
+* If the reset controller does not implement .deassert(), we assume
+* that it handles self-deasserting reset lines via .reset(). In that
+* case, the reset lines are deasserted by default. If that is not the
+* case, the reset controller driver should implement .deassert() and
+* return -ENOTSUPP.
+*/
+   if (!rstc->rcdev->ops->deassert)
+   return 0;
+
return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id);
 }
 EXPORT_SYMBOL_GPL(reset_control_deassert);
-- 
2.11.0



[PATCH 038/102] mmc: dw_mmc: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Jaehoon Chung 
Cc: Ulf Hansson 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/mmc/host/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index a9dfb26972f21..7c1e2dbc76776 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2950,7 +2950,7 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci 
*host)
return ERR_PTR(-ENOMEM);
 
/* find reset controller when exist */
-   pdata->rstc = devm_reset_control_get_optional(dev, "reset");
+   pdata->rstc = devm_reset_control_get_optional_exclusive(dev, "reset");
if (IS_ERR(pdata->rstc)) {
if (PTR_ERR(pdata->rstc) == -EPROBE_DEFER)
return ERR_PTR(-EPROBE_DEFER);
-- 
2.11.0



[PATCH 037/102] rc: sunxi-cir: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-me...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/media/rc/sunxi-cir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c
index 4b785dd775c11..3e033fb79463a 100644
--- a/drivers/media/rc/sunxi-cir.c
+++ b/drivers/media/rc/sunxi-cir.c
@@ -173,7 +173,7 @@ static int sunxi_ir_probe(struct platform_device *pdev)
}
 
/* Reset (optional) */
-   ir->rst = devm_reset_control_get_optional(dev, NULL);
+   ir->rst = devm_reset_control_get_optional_exclusive(dev, NULL);
if (IS_ERR(ir->rst))
return PTR_ERR(ir->rst);
ret = reset_control_deassert(ir->rst);
-- 
2.11.0



[PATCH 036/102] stm32-dcmi: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: linux-me...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/media/platform/stm32/stm32-dcmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/stm32/stm32-dcmi.c 
b/drivers/media/platform/stm32/stm32-dcmi.c
index 83d32a5d0f408..a2d883dcf32b9 100644
--- a/drivers/media/platform/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/stm32/stm32-dcmi.c
@@ -1209,7 +1209,7 @@ static int dcmi_probe(struct platform_device *pdev)
if (!dcmi)
return -ENOMEM;
 
-   dcmi->rstc = devm_reset_control_get(&pdev->dev, NULL);
+   dcmi->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(dcmi->rstc)) {
dev_err(&pdev->dev, "Could not get reset control\n");
return -ENODEV;
-- 
2.11.0



[PATCH 039/102] mmc: sdhci-st: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Patrice Chotard 
Cc: Adrian Hunter 
Cc: Ulf Hansson 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/mmc/host/sdhci-st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
index 68c36c9fa2318..ad1ab0777d5f6 100644
--- a/drivers/mmc/host/sdhci-st.c
+++ b/drivers/mmc/host/sdhci-st.c
@@ -371,7 +371,7 @@ static int sdhci_st_probe(struct platform_device *pdev)
if (IS_ERR(icnclk))
icnclk = NULL;
 
-   rstc = devm_reset_control_get(&pdev->dev, NULL);
+   rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(rstc))
rstc = NULL;
else
-- 
2.11.0



[PATCH 042/102] mtd: nand: sunxi: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Boris Brezillon 
Cc: Richard Weinberger 
Cc: David Woodhouse 
Cc: Brian Norris 
Cc: Marek Vasut 
Cc: Cyrille Pitchen 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/mtd/nand/sunxi_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index d0b6f8f9f297a..6eb97451f485c 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -2208,7 +2208,7 @@ static int sunxi_nfc_probe(struct platform_device *pdev)
if (ret)
goto out_ahb_clk_unprepare;
 
-   nfc->reset = devm_reset_control_get_optional(dev, "ahb");
+   nfc->reset = devm_reset_control_get_optional_exclusive(dev, "ahb");
if (IS_ERR(nfc->reset)) {
ret = PTR_ERR(nfc->reset);
goto out_mod_clk_unprepare;
-- 
2.11.0



[PATCH 040/102] mmc: sunxi: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Ulf Hansson 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/mmc/host/sunxi-mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index d6fa2214aaae8..522b09d446494 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1168,7 +1168,8 @@ static int sunxi_mmc_resource_request(struct 
sunxi_mmc_host *host,
}
}
 
-   host->reset = devm_reset_control_get_optional(&pdev->dev, "ahb");
+   host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
+   "ahb");
if (PTR_ERR(host->reset) == -EPROBE_DEFER)
return PTR_ERR(host->reset);
 
-- 
2.11.0



[PATCH 044/102] net: dsa: mt7530: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Andrew Lunn 
Cc: Vivien Didelot 
Cc: Florian Fainelli 
Cc: net...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/net/dsa/mt7530.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 1e46418a3b74c..657d06b3c6c47 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1044,7 +1044,8 @@ mt7530_probe(struct mdio_device *mdiodev)
if (priv->mcm) {
dev_info(&mdiodev->dev, "MT7530 adapts as multi-chip module\n");
 
-   priv->rstc = devm_reset_control_get(&mdiodev->dev, "mcm");
+   priv->rstc = devm_reset_control_get_exclusive(&mdiodev->dev,
+ "mcm");
if (IS_ERR(priv->rstc)) {
dev_err(&mdiodev->dev, "Couldn't get our reset line\n");
return PTR_ERR(priv->rstc);
-- 
2.11.0



[PATCH 047/102] net: stmmac: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Giuseppe Cavallaro 
Cc: Alexandre Torgue 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: net...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 ++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 
b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index fffd6d5fc907b..2771369c105d6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -942,7 +942,8 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
return -EINVAL;
}
 
-   gmac->rst_ephy = of_reset_control_get(plat_dat->phy_node, NULL);
+   gmac->rst_ephy = 
of_reset_control_get_exclusive(plat_dat->phy_node,
+   NULL);
if (IS_ERR(gmac->rst_ephy)) {
ret = PTR_ERR(gmac->rst_ephy);
if (ret == -EPROBE_DEFER)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c 
b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index a366b3747eeb5..5f94bbf745546 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -526,8 +526,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, const 
char **mac)
dev_dbg(&pdev->dev, "PTP rate %d\n", plat->clk_ptp_rate);
}
 
-   plat->stmmac_rst = devm_reset_control_get(&pdev->dev,
- STMMAC_RESOURCE_NAME);
+   plat->stmmac_rst = devm_reset_control_get_exclusive(&pdev->dev,
+   
STMMAC_RESOURCE_NAME);
if (IS_ERR(plat->stmmac_rst)) {
if (PTR_ERR(plat->stmmac_rst) == -EPROBE_DEFER)
goto error_hw_init;
-- 
2.11.0



[PATCH 045/102] net: ethernet: hisi_femac: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Yisen Zhuang 
Cc: Salil Mehta 
Cc: net...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/net/ethernet/hisilicon/hisi_femac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c 
b/drivers/net/ethernet/hisilicon/hisi_femac.c
index 2c2808830e957..10aa7590afd54 100644
--- a/drivers/net/ethernet/hisilicon/hisi_femac.c
+++ b/drivers/net/ethernet/hisilicon/hisi_femac.c
@@ -838,14 +838,14 @@ static int hisi_femac_drv_probe(struct platform_device 
*pdev)
goto out_free_netdev;
}
 
-   priv->mac_rst = devm_reset_control_get(dev, "mac");
+   priv->mac_rst = devm_reset_control_get_exclusive(dev, "mac");
if (IS_ERR(priv->mac_rst)) {
ret = PTR_ERR(priv->mac_rst);
goto out_disable_clk;
}
hisi_femac_core_reset(priv);
 
-   priv->phy_rst = devm_reset_control_get(dev, "phy");
+   priv->phy_rst = devm_reset_control_get_exclusive(dev, "phy");
if (IS_ERR(priv->phy_rst)) {
priv->phy_rst = NULL;
} else {
-- 
2.11.0



[PATCH 043/102] mtd: spi-nor: stm32-quadspi: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Cyrille Pitchen 
Cc: Marek Vasut 
Cc: David Woodhouse 
Cc: Brian Norris 
Cc: Boris Brezillon 
Cc: Richard Weinberger 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: linux-...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/mtd/spi-nor/stm32-quadspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/stm32-quadspi.c 
b/drivers/mtd/spi-nor/stm32-quadspi.c
index 86c0931543c53..a367c56deb3cc 100644
--- a/drivers/mtd/spi-nor/stm32-quadspi.c
+++ b/drivers/mtd/spi-nor/stm32-quadspi.c
@@ -633,7 +633,7 @@ static int stm32_qspi_probe(struct platform_device *pdev)
return ret;
}
 
-   rstc = devm_reset_control_get(dev, NULL);
+   rstc = devm_reset_control_get_exclusive(dev, NULL);
if (!IS_ERR(rstc)) {
reset_control_assert(rstc);
udelay(2);
-- 
2.11.0



[PATCH 048/102] net: stmmac: dwc-qos: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Giuseppe Cavallaro 
Cc: Alexandre Torgue 
Cc: net...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c 
b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
index dd6a2f9791cc1..cf4e0f09c0361 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -339,7 +339,7 @@ static void *tegra_eqos_probe(struct platform_device *pdev,
usleep_range(2000, 4000);
gpiod_set_value(eqos->reset, 0);
 
-   eqos->rst = devm_reset_control_get(&pdev->dev, "eqos");
+   eqos->rst = devm_reset_control_get_exclusive(&pdev->dev, "eqos");
if (IS_ERR(eqos->rst)) {
err = PTR_ERR(eqos->rst);
goto reset_phy;
-- 
2.11.0



[PATCH 050/102] nvmem: lpc18xx-eeprom: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Srinivas Kandagatla 
Cc: Joachim Eastwood 
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/nvmem/lpc18xx_eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/lpc18xx_eeprom.c b/drivers/nvmem/lpc18xx_eeprom.c
index c81ae4c6da74c..6c7e2c424a4e8 100644
--- a/drivers/nvmem/lpc18xx_eeprom.c
+++ b/drivers/nvmem/lpc18xx_eeprom.c
@@ -197,7 +197,7 @@ static int lpc18xx_eeprom_probe(struct platform_device 
*pdev)
return ret;
}
 
-   rst = devm_reset_control_get(dev, NULL);
+   rst = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(rst)) {
dev_err(dev, "failed to get reset: %ld\n", PTR_ERR(rst));
ret = PTR_ERR(rst);
-- 
2.11.0



[PATCH 046/102] net: ethernet: hix5hd2_gmac: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Yisen Zhuang 
Cc: Salil Mehta 
Cc: net...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c 
b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
index 25a6c8722ecac..02b7e2f490099 100644
--- a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
+++ b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
@@ -1161,16 +1161,16 @@ static int hix5hd2_dev_probe(struct platform_device 
*pdev)
goto out_disable_mac_core_clk;
}
 
-   priv->mac_core_rst = devm_reset_control_get(dev, "mac_core");
+   priv->mac_core_rst = devm_reset_control_get_exclusive(dev, "mac_core");
if (IS_ERR(priv->mac_core_rst))
priv->mac_core_rst = NULL;
hix5hd2_mac_core_reset(priv);
 
-   priv->mac_ifc_rst = devm_reset_control_get(dev, "mac_ifc");
+   priv->mac_ifc_rst = devm_reset_control_get_exclusive(dev, "mac_ifc");
if (IS_ERR(priv->mac_ifc_rst))
priv->mac_ifc_rst = NULL;
 
-   priv->phy_rst = devm_reset_control_get(dev, "phy");
+   priv->phy_rst = devm_reset_control_get_exclusive(dev, "phy");
if (IS_ERR(priv->phy_rst)) {
priv->phy_rst = NULL;
} else {
-- 
2.11.0



[PATCH 052/102] PCI: imx6: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Richard Zhu 
Cc: Lucas Stach 
Cc: Bjorn Helgaas 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/pci/dwc/pci-imx6.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/dwc/pci-imx6.c b/drivers/pci/dwc/pci-imx6.c
index bf5c3616e3448..5a2ece394ad39 100644
--- a/drivers/pci/dwc/pci-imx6.c
+++ b/drivers/pci/dwc/pci-imx6.c
@@ -778,14 +778,15 @@ static int imx6_pcie_probe(struct platform_device *pdev)
}
break;
case IMX7D:
-   imx6_pcie->pciephy_reset = devm_reset_control_get(dev,
- "pciephy");
+   imx6_pcie->pciephy_reset = devm_reset_control_get_exclusive(dev,
+   
"pciephy");
if (IS_ERR(imx6_pcie->pciephy_reset)) {
dev_err(dev, "Failed to get PCIEPHY reset control\n");
return PTR_ERR(imx6_pcie->pciephy_reset);
}
 
-   imx6_pcie->apps_reset = devm_reset_control_get(dev, "apps");
+   imx6_pcie->apps_reset = devm_reset_control_get_exclusive(dev,
+
"apps");
if (IS_ERR(imx6_pcie->apps_reset)) {
dev_err(dev, "Failed to get PCIE APPS reset control\n");
return PTR_ERR(imx6_pcie->apps_reset);
-- 
2.11.0



Re: [PATCH] ARC: reset: introduce HSDKv1 reset driver

2017-07-19 Thread Philipp Zabel
Hi Eugeniy,

On Wed, 2017-07-19 at 15:32 +, Eugeniy Paltsev wrote:
> Hi Philipp,
> 
> On Wed, 2017-07-19 at 17:07 +0200, Philipp Zabel wrote:
> > On Tue, 2017-07-18 at 20:25 +0300, Eugeniy Paltsev wrote:
> > > The HSDK v1 periphery IPs can be reset by accessing some registers
> > > from the CGU block.
> > > 
> > > The list of available reset lines is documented in the DT bindings.
> > > 
> > > [snip]
> > > --- a/drivers/reset/Kconfig
> > > +++ b/drivers/reset/Kconfig
> > > @@ -34,6 +34,12 @@ config RESET_BERLIN
> > >   help
> > > This enables the reset controller driver for Marvell
> > > Berlin SoCs.
> > >  
> > > +config RESET_HSDK_V1
> > > + bool "HSDK v1 Reset Driver"
> > > + default n
> > 
> > I suppose there will be a SOC_HSDK_V1 or similar in the future so
> > that
> > we can hide this option and enable it by default like the other reset
> > drivers?
> Actually we don't have (and don't planning to add) such SOC/board-
> specific kconfig option, so I am wondering if it is OK to just left
> this option not hidden?

Not a problem, I just prefer to enable reset controllers by default when
building kernels for SoCs that may need them. Sometimes they are even
necessary to boot the system. In those cases, allowing to disable the
reset controller driver at all is not very helpful.

regards
Philipp



[PATCH 055/102] phy: berlin-usb: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Signed-off-by: Philipp Zabel 
---
 drivers/phy/marvell/phy-berlin-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/marvell/phy-berlin-usb.c 
b/drivers/phy/marvell/phy-berlin-usb.c
index 2017751ede263..d4473ecd1f6b8 100644
--- a/drivers/phy/marvell/phy-berlin-usb.c
+++ b/drivers/phy/marvell/phy-berlin-usb.c
@@ -181,7 +181,7 @@ static int phy_berlin_usb_probe(struct platform_device 
*pdev)
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
 
-   priv->rst_ctrl = devm_reset_control_get(&pdev->dev, NULL);
+   priv->rst_ctrl = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(priv->rst_ctrl))
return PTR_ERR(priv->rst_ctrl);
 
-- 
2.11.0



[PATCH 059/102] phy: rockchip-typec: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Cc: Heiko Stuebner 
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/phy/rockchip/phy-rockchip-typec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c 
b/drivers/phy/rockchip/phy-rockchip-typec.c
index 7cfb0f8995de8..caf046e1348d1 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -888,19 +888,19 @@ static int tcphy_parse_dt(struct rockchip_typec_phy 
*tcphy,
return PTR_ERR(tcphy->clk_ref);
}
 
-   tcphy->uphy_rst = devm_reset_control_get(dev, "uphy");
+   tcphy->uphy_rst = devm_reset_control_get_exclusive(dev, "uphy");
if (IS_ERR(tcphy->uphy_rst)) {
dev_err(dev, "no uphy_rst reset control found\n");
return PTR_ERR(tcphy->uphy_rst);
}
 
-   tcphy->pipe_rst = devm_reset_control_get(dev, "uphy-pipe");
+   tcphy->pipe_rst = devm_reset_control_get_exclusive(dev, "uphy-pipe");
if (IS_ERR(tcphy->pipe_rst)) {
dev_err(dev, "no pipe_rst reset control found\n");
return PTR_ERR(tcphy->pipe_rst);
}
 
-   tcphy->tcphy_rst = devm_reset_control_get(dev, "uphy-tcphy");
+   tcphy->tcphy_rst = devm_reset_control_get_exclusive(dev, "uphy-tcphy");
if (IS_ERR(tcphy->tcphy_rst)) {
dev_err(dev, "no tcphy_rst reset control found\n");
return PTR_ERR(tcphy->tcphy_rst);
-- 
2.11.0



[PATCH 070/102] pwm: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/pwm/pwm-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
index e9b33f09ff096..f8ebbece57b71 100644
--- a/drivers/pwm/pwm-tegra.c
+++ b/drivers/pwm/pwm-tegra.c
@@ -218,7 +218,7 @@ static int tegra_pwm_probe(struct platform_device *pdev)
 */
pwm->clk_rate = clk_get_rate(pwm->clk);
 
-   pwm->rst = devm_reset_control_get(&pdev->dev, "pwm");
+   pwm->rst = devm_reset_control_get_exclusive(&pdev->dev, "pwm");
if (IS_ERR(pwm->rst)) {
ret = PTR_ERR(pwm->rst);
dev_err(&pdev->dev, "Reset control is not found: %d\n", ret);
-- 
2.11.0



[PATCH 058/102] phy: rockchip-pcie: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Cc: Heiko Stuebner 
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/phy/rockchip/phy-rockchip-pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-pcie.c 
b/drivers/phy/rockchip/phy-rockchip-pcie.c
index 6904633cad687..258220b7f481c 100644
--- a/drivers/phy/rockchip/phy-rockchip-pcie.c
+++ b/drivers/phy/rockchip/phy-rockchip-pcie.c
@@ -305,7 +305,7 @@ static int rockchip_pcie_phy_probe(struct platform_device 
*pdev)
rk_phy->phy_data = (struct rockchip_pcie_data *)of_id->data;
rk_phy->reg_base = grf;
 
-   rk_phy->phy_rst = devm_reset_control_get(dev, "phy");
+   rk_phy->phy_rst = devm_reset_control_get_exclusive(dev, "phy");
if (IS_ERR(rk_phy->phy_rst)) {
if (PTR_ERR(rk_phy->phy_rst) != -EPROBE_DEFER)
dev_err(dev,
-- 
2.11.0



[PATCH 051/102] PCI: dwc: pcie-qcom: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Stanimir Varbanov 
Cc: Bjorn Helgaas 
Cc: linux-...@vger.kernel.org
Cc: linux-arm-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/pci/dwc/pcie-qcom.c | 40 ++--
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c
index 68c5f2ab5bc8f..90f7796a7cffe 100644
--- a/drivers/pci/dwc/pcie-qcom.c
+++ b/drivers/pci/dwc/pcie-qcom.c
@@ -212,23 +212,23 @@ static int qcom_pcie_get_resources_v0(struct qcom_pcie 
*pcie)
if (IS_ERR(res->phy_clk))
return PTR_ERR(res->phy_clk);
 
-   res->pci_reset = devm_reset_control_get(dev, "pci");
+   res->pci_reset = devm_reset_control_get_exclusive(dev, "pci");
if (IS_ERR(res->pci_reset))
return PTR_ERR(res->pci_reset);
 
-   res->axi_reset = devm_reset_control_get(dev, "axi");
+   res->axi_reset = devm_reset_control_get_exclusive(dev, "axi");
if (IS_ERR(res->axi_reset))
return PTR_ERR(res->axi_reset);
 
-   res->ahb_reset = devm_reset_control_get(dev, "ahb");
+   res->ahb_reset = devm_reset_control_get_exclusive(dev, "ahb");
if (IS_ERR(res->ahb_reset))
return PTR_ERR(res->ahb_reset);
 
-   res->por_reset = devm_reset_control_get(dev, "por");
+   res->por_reset = devm_reset_control_get_exclusive(dev, "por");
if (IS_ERR(res->por_reset))
return PTR_ERR(res->por_reset);
 
-   res->phy_reset = devm_reset_control_get(dev, "phy");
+   res->phy_reset = devm_reset_control_get_exclusive(dev, "phy");
return PTR_ERR_OR_ZERO(res->phy_reset);
 }
 
@@ -393,7 +393,7 @@ static int qcom_pcie_get_resources_v1(struct qcom_pcie 
*pcie)
if (IS_ERR(res->slave_bus))
return PTR_ERR(res->slave_bus);
 
-   res->core = devm_reset_control_get(dev, "core");
+   res->core = devm_reset_control_get_exclusive(dev, "core");
return PTR_ERR_OR_ZERO(res->core);
 }
 
@@ -623,51 +623,55 @@ static int qcom_pcie_get_resources_v3(struct qcom_pcie 
*pcie)
if (IS_ERR(res->slave_clk))
return PTR_ERR(res->slave_clk);
 
-   res->axi_m_reset = devm_reset_control_get(dev, "axi_m");
+   res->axi_m_reset = devm_reset_control_get_exclusive(dev, "axi_m");
if (IS_ERR(res->axi_m_reset))
return PTR_ERR(res->axi_m_reset);
 
-   res->axi_s_reset = devm_reset_control_get(dev, "axi_s");
+   res->axi_s_reset = devm_reset_control_get_exclusive(dev, "axi_s");
if (IS_ERR(res->axi_s_reset))
return PTR_ERR(res->axi_s_reset);
 
-   res->pipe_reset = devm_reset_control_get(dev, "pipe");
+   res->pipe_reset = devm_reset_control_get_exclusive(dev, "pipe");
if (IS_ERR(res->pipe_reset))
return PTR_ERR(res->pipe_reset);
 
-   res->axi_m_vmid_reset = devm_reset_control_get(dev, "axi_m_vmid");
+   res->axi_m_vmid_reset = devm_reset_control_get_exclusive(dev,
+"axi_m_vmid");
if (IS_ERR(res->axi_m_vmid_reset))
return PTR_ERR(res->axi_m_vmid_reset);
 
-   res->axi_s_xpu_reset = devm_reset_control_get(dev, "axi_s_xpu");
+   res->axi_s_xpu_reset = devm_reset_control_get_exclusive(dev,
+   "axi_s_xpu");
if (IS_ERR(res->axi_s_xpu_reset))
return PTR_ERR(res->axi_s_xpu_reset);
 
-   res->parf_reset = devm_reset_control_get(dev, "parf");
+   res->parf_reset = devm_reset_control_get_exclusive(dev, "parf");
if (IS_ERR(res->parf_reset))
return PTR_ERR(res->parf_reset);
 
-   res->phy_reset = devm_reset_control_get(dev, "phy");
+   res->phy_reset = devm_reset_control_get_exclusive(dev, "phy");
if (IS_ERR(res->phy_reset))
return PTR_ERR(res->phy_reset);
 
-   res->axi_m_sticky_reset = devm_reset_control_get(dev, "axi_m_sticky");
+   res->axi_m_sticky_reset = devm_reset_control_get_exclusive(dev,
+   

[PATCH 054/102] PCI: rockchip: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Shawn Lin 
Cc: Bjorn Helgaas 
Cc: Heiko Stuebner 
Cc: linux-...@vger.kernel.org
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/pci/host/pcie-rockchip.c | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
index 7bb9870f6d8ce..e50d6f5a81f4b 100644
--- a/drivers/pci/host/pcie-rockchip.c
+++ b/drivers/pci/host/pcie-rockchip.c
@@ -903,49 +903,50 @@ static int rockchip_pcie_parse_dt(struct rockchip_pcie 
*rockchip)
if (rockchip->link_gen < 0 || rockchip->link_gen > 2)
rockchip->link_gen = 2;
 
-   rockchip->core_rst = devm_reset_control_get(dev, "core");
+   rockchip->core_rst = devm_reset_control_get_exclusive(dev, "core");
if (IS_ERR(rockchip->core_rst)) {
if (PTR_ERR(rockchip->core_rst) != -EPROBE_DEFER)
dev_err(dev, "missing core reset property in node\n");
return PTR_ERR(rockchip->core_rst);
}
 
-   rockchip->mgmt_rst = devm_reset_control_get(dev, "mgmt");
+   rockchip->mgmt_rst = devm_reset_control_get_exclusive(dev, "mgmt");
if (IS_ERR(rockchip->mgmt_rst)) {
if (PTR_ERR(rockchip->mgmt_rst) != -EPROBE_DEFER)
dev_err(dev, "missing mgmt reset property in node\n");
return PTR_ERR(rockchip->mgmt_rst);
}
 
-   rockchip->mgmt_sticky_rst = devm_reset_control_get(dev, "mgmt-sticky");
+   rockchip->mgmt_sticky_rst = devm_reset_control_get_exclusive(dev,
+
"mgmt-sticky");
if (IS_ERR(rockchip->mgmt_sticky_rst)) {
if (PTR_ERR(rockchip->mgmt_sticky_rst) != -EPROBE_DEFER)
dev_err(dev, "missing mgmt-sticky reset property in 
node\n");
return PTR_ERR(rockchip->mgmt_sticky_rst);
}
 
-   rockchip->pipe_rst = devm_reset_control_get(dev, "pipe");
+   rockchip->pipe_rst = devm_reset_control_get_exclusive(dev, "pipe");
if (IS_ERR(rockchip->pipe_rst)) {
if (PTR_ERR(rockchip->pipe_rst) != -EPROBE_DEFER)
dev_err(dev, "missing pipe reset property in node\n");
return PTR_ERR(rockchip->pipe_rst);
}
 
-   rockchip->pm_rst = devm_reset_control_get(dev, "pm");
+   rockchip->pm_rst = devm_reset_control_get_exclusive(dev, "pm");
if (IS_ERR(rockchip->pm_rst)) {
if (PTR_ERR(rockchip->pm_rst) != -EPROBE_DEFER)
dev_err(dev, "missing pm reset property in node\n");
return PTR_ERR(rockchip->pm_rst);
}
 
-   rockchip->pclk_rst = devm_reset_control_get(dev, "pclk");
+   rockchip->pclk_rst = devm_reset_control_get_exclusive(dev, "pclk");
if (IS_ERR(rockchip->pclk_rst)) {
if (PTR_ERR(rockchip->pclk_rst) != -EPROBE_DEFER)
dev_err(dev, "missing pclk reset property in node\n");
return PTR_ERR(rockchip->pclk_rst);
}
 
-   rockchip->aclk_rst = devm_reset_control_get(dev, "aclk");
+   rockchip->aclk_rst = devm_reset_control_get_exclusive(dev, "aclk");
if (IS_ERR(rockchip->aclk_rst)) {
if (PTR_ERR(rockchip->aclk_rst) != -EPROBE_DEFER)
dev_err(dev, "missing aclk reset property in node\n");
-- 
2.11.0



[PATCH 060/102] phy: rockchip-usb: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Cc: Heiko Stuebner 
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/phy/rockchip/phy-rockchip-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-usb.c 
b/drivers/phy/rockchip/phy-rockchip-usb.c
index 3378eeb7a562f..e8907ab926401 100644
--- a/drivers/phy/rockchip/phy-rockchip-usb.c
+++ b/drivers/phy/rockchip/phy-rockchip-usb.c
@@ -213,7 +213,7 @@ static int rockchip_usb_phy_init(struct 
rockchip_usb_phy_base *base,
return -EINVAL;
}
 
-   rk_phy->reset = of_reset_control_get(child, "phy-reset");
+   rk_phy->reset = of_reset_control_get_exclusive(child, "phy-reset");
if (IS_ERR(rk_phy->reset))
rk_phy->reset = NULL;
 
-- 
2.11.0



[PATCH 056/102] PCI: mediatek: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Ryder Lee 
Cc: Bjorn Helgaas 
Cc: Matthias Brugger 
Cc: linux-...@vger.kernel.org
Cc: linux-media...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/pci/host/pcie-mediatek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
index 5a9d8589ea0bd..9c9f89bcf24ce 100644
--- a/drivers/pci/host/pcie-mediatek.c
+++ b/drivers/pci/host/pcie-mediatek.c
@@ -303,7 +303,7 @@ static int mtk_pcie_parse_ports(struct mtk_pcie *pcie,
}
 
snprintf(name, sizeof(name), "pcie-rst%d", index);
-   port->reset = devm_reset_control_get_optional(dev, name);
+   port->reset = devm_reset_control_get_optional_exclusive(dev, name);
if (PTR_ERR(port->reset) == -EPROBE_DEFER)
return PTR_ERR(port->reset);
 
-- 
2.11.0



[PATCH 057/102] phy: qcom-usb-hs: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/phy/qualcomm/phy-qcom-usb-hs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hs.c 
b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
index 4b20abc3ae2f5..d56dd526feec0 100644
--- a/drivers/phy/qualcomm/phy-qcom-usb-hs.c
+++ b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
@@ -250,7 +250,8 @@ static int qcom_usb_hs_phy_probe(struct ulpi *ulpi)
if (IS_ERR(reg))
return PTR_ERR(reg);
 
-   uphy->reset = reset = devm_reset_control_get(&ulpi->dev, "por");
+   uphy->reset = reset = devm_reset_control_get_exclusive(&ulpi->dev,
+  "por");
if (IS_ERR(reset)) {
if (PTR_ERR(reset) == -EPROBE_DEFER)
return PTR_ERR(reset);
-- 
2.11.0



[PATCH 061/102] phy: sun4i-usb: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/phy/allwinner/phy-sun4i-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c 
b/drivers/phy/allwinner/phy-sun4i-usb.c
index bbf06cfe5898c..6b3c76e279c9b 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -707,7 +707,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
}
 
snprintf(name, sizeof(name), "usb%d_reset", i);
-   phy->reset = devm_reset_control_get(dev, name);
+   phy->reset = devm_reset_control_get_exclusive(dev, name);
if (IS_ERR(phy->reset)) {
dev_err(dev, "failed to get reset %s\n", name);
return PTR_ERR(phy->reset);
-- 
2.11.0



[PATCH 065/102] phy: qcom-qusb2: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Signed-off-by: Philipp Zabel 
---
 drivers/phy/qualcomm/phy-qcom-qusb2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c 
b/drivers/phy/qualcomm/phy-qcom-qusb2.c
index 6c575244c0fb9..b7c6984ed5259 100644
--- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
+++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
@@ -426,7 +426,8 @@ static int qusb2_phy_probe(struct platform_device *pdev)
dev_dbg(dev, "failed to get iface clk, %d\n", ret);
}
 
-   qphy->phy_reset = devm_reset_control_get_by_index(&pdev->dev, 0);
+   qphy->phy_reset = devm_reset_control_get_exclusive_by_index(&pdev->dev,
+   0);
if (IS_ERR(qphy->phy_reset)) {
dev_err(dev, "failed to get phy core reset\n");
return PTR_ERR(qphy->phy_reset);
-- 
2.11.0



[PATCH 062/102] phy: sun9i-usb: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/phy/allwinner/phy-sun9i-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/allwinner/phy-sun9i-usb.c 
b/drivers/phy/allwinner/phy-sun9i-usb.c
index 28fce4bce638e..a07aa04a88ed8 100644
--- a/drivers/phy/allwinner/phy-sun9i-usb.c
+++ b/drivers/phy/allwinner/phy-sun9i-usb.c
@@ -146,7 +146,7 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(phy->hsic_clk);
}
 
-   phy->reset = devm_reset_control_get(dev, "hsic");
+   phy->reset = devm_reset_control_get_exclusive(dev, "hsic");
if (IS_ERR(phy->reset)) {
dev_err(dev, "failed to get reset control\n");
return PTR_ERR(phy->reset);
@@ -158,7 +158,7 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(phy->clk);
}
 
-   phy->reset = devm_reset_control_get(dev, "phy");
+   phy->reset = devm_reset_control_get_exclusive(dev, "phy");
if (IS_ERR(phy->reset)) {
dev_err(dev, "failed to get reset control\n");
return PTR_ERR(phy->reset);
-- 
2.11.0



[PATCH 064/102] phy: qcom-qmp: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Signed-off-by: Philipp Zabel 
---
 drivers/phy/qualcomm/phy-qcom-qmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c 
b/drivers/phy/qualcomm/phy-qcom-qmp.c
index 78ca62897784a..9f8bcf7743ddf 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -868,7 +868,7 @@ static int qcom_qmp_phy_reset_init(struct device *dev)
struct reset_control *rst;
const char *name = qmp->cfg->reset_list[i];
 
-   rst = devm_reset_control_get(dev, name);
+   rst = devm_reset_control_get_exclusive(dev, name);
if (IS_ERR(rst)) {
dev_err(dev, "failed to get %s reset\n", name);
return PTR_ERR(rst);
@@ -1019,7 +1019,7 @@ int qcom_qmp_phy_create(struct device *dev, struct 
device_node *np, int id)
/* Get lane reset, if any */
if (qmp->cfg->has_lane_rst) {
snprintf(prop_name, sizeof(prop_name), "lane%d", id);
-   qphy->lane_rst = of_reset_control_get(np, prop_name);
+   qphy->lane_rst = of_reset_control_get_exclusive(np, prop_name);
if (IS_ERR(qphy->lane_rst)) {
dev_err(dev, "failed to get lane%d reset\n", id);
return PTR_ERR(qphy->lane_rst);
-- 
2.11.0



[PATCH 063/102] phy: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kishon Vijay Abraham I 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/phy/tegra/xusb-tegra210.c | 4 ++--
 drivers/phy/tegra/xusb.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/tegra/xusb-tegra210.c 
b/drivers/phy/tegra/xusb-tegra210.c
index 9d0689ebd28c6..9a9ea17218900 100644
--- a/drivers/phy/tegra/xusb-tegra210.c
+++ b/drivers/phy/tegra/xusb-tegra210.c
@@ -1557,7 +1557,7 @@ tegra210_pcie_pad_probe(struct tegra_xusb_padctl *padctl,
goto unregister;
}
 
-   pcie->rst = devm_reset_control_get(&pad->dev, "phy");
+   pcie->rst = devm_reset_control_get_exclusive(&pad->dev, "phy");
if (IS_ERR(pcie->rst)) {
err = PTR_ERR(pcie->rst);
dev_err(&pad->dev, "failed to get PCIe pad reset: %d\n", err);
@@ -1721,7 +1721,7 @@ tegra210_sata_pad_probe(struct tegra_xusb_padctl *padctl,
goto out;
}
 
-   sata->rst = devm_reset_control_get(&pad->dev, "phy");
+   sata->rst = devm_reset_control_get_exclusive(&pad->dev, "phy");
if (IS_ERR(sata->rst)) {
err = PTR_ERR(sata->rst);
dev_err(&pad->dev, "failed to get SATA pad reset: %d\n", err);
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 3cbcb25376576..3b729fa27cf35 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -881,7 +881,7 @@ static int tegra_xusb_padctl_probe(struct platform_device 
*pdev)
goto remove;
}
 
-   padctl->rst = devm_reset_control_get(&pdev->dev, NULL);
+   padctl->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(padctl->rst)) {
err = PTR_ERR(padctl->rst);
goto remove;
-- 
2.11.0



[PATCH 066/102] pinctrl: stm32: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Linus Walleij 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: linux-g...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c 
b/drivers/pinctrl/stm32/pinctrl-stm32.c
index 06431ff49ffb2..50299ad966590 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -952,7 +952,7 @@ static int stm32_gpiolib_register_bank(struct stm32_pinctrl 
*pctl,
int npins = STM32_GPIO_PINS_PER_BANK;
int bank_nr, err;
 
-   rstc = of_reset_control_get(np, NULL);
+   rstc = of_reset_control_get_exclusive(np, NULL);
if (!IS_ERR(rstc))
reset_control_deassert(rstc);
 
-- 
2.11.0



[PATCH 067/102] pinctrl: sunxi: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: Linus Walleij 
Cc: linux-g...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c 
b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c
index a22bd88a1f03e..92c0ddc652959 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c
@@ -113,7 +113,7 @@ static int sun6i_a31_r_pinctrl_probe(struct platform_device 
*pdev)
struct reset_control *rstc;
int ret;
 
-   rstc = devm_reset_control_get(&pdev->dev, NULL);
+   rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(rstc)) {
dev_err(&pdev->dev, "Reset controller missing\n");
return PTR_ERR(rstc);
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c 
b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
index 2292e05a397b4..2e113ca78f959 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
@@ -100,7 +100,7 @@ static int sun8i_a23_r_pinctrl_probe(struct platform_device 
*pdev)
struct reset_control *rstc;
int ret;
 
-   rstc = devm_reset_control_get(&pdev->dev, NULL);
+   rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(rstc)) {
dev_err(&pdev->dev, "Reset controller missing\n");
return PTR_ERR(rstc);
-- 
2.11.0



[PATCH 069/102] pwm: hibvt: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Thierry Reding 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/pwm/pwm-hibvt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-hibvt.c b/drivers/pwm/pwm-hibvt.c
index 8dadc58d6cdfe..27c107e78d59a 100644
--- a/drivers/pwm/pwm-hibvt.c
+++ b/drivers/pwm/pwm-hibvt.c
@@ -208,7 +208,7 @@ static int hibvt_pwm_probe(struct platform_device *pdev)
if (ret < 0)
return ret;
 
-   pwm_chip->rstc = devm_reset_control_get(&pdev->dev, NULL);
+   pwm_chip->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(pwm_chip->rstc)) {
clk_disable_unprepare(pwm_chip->clk);
return PTR_ERR(pwm_chip->rstc);
-- 
2.11.0



[PATCH 071/102] remoteproc/keystone: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Ohad Ben-Cohen 
Cc: Bjorn Andersson 
Cc: linux-remotep...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/remoteproc/keystone_remoteproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/keystone_remoteproc.c 
b/drivers/remoteproc/keystone_remoteproc.c
index 5f776bfd674a0..920fef072b364 100644
--- a/drivers/remoteproc/keystone_remoteproc.c
+++ b/drivers/remoteproc/keystone_remoteproc.c
@@ -410,7 +410,7 @@ static int keystone_rproc_probe(struct platform_device 
*pdev)
if (ret)
goto free_rproc;
 
-   ksproc->reset = devm_reset_control_get(dev, NULL);
+   ksproc->reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(ksproc->reset)) {
ret = PTR_ERR(ksproc->reset);
goto free_rproc;
-- 
2.11.0



[PATCH 072/102] remoteproc: qcom: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Ohad Ben-Cohen 
Cc: Bjorn Andersson 
Cc: linux-remotep...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/remoteproc/qcom_q6v5_pil.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/remoteproc/qcom_q6v5_pil.c 
b/drivers/remoteproc/qcom_q6v5_pil.c
index 8fd697a3cf8f9..f156dfc463d85 100644
--- a/drivers/remoteproc/qcom_q6v5_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pil.c
@@ -867,7 +867,8 @@ static int q6v5_init_clocks(struct device *dev, struct clk 
**clks,
 
 static int q6v5_init_reset(struct q6v5 *qproc)
 {
-   qproc->mss_restart = devm_reset_control_get(qproc->dev, NULL);
+   qproc->mss_restart = devm_reset_control_get_exclusive(qproc->dev,
+ NULL);
if (IS_ERR(qproc->mss_restart)) {
dev_err(qproc->dev, "failed to acquire mss restart\n");
return PTR_ERR(qproc->mss_restart);
-- 
2.11.0



[PATCH 074/102] soc: mediatek: PMIC wrap: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Matthias Brugger 
Cc: linux-media...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c 
b/drivers/soc/mediatek/mtk-pmic-wrap.c
index c80a04e1b2b16..05496ba674517 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -1145,7 +1145,7 @@ static int pwrap_probe(struct platform_device *pdev)
if (IS_ERR(wrp->base))
return PTR_ERR(wrp->base);
 
-   wrp->rstc = devm_reset_control_get(wrp->dev, "pwrap");
+   wrp->rstc = devm_reset_control_get_exclusive(wrp->dev, "pwrap");
if (IS_ERR(wrp->rstc)) {
ret = PTR_ERR(wrp->rstc);
dev_dbg(wrp->dev, "cannot get pwrap reset: %d\n", ret);
@@ -1159,7 +1159,8 @@ static int pwrap_probe(struct platform_device *pdev)
if (IS_ERR(wrp->bridge_base))
return PTR_ERR(wrp->bridge_base);
 
-   wrp->rstc_bridge = devm_reset_control_get(wrp->dev, 
"pwrap-bridge");
+   wrp->rstc_bridge = devm_reset_control_get_exclusive(wrp->dev,
+   
"pwrap-bridge");
if (IS_ERR(wrp->rstc_bridge)) {
ret = PTR_ERR(wrp->rstc_bridge);
dev_dbg(wrp->dev, "cannot get pwrap-bridge reset: 
%d\n", ret);
-- 
2.11.0



[PATCH 077/102] spi: sun6i: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Mark Brown 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/spi/spi-sun6i.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
index 03a773a9531a9..fb38234249a80 100644
--- a/drivers/spi/spi-sun6i.c
+++ b/drivers/spi/spi-sun6i.c
@@ -502,7 +502,7 @@ static int sun6i_spi_probe(struct platform_device *pdev)
 
init_completion(&sspi->done);
 
-   sspi->rstc = devm_reset_control_get(&pdev->dev, NULL);
+   sspi->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(sspi->rstc)) {
dev_err(&pdev->dev, "Couldn't get reset controller\n");
ret = PTR_ERR(sspi->rstc);
-- 
2.11.0



[PATCH 078/102] spi: tegra20-slink: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Laxman Dewangan 
Cc: Mark Brown 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/spi/spi-tegra20-slink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index 0c06ce424210a..3e12d5f87ee44 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1081,7 +1081,7 @@ static int tegra_slink_probe(struct platform_device *pdev)
goto exit_free_irq;
}
 
-   tspi->rst = devm_reset_control_get(&pdev->dev, "spi");
+   tspi->rst = devm_reset_control_get_exclusive(&pdev->dev, "spi");
if (IS_ERR(tspi->rst)) {
dev_err(&pdev->dev, "can not get reset\n");
ret = PTR_ERR(tspi->rst);
-- 
2.11.0



[PATCH 079/102] spi: tegra114: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Laxman Dewangan 
Cc: Mark Brown 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/spi/spi-tegra114.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c
index 08012ae5aa66e..44550182a4a36 100644
--- a/drivers/spi/spi-tegra114.c
+++ b/drivers/spi/spi-tegra114.c
@@ -1083,7 +1083,7 @@ static int tegra_spi_probe(struct platform_device *pdev)
goto exit_free_irq;
}
 
-   tspi->rst = devm_reset_control_get(&pdev->dev, "spi");
+   tspi->rst = devm_reset_control_get_exclusive(&pdev->dev, "spi");
if (IS_ERR(tspi->rst)) {
dev_err(&pdev->dev, "can not get reset\n");
ret = PTR_ERR(tspi->rst);
-- 
2.11.0



[PATCH 080/102] spi: tegra20-sflash: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Laxman Dewangan 
Cc: Mark Brown 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/spi/spi-tegra20-sflash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
index 2c797ee2664de..22893a7e0aa0e 100644
--- a/drivers/spi/spi-tegra20-sflash.c
+++ b/drivers/spi/spi-tegra20-sflash.c
@@ -485,7 +485,7 @@ static int tegra_sflash_probe(struct platform_device *pdev)
goto exit_free_irq;
}
 
-   tsd->rst = devm_reset_control_get(&pdev->dev, "spi");
+   tsd->rst = devm_reset_control_get_exclusive(&pdev->dev, "spi");
if (IS_ERR(tsd->rst)) {
dev_err(&pdev->dev, "can not get reset\n");
ret = PTR_ERR(tsd->rst);
-- 
2.11.0



[PATCH 075/102] soc/tegra: pmc: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/soc/tegra/pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index e233dd5dcab3d..ee2c3482e9242 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -768,7 +768,7 @@ static int tegra_powergate_of_get_resets(struct 
tegra_powergate *pg,
return -ENOMEM;
 
for (i = 0; i < count; i++) {
-   pg->resets[i] = of_reset_control_get_by_index(np, i);
+   pg->resets[i] = of_reset_control_get_exclusive_by_index(np, i);
if (IS_ERR(pg->resets[i])) {
err = PTR_ERR(pg->resets[i]);
goto error;
-- 
2.11.0



[PATCH 081/102] staging: nvec: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Marc Dietrich 
Cc: Greg Kroah-Hartman 
Cc: linux-te...@vger.kernel.org
Cc: de...@driverdev.osuosl.org
Signed-off-by: Philipp Zabel 
---
 drivers/staging/nvec/nvec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index c1feccf8d94af..4ff8f47385dae 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -831,7 +831,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
return -ENODEV;
}
 
-   nvec->rst = devm_reset_control_get(&pdev->dev, "i2c");
+   nvec->rst = devm_reset_control_get_exclusive(&pdev->dev, "i2c");
if (IS_ERR(nvec->rst)) {
dev_err(nvec->dev, "failed to get controller reset\n");
return PTR_ERR(nvec->rst);
-- 
2.11.0



[PATCH 082/102] thermal: rockchip: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Zhang Rui 
Cc: Eduardo Valentin 
Cc: Heiko Stuebner 
Cc: linux...@vger.kernel.org
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/thermal/rockchip_thermal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/rockchip_thermal.c 
b/drivers/thermal/rockchip_thermal.c
index 4c77965124535..7ca53a4368124 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -1088,7 +1088,8 @@ static int rockchip_thermal_probe(struct platform_device 
*pdev)
if (IS_ERR(thermal->regs))
return PTR_ERR(thermal->regs);
 
-   thermal->reset = devm_reset_control_get(&pdev->dev, "tsadc-apb");
+   thermal->reset = devm_reset_control_get_exclusive(&pdev->dev,
+ "tsadc-apb");
if (IS_ERR(thermal->reset)) {
error = PTR_ERR(thermal->reset);
dev_err(&pdev->dev, "failed to get tsadc reset: %d\n", error);
-- 
2.11.0



[PATCH 084/102] serial: 8250_dw: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Greg Kroah-Hartman 
Cc: Jiri Slaby 
Cc: linux-ser...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/tty/serial/8250/8250_dw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_dw.c 
b/drivers/tty/serial/8250/8250_dw.c
index 787b1160d3a53..7e638997bfc2c 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -529,7 +529,7 @@ static int dw8250_probe(struct platform_device *pdev)
}
}
 
-   data->rst = devm_reset_control_get_optional(dev, NULL);
+   data->rst = devm_reset_control_get_optional_exclusive(dev, NULL);
if (IS_ERR(data->rst)) {
err = PTR_ERR(data->rst);
goto err_pclk;
-- 
2.11.0



[PATCH 076/102] spi: stm32: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Mark Brown 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/spi/spi-stm32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 75644bcd938b6..680cdf5495061 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -1132,7 +1132,7 @@ static int stm32_spi_probe(struct platform_device *pdev)
goto err_master_put;
}
 
-   spi->rst = devm_reset_control_get(&pdev->dev, NULL);
+   spi->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (!IS_ERR(spi->rst)) {
reset_control_assert(spi->rst);
udelay(2);
-- 
2.11.0



[PATCH 083/102] thermal: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Zhang Rui 
Cc: Eduardo Valentin 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/thermal/tegra/soctherm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index 7d2db23d71a32..06ce2becfc285 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -1334,7 +1334,8 @@ static int tegra_soctherm_probe(struct platform_device 
*pdev)
}
}
 
-   tegra->reset = devm_reset_control_get(&pdev->dev, "soctherm");
+   tegra->reset = devm_reset_control_get_exclusive(&pdev->dev,
+   "soctherm");
if (IS_ERR(tegra->reset)) {
dev_err(&pdev->dev, "can't get soctherm reset\n");
return PTR_ERR(tegra->reset);
-- 
2.11.0



[PATCH 085/102] serial: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Laxman Dewangan 
Cc: Greg Kroah-Hartman 
Cc: Jiri Slaby 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-ser...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/tty/serial/serial-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/serial-tegra.c 
b/drivers/tty/serial/serial-tegra.c
index d92a150c87336..cf9b736f26f88 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -1310,7 +1310,7 @@ static int tegra_uart_probe(struct platform_device *pdev)
return PTR_ERR(tup->uart_clk);
}
 
-   tup->rst = devm_reset_control_get(&pdev->dev, "serial");
+   tup->rst = devm_reset_control_get_exclusive(&pdev->dev, "serial");
if (IS_ERR(tup->rst)) {
dev_err(&pdev->dev, "Couldn't get the reset\n");
return PTR_ERR(tup->rst);
-- 
2.11.0



[PATCH 093/102] watchdog: asm9260: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Wim Van Sebroeck 
Cc: Guenter Roeck 
Cc: linux-watch...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/watchdog/asm9260_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/asm9260_wdt.c b/drivers/watchdog/asm9260_wdt.c
index 53da001f0838e..186fac4cccf5a 100644
--- a/drivers/watchdog/asm9260_wdt.c
+++ b/drivers/watchdog/asm9260_wdt.c
@@ -296,7 +296,7 @@ static int asm9260_wdt_probe(struct platform_device *pdev)
if (ret)
return ret;
 
-   priv->rst = devm_reset_control_get(&pdev->dev, "wdt_rst");
+   priv->rst = devm_reset_control_get_exclusive(&pdev->dev, "wdt_rst");
if (IS_ERR(priv->rst))
return PTR_ERR(priv->rst);
 
-- 
2.11.0



[PATCH 087/102] usb: dwc2: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: John Youn 
Cc: Greg Kroah-Hartman 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/usb/dwc2/platform.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
index daf0d37acb37f..b9ec45b5f85d4 100644
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -211,7 +211,8 @@ static int dwc2_lowlevel_hw_init(struct dwc2_hsotg *hsotg)
 {
int i, ret;
 
-   hsotg->reset = devm_reset_control_get_optional(hsotg->dev, "dwc2");
+   hsotg->reset = devm_reset_control_get_optional_exclusive(hsotg->dev,
+"dwc2");
if (IS_ERR(hsotg->reset)) {
ret = PTR_ERR(hsotg->reset);
dev_err(hsotg->dev, "error getting reset control %d\n", ret);
-- 
2.11.0



[PATCH 088/102] usb: host: ehci-tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Alan Stern 
Cc: Greg Kroah-Hartman 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/usb/host/ehci-tegra.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 9a3d7db5be57c..c60c43f66f313 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -94,7 +94,8 @@ static int tegra_reset_usb_controller(struct platform_device 
*pdev)
struct reset_control *usb1_reset;
 
if (!has_utmi_pad_registers)
-   usb1_reset = of_reset_control_get(phy_np, "utmi-pads");
+   usb1_reset = of_reset_control_get_exclusive(phy_np,
+   
"utmi-pads");
else
usb1_reset = tegra->rst;
 
@@ -450,7 +451,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
goto cleanup_hcd_create;
}
 
-   tegra->rst = devm_reset_control_get(&pdev->dev, "usb");
+   tegra->rst = devm_reset_control_get_exclusive(&pdev->dev, "usb");
if (IS_ERR(tegra->rst)) {
dev_err(&pdev->dev, "Can't get ehci reset\n");
err = PTR_ERR(tegra->rst);
-- 
2.11.0



[PATCH 098/102] ASoC: stm32: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Liam Girdwood 
Cc: Mark Brown 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: alsa-de...@alsa-project.org
Signed-off-by: Philipp Zabel 
---
 sound/soc/stm/stm32_i2s.c | 2 +-
 sound/soc/stm/stm32_sai.c | 2 +-
 sound/soc/stm/stm32_spdifrx.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c
index 8052629a89dfd..6d0bf78d114d0 100644
--- a/sound/soc/stm/stm32_i2s.c
+++ b/sound/soc/stm/stm32_i2s.c
@@ -840,7 +840,7 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
}
 
/* Reset */
-   rst = devm_reset_control_get(&pdev->dev, NULL);
+   rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (!IS_ERR(rst)) {
reset_control_assert(rst);
udelay(2);
diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
index f7713314913b9..1258bef4dcb37 100644
--- a/sound/soc/stm/stm32_sai.c
+++ b/sound/soc/stm/stm32_sai.c
@@ -85,7 +85,7 @@ static int stm32_sai_probe(struct platform_device *pdev)
}
 
/* reset */
-   rst = reset_control_get(&pdev->dev, NULL);
+   rst = reset_control_get_exclusive(&pdev->dev, NULL);
if (!IS_ERR(rst)) {
reset_control_assert(rst);
udelay(2);
diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c
index 4e4250bdb75a8..84cc5678beba5 100644
--- a/sound/soc/stm/stm32_spdifrx.c
+++ b/sound/soc/stm/stm32_spdifrx.c
@@ -930,7 +930,7 @@ static int stm32_spdifrx_probe(struct platform_device *pdev)
return ret;
}
 
-   rst = devm_reset_control_get(&pdev->dev, NULL);
+   rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (!IS_ERR(rst)) {
reset_control_assert(rst);
udelay(2);
-- 
2.11.0



[PATCH 086/102] usb: chipidea: msm: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Peter Chen 
Cc: Greg Kroah-Hartman 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/usb/chipidea/ci_hdrc_msm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c 
b/drivers/usb/chipidea/ci_hdrc_msm.c
index 0bdfcdcbf7a5a..0cee09192d946 100644
--- a/drivers/usb/chipidea/ci_hdrc_msm.c
+++ b/drivers/usb/chipidea/ci_hdrc_msm.c
@@ -197,7 +197,7 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev)
  CI_HDRC_OVERRIDE_PHY_CONTROL;
ci->pdata.notify_event = ci_hdrc_msm_notify_event;
 
-   reset = devm_reset_control_get(&pdev->dev, "core");
+   reset = devm_reset_control_get_exclusive(&pdev->dev, "core");
if (IS_ERR(reset))
return PTR_ERR(reset);
 
-- 
2.11.0



[PATCH 089/102] usb: host: xhci-tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Mathias Nyman 
Cc: Greg Kroah-Hartman 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/usb/host/xhci-tegra.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index 74436f8ca5382..ba53ee63d450c 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -933,14 +933,16 @@ static int tegra_xusb_probe(struct platform_device *pdev)
if (IS_ERR(tegra->padctl))
return PTR_ERR(tegra->padctl);
 
-   tegra->host_rst = devm_reset_control_get(&pdev->dev, "xusb_host");
+   tegra->host_rst = devm_reset_control_get_exclusive(&pdev->dev,
+  "xusb_host");
if (IS_ERR(tegra->host_rst)) {
err = PTR_ERR(tegra->host_rst);
dev_err(&pdev->dev, "failed to get xusb_host reset: %d\n", err);
goto put_padctl;
}
 
-   tegra->ss_rst = devm_reset_control_get(&pdev->dev, "xusb_ss");
+   tegra->ss_rst = devm_reset_control_get_exclusive(&pdev->dev,
+"xusb_ss");
if (IS_ERR(tegra->ss_rst)) {
err = PTR_ERR(tegra->ss_rst);
dev_err(&pdev->dev, "failed to get xusb_ss reset: %d\n", err);
-- 
2.11.0



[PATCH 090/102] usb: musb: sunxi: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Bin Liu 
Cc: Greg Kroah-Hartman 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/usb/musb/sunxi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
index c9a09b5bb6e59..7eec1acbc729a 100644
--- a/drivers/usb/musb/sunxi.c
+++ b/drivers/usb/musb/sunxi.c
@@ -747,7 +747,7 @@ static int sunxi_musb_probe(struct platform_device *pdev)
}
 
if (test_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags)) {
-   glue->rst = devm_reset_control_get(&pdev->dev, NULL);
+   glue->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(glue->rst)) {
if (PTR_ERR(glue->rst) == -EPROBE_DEFER)
return -EPROBE_DEFER;
-- 
2.11.0



[PATCH 097/102] ASoC: img: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Liam Girdwood 
Cc: Mark Brown 
Cc: alsa-de...@alsa-project.org
Signed-off-by: Philipp Zabel 
---
 sound/soc/img/img-i2s-in.c   | 2 +-
 sound/soc/img/img-i2s-out.c  | 2 +-
 sound/soc/img/img-parallel-out.c | 2 +-
 sound/soc/img/img-spdif-in.c | 2 +-
 sound/soc/img/img-spdif-out.c| 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c
index 0389203f85608..567f9767fb73e 100644
--- a/sound/soc/img/img-i2s-in.c
+++ b/sound/soc/img/img-i2s-in.c
@@ -443,7 +443,7 @@ static int img_i2s_in_probe(struct platform_device *pdev)
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE;
i2s->dai_driver.ops = &img_i2s_in_dai_ops;
 
-   rst = devm_reset_control_get(dev, "rst");
+   rst = devm_reset_control_get_exclusive(dev, "rst");
if (IS_ERR(rst)) {
if (PTR_ERR(rst) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
diff --git a/sound/soc/img/img-i2s-out.c b/sound/soc/img/img-i2s-out.c
index 5f997135a8aec..78b7f6cd675b7 100644
--- a/sound/soc/img/img-i2s-out.c
+++ b/sound/soc/img/img-i2s-out.c
@@ -446,7 +446,7 @@ static int img_i2s_out_probe(struct platform_device *pdev)
 
i2s->channel_base = base + (max_i2s_chan_pow_2 * 0x20);
 
-   i2s->rst = devm_reset_control_get(&pdev->dev, "rst");
+   i2s->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
if (IS_ERR(i2s->rst)) {
if (PTR_ERR(i2s->rst) != -EPROBE_DEFER)
dev_err(&pdev->dev, "No top level reset found\n");
diff --git a/sound/soc/img/img-parallel-out.c b/sound/soc/img/img-parallel-out.c
index 33ceb207ee704..23b0f0f6ec9cb 100644
--- a/sound/soc/img/img-parallel-out.c
+++ b/sound/soc/img/img-parallel-out.c
@@ -224,7 +224,7 @@ static int img_prl_out_probe(struct platform_device *pdev)
 
prl->base = base;
 
-   prl->rst = devm_reset_control_get(&pdev->dev, "rst");
+   prl->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
if (IS_ERR(prl->rst)) {
if (PTR_ERR(prl->rst) != -EPROBE_DEFER)
dev_err(&pdev->dev, "No top level reset found\n");
diff --git a/sound/soc/img/img-spdif-in.c b/sound/soc/img/img-spdif-in.c
index 4d9953d318af4..8adfd65d43902 100644
--- a/sound/soc/img/img-spdif-in.c
+++ b/sound/soc/img/img-spdif-in.c
@@ -727,7 +727,7 @@ static int img_spdif_in_probe(struct platform_device *pdev)
if (ret)
return ret;
 
-   rst = devm_reset_control_get(&pdev->dev, "rst");
+   rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
if (IS_ERR(rst)) {
if (PTR_ERR(rst) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
diff --git a/sound/soc/img/img-spdif-out.c b/sound/soc/img/img-spdif-out.c
index 08f93a5dadfe9..383655da2e60d 100644
--- a/sound/soc/img/img-spdif-out.c
+++ b/sound/soc/img/img-spdif-out.c
@@ -334,7 +334,7 @@ static int img_spdif_out_probe(struct platform_device *pdev)
 
spdif->base = base;
 
-   spdif->rst = devm_reset_control_get(&pdev->dev, "rst");
+   spdif->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
if (IS_ERR(spdif->rst)) {
if (PTR_ERR(spdif->rst) != -EPROBE_DEFER)
dev_err(&pdev->dev, "No top level reset found\n");
-- 
2.11.0



[PATCH 092/102] usb: phy: qcom-8x16-usb: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Felipe Balbi 
Cc: Greg Kroah-Hartman 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/usb/phy/phy-qcom-8x16-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-qcom-8x16-usb.c 
b/drivers/usb/phy/phy-qcom-8x16-usb.c
index b6a83a5cbad36..b9c31dc7bd026 100644
--- a/drivers/usb/phy/phy-qcom-8x16-usb.c
+++ b/drivers/usb/phy/phy-qcom-8x16-usb.c
@@ -232,7 +232,7 @@ static int phy_8x16_read_devicetree(struct phy_8x16 *qphy)
if (ret)
return ret;
 
-   qphy->phy_reset = devm_reset_control_get(dev, "phy");
+   qphy->phy_reset = devm_reset_control_get_exclusive(dev, "phy");
if (IS_ERR(qphy->phy_reset))
return PTR_ERR(qphy->phy_reset);
 
-- 
2.11.0



[PATCH 091/102] usb: phy: msm: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Felipe Balbi 
Cc: Greg Kroah-Hartman 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/usb/phy/phy-msm-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 8fb86a5f458e0..c4d93b391d281 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1653,11 +1653,11 @@ static int msm_otg_read_dt(struct platform_device 
*pdev, struct msm_otg *motg)
if (!pdata->phy_type)
return 1;
 
-   motg->link_rst = devm_reset_control_get(&pdev->dev, "link");
+   motg->link_rst = devm_reset_control_get_exclusive(&pdev->dev, "link");
if (IS_ERR(motg->link_rst))
return PTR_ERR(motg->link_rst);
 
-   motg->phy_rst = devm_reset_control_get(&pdev->dev, "phy");
+   motg->phy_rst = devm_reset_control_get_exclusive(&pdev->dev, "phy");
if (IS_ERR(motg->phy_rst))
motg->phy_rst = NULL;
 
-- 
2.11.0



[PATCH 096/102] watchdog: zx2967: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Wim Van Sebroeck 
Cc: Guenter Roeck 
Cc: linux-watch...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/watchdog/zx2967_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/zx2967_wdt.c b/drivers/watchdog/zx2967_wdt.c
index 69ec5855584b1..9261f7c77f6de 100644
--- a/drivers/watchdog/zx2967_wdt.c
+++ b/drivers/watchdog/zx2967_wdt.c
@@ -229,7 +229,7 @@ static int zx2967_wdt_probe(struct platform_device *pdev)
}
clk_set_rate(wdt->clock, ZX2967_WDT_CLK_FREQ);
 
-   rstc = devm_reset_control_get(dev, NULL);
+   rstc = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(rstc)) {
dev_err(dev, "failed to get rstc");
ret = PTR_ERR(rstc);
-- 
2.11.0



[PATCH 095/102] watchdog: rt2880: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Wim Van Sebroeck 
Cc: Guenter Roeck 
Cc: linux-watch...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/watchdog/rt2880_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/rt2880_wdt.c b/drivers/watchdog/rt2880_wdt.c
index 05524baf7dccb..0d481a63cab14 100644
--- a/drivers/watchdog/rt2880_wdt.c
+++ b/drivers/watchdog/rt2880_wdt.c
@@ -152,7 +152,7 @@ static int rt288x_wdt_probe(struct platform_device *pdev)
if (IS_ERR(rt288x_wdt_clk))
return PTR_ERR(rt288x_wdt_clk);
 
-   rt288x_wdt_reset = devm_reset_control_get(&pdev->dev, NULL);
+   rt288x_wdt_reset = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (!IS_ERR(rt288x_wdt_reset))
reset_control_deassert(rt288x_wdt_reset);
 
-- 
2.11.0



[PATCH 101/102] Documentation: devres: add explicit exclusive/shared reset control request calls

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Add the explicit API calls to the devres list.

Cc: Jonathan Corbet 
Cc: Lee Jones 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 Documentation/driver-model/devres.txt | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/driver-model/devres.txt 
b/Documentation/driver-model/devres.txt
index 30e04f7a690dd..fd157078dd558 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -379,7 +379,12 @@ REGULATOR
   devm_regulator_register()
 
 RESET
-  devm_reset_control_get()
+  devm_reset_control_get_exclusive()
+  devm_reset_control_get_shared()
+  devm_reset_control_get_optional_exclusive()
+  devm_reset_control_get_optional_shared()
+  devm_reset_control_get_exclusive_by_index()
+  devm_reset_control_get_shared_by_index()
   devm_reset_controller_register()
 
 SLAVE DMA ENGINE
-- 
2.11.0



[PATCH 094/102] watchdog: mt7621: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Wim Van Sebroeck 
Cc: Guenter Roeck 
Cc: linux-watch...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/watchdog/mt7621_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index 48a06067075d5..f6f4c1bf24c95 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -135,7 +135,7 @@ static int mt7621_wdt_probe(struct platform_device *pdev)
if (IS_ERR(mt7621_wdt_base))
return PTR_ERR(mt7621_wdt_base);
 
-   mt7621_wdt_reset = devm_reset_control_get(&pdev->dev, NULL);
+   mt7621_wdt_reset = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (!IS_ERR(mt7621_wdt_reset))
reset_control_deassert(mt7621_wdt_reset);
 
-- 
2.11.0



[PATCH 102/102] reset: finish transition to explicit exclusive reset control requests

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. After all drivers are converted to the explicit API
calls, the temporary transition helpers can be removed.

Cc: Lee Jones 
Signed-off-by: Philipp Zabel 
---
 drivers/reset/core.c  |  2 +-
 include/linux/reset.h | 50 --
 2 files changed, 1 insertion(+), 51 deletions(-)

diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 0090784ff4105..9ebeb148d4516 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -461,7 +461,7 @@ int device_reset(struct device *dev)
struct reset_control *rstc;
int ret;
 
-   rstc = reset_control_get(dev, NULL);
+   rstc = reset_control_get_exclusive(dev, NULL);
if (IS_ERR(rstc))
return PTR_ERR(rstc);
 
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 13d8681210d54..77a65dea9e82b 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -324,54 +324,4 @@ devm_reset_control_get_shared_by_index(struct device *dev, 
int index)
return __devm_reset_control_get(dev, NULL, index, true, false);
 }
 
-/*
- * TEMPORARY calls to use during transition:
- *
- *   of_reset_control_get() => of_reset_control_get_exclusive()
- *
- * These inline function calls will be removed once all consumers
- * have been moved over to the new explicit API.
- */
-static inline struct reset_control *reset_control_get(
-   struct device *dev, const char *id)
-{
-   return reset_control_get_exclusive(dev, id);
-}
-
-static inline struct reset_control *reset_control_get_optional(
-   struct device *dev, const char *id)
-{
-   return reset_control_get_optional_exclusive(dev, id);
-}
-
-static inline struct reset_control *of_reset_control_get(
-   struct device_node *node, const char *id)
-{
-   return of_reset_control_get_exclusive(node, id);
-}
-
-static inline struct reset_control *of_reset_control_get_by_index(
-   struct device_node *node, int index)
-{
-   return of_reset_control_get_exclusive_by_index(node, index);
-}
-
-static inline struct reset_control *devm_reset_control_get(
-   struct device *dev, const char *id)
-{
-   return devm_reset_control_get_exclusive(dev, id);
-}
-
-static inline struct reset_control *devm_reset_control_get_optional(
-   struct device *dev, const char *id)
-{
-   return devm_reset_control_get_optional_exclusive(dev, id);
-
-}
-
-static inline struct reset_control *devm_reset_control_get_by_index(
-   struct device *dev, int index)
-{
-   return devm_reset_control_get_exclusive_by_index(dev, index);
-}
 #endif
-- 
2.11.0



[PATCH 100/102] ASoC: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Liam Girdwood 
Cc: Mark Brown 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: alsa-de...@alsa-project.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 sound/soc/tegra/tegra30_ahub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
index 8c10ae7982bad..43679aeeb12be 100644
--- a/sound/soc/tegra/tegra30_ahub.c
+++ b/sound/soc/tegra/tegra30_ahub.c
@@ -544,8 +544,8 @@ static int tegra30_ahub_probe(struct platform_device *pdev)
soc_data->mod_list_mask))
continue;
 
-   rst = reset_control_get(&pdev->dev,
-   configlink_mods[i].rst_name);
+   rst = reset_control_get_exclusive(&pdev->dev,
+ configlink_mods[i].rst_name);
if (IS_ERR(rst)) {
dev_err(&pdev->dev, "Can't get reset %s\n",
configlink_mods[i].rst_name);
-- 
2.11.0



[PATCH 099/102] ASoC: sun4i: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Liam Girdwood 
Cc: Mark Brown 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: alsa-de...@alsa-project.org
Signed-off-by: Philipp Zabel 
---
 sound/soc/sunxi/sun4i-codec.c | 3 ++-
 sound/soc/sunxi/sun4i-i2s.c   | 2 +-
 sound/soc/sunxi/sun4i-spdif.c | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 150069987c0c3..9eec303605224 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1574,7 +1574,8 @@ static int sun4i_codec_probe(struct platform_device *pdev)
}
 
if (quirks->has_reset) {
-   scodec->rst = devm_reset_control_get(&pdev->dev, NULL);
+   scodec->rst = devm_reset_control_get_exclusive(&pdev->dev,
+  NULL);
if (IS_ERR(scodec->rst)) {
dev_err(&pdev->dev, "Failed to get reset control\n");
return PTR_ERR(scodec->rst);
diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
index 3635bbc72cbcd..62b307b0c846c 100644
--- a/sound/soc/sunxi/sun4i-i2s.c
+++ b/sound/soc/sunxi/sun4i-i2s.c
@@ -716,7 +716,7 @@ static int sun4i_i2s_probe(struct platform_device *pdev)
}
 
if (quirks->has_reset) {
-   i2s->rst = devm_reset_control_get(&pdev->dev, NULL);
+   i2s->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(i2s->rst)) {
dev_err(&pdev->dev, "Failed to get reset control\n");
return PTR_ERR(i2s->rst);
diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index eaefd07a5ed08..c49f3757b686e 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -520,7 +520,8 @@ static int sun4i_spdif_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, host);
 
if (quirks->has_reset) {
-   host->rst = devm_reset_control_get_optional(&pdev->dev, NULL);
+   host->rst = 
devm_reset_control_get_optional_exclusive(&pdev->dev,
+ NULL);
if (IS_ERR(host->rst) && PTR_ERR(host->rst) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
dev_err(&pdev->dev, "Failed to get reset: %d\n", ret);
-- 
2.11.0



[PATCH 073/102] remoteproc: st: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Patrice Chotard 
Cc: Ohad Ben-Cohen 
Cc: Bjorn Andersson 
Cc: linux-remotep...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/remoteproc/st_remoteproc.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/st_remoteproc.c 
b/drivers/remoteproc/st_remoteproc.c
index d534bf23dc560..aacef0ea3b902 100644
--- a/drivers/remoteproc/st_remoteproc.c
+++ b/drivers/remoteproc/st_remoteproc.c
@@ -212,7 +212,8 @@ static int st_rproc_parse_dt(struct platform_device *pdev)
int err;
 
if (ddata->config->sw_reset) {
-   ddata->sw_reset = devm_reset_control_get(dev, "sw_reset");
+   ddata->sw_reset = devm_reset_control_get_exclusive(dev,
+  "sw_reset");
if (IS_ERR(ddata->sw_reset)) {
dev_err(dev, "Failed to get S/W Reset\n");
return PTR_ERR(ddata->sw_reset);
@@ -220,7 +221,8 @@ static int st_rproc_parse_dt(struct platform_device *pdev)
}
 
if (ddata->config->pwr_reset) {
-   ddata->pwr_reset = devm_reset_control_get(dev, "pwr_reset");
+   ddata->pwr_reset = devm_reset_control_get_exclusive(dev,
+   
"pwr_reset");
if (IS_ERR(ddata->pwr_reset)) {
dev_err(dev, "Failed to get Power Reset\n");
return PTR_ERR(ddata->pwr_reset);
-- 
2.11.0



[PATCH 068/102] pinctrl: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Linus Walleij 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-g...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/pinctrl/tegra/pinctrl-tegra-xusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c 
b/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c
index ebedc2d324115..9d653c24219cb 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c
@@ -901,7 +901,7 @@ int tegra_xusb_padctl_legacy_probe(struct platform_device 
*pdev)
if (IS_ERR(padctl->regs))
return PTR_ERR(padctl->regs);
 
-   padctl->rst = devm_reset_control_get(&pdev->dev, NULL);
+   padctl->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(padctl->rst))
return PTR_ERR(padctl->rst);
 
-- 
2.11.0



[PATCH 049/102] ath10k: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Kalle Valo 
Cc: ath...@lists.infradead.org
Cc: linux-wirel...@vger.kernel.org
Cc: net...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/net/wireless/ath/ath10k/ahb.c | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/ahb.c 
b/drivers/net/wireless/ath/ath10k/ahb.c
index da770af830369..2ad3ed7b89417 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -197,35 +197,40 @@ static int ath10k_ahb_rst_ctrl_init(struct ath10k *ar)
 
dev = &ar_ahb->pdev->dev;
 
-   ar_ahb->core_cold_rst = devm_reset_control_get(dev, "wifi_core_cold");
+   ar_ahb->core_cold_rst = devm_reset_control_get_exclusive(dev,
+
"wifi_core_cold");
if (IS_ERR(ar_ahb->core_cold_rst)) {
ath10k_err(ar, "failed to get core cold rst ctrl: %ld\n",
   PTR_ERR(ar_ahb->core_cold_rst));
return PTR_ERR(ar_ahb->core_cold_rst);
}
 
-   ar_ahb->radio_cold_rst = devm_reset_control_get(dev, "wifi_radio_cold");
+   ar_ahb->radio_cold_rst = devm_reset_control_get_exclusive(dev,
+ 
"wifi_radio_cold");
if (IS_ERR(ar_ahb->radio_cold_rst)) {
ath10k_err(ar, "failed to get radio cold rst ctrl: %ld\n",
   PTR_ERR(ar_ahb->radio_cold_rst));
return PTR_ERR(ar_ahb->radio_cold_rst);
}
 
-   ar_ahb->radio_warm_rst = devm_reset_control_get(dev, "wifi_radio_warm");
+   ar_ahb->radio_warm_rst = devm_reset_control_get_exclusive(dev,
+ 
"wifi_radio_warm");
if (IS_ERR(ar_ahb->radio_warm_rst)) {
ath10k_err(ar, "failed to get radio warm rst ctrl: %ld\n",
   PTR_ERR(ar_ahb->radio_warm_rst));
return PTR_ERR(ar_ahb->radio_warm_rst);
}
 
-   ar_ahb->radio_srif_rst = devm_reset_control_get(dev, "wifi_radio_srif");
+   ar_ahb->radio_srif_rst = devm_reset_control_get_exclusive(dev,
+ 
"wifi_radio_srif");
if (IS_ERR(ar_ahb->radio_srif_rst)) {
ath10k_err(ar, "failed to get radio srif rst ctrl: %ld\n",
   PTR_ERR(ar_ahb->radio_srif_rst));
return PTR_ERR(ar_ahb->radio_srif_rst);
}
 
-   ar_ahb->cpu_init_rst = devm_reset_control_get(dev, "wifi_cpu_init");
+   ar_ahb->cpu_init_rst = devm_reset_control_get_exclusive(dev,
+   
"wifi_cpu_init");
if (IS_ERR(ar_ahb->cpu_init_rst)) {
ath10k_err(ar, "failed to get cpu init rst ctrl: %ld\n",
   PTR_ERR(ar_ahb->cpu_init_rst));
-- 
2.11.0



[PATCH 041/102] mmc: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Adrian Hunter 
Cc: Ulf Hansson 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/mmc/host/sdhci-tegra.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 7f93079c7a3ad..f668a6fa17654 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -508,7 +508,8 @@ static int sdhci_tegra_probe(struct platform_device *pdev)
clk_prepare_enable(clk);
pltfm_host->clk = clk;
 
-   tegra_host->rst = devm_reset_control_get(&pdev->dev, "sdhci");
+   tegra_host->rst = devm_reset_control_get_exclusive(&pdev->dev,
+  "sdhci");
if (IS_ERR(tegra_host->rst)) {
rc = PTR_ERR(tegra_host->rst);
dev_err(&pdev->dev, "failed to get reset control: %d\n", rc);
-- 
2.11.0



[PATCH 023/102] drm/stm: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Yannick Fertre 
Cc: Philippe Cornu 
Cc: Benjamin Gaignard 
Cc: Vincent Abriou 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Philipp Zabel 
---
 drivers/gpu/drm/stm/ltdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 1b9483d4f2a4e..59d344a519097 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1026,7 +1026,7 @@ int ltdc_load(struct drm_device *ddev)
if (!ldev->panel)
return -EPROBE_DEFER;
 
-   rstc = of_reset_control_get(np, NULL);
+   rstc = of_reset_control_get_exclusive(np, NULL);
 
mutex_init(&ldev->err_lock);
 
-- 
2.11.0



[PATCH 018/102] dmaengine: tegra-apb: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Laxman Dewangan 
Cc: Jon Hunter 
Cc: Vinod Koul 
Cc: Dan Williams 
Cc: Thierry Reding 
Cc: dmaeng...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/dma/tegra20-apb-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index b9d75a54c896a..3d4d0241aefed 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1330,7 +1330,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
return PTR_ERR(tdma->dma_clk);
}
 
-   tdma->rst = devm_reset_control_get(&pdev->dev, "dma");
+   tdma->rst = devm_reset_control_get_exclusive(&pdev->dev, "dma");
if (IS_ERR(tdma->rst)) {
dev_err(&pdev->dev, "Error: Missing reset\n");
return PTR_ERR(tdma->rst);
-- 
2.11.0



[PATCH 027/102] i2c: mv64xxx: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Wolfram Sang 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/i2c/busses/i2c-mv64xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 5c4db65c5019b..887bc7d97a777 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -820,7 +820,7 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
goto out;
}
 
-   drv_data->rstc = devm_reset_control_get_optional(dev, NULL);
+   drv_data->rstc = devm_reset_control_get_optional_exclusive(dev, NULL);
if (IS_ERR(drv_data->rstc)) {
rc = PTR_ERR(drv_data->rstc);
goto out;
-- 
2.11.0



[PATCH 009/102] clk: sunxi: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: "Emilio López" 
Cc: Michael Turquette 
Cc: Stephen Boyd 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/clk/sunxi/clk-sun9i-mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c 
b/drivers/clk/sunxi/clk-sun9i-mmc.c
index 6041bdba2e971..a1a634253d6f2 100644
--- a/drivers/clk/sunxi/clk-sun9i-mmc.c
+++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
@@ -124,7 +124,7 @@ static int sun9i_a80_mmc_config_clk_probe(struct 
platform_device *pdev)
return PTR_ERR(data->clk);
}
 
-   data->reset = devm_reset_control_get(&pdev->dev, NULL);
+   data->reset = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(data->reset)) {
dev_err(&pdev->dev, "Could not get reset control\n");
return PTR_ERR(data->reset);
-- 
2.11.0



[PATCH 001/102] ARM: rockchip: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Heiko Stuebner 
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 arch/arm/mach-rockchip/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index 3abafdbdd7f4a..420ba67652230 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -67,7 +67,7 @@ static struct reset_control *rockchip_get_core_reset(int cpu)
else
np = of_get_cpu_node(cpu, NULL);
 
-   return of_reset_control_get(np, NULL);
+   return of_reset_control_get_exclusive(np, NULL);
 }
 
 static int pmu_set_power_domain(int pd, bool on)
-- 
2.11.0



[PATCH 015/102] PM / devfreq: tegra: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: MyungJoo Ham 
Cc: Kyungmin Park 
Cc: Chanwoo Choi 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/devfreq/tegra-devfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/devfreq/tegra-devfreq.c b/drivers/devfreq/tegra-devfreq.c
index ae712159246fb..8108487b34192 100644
--- a/drivers/devfreq/tegra-devfreq.c
+++ b/drivers/devfreq/tegra-devfreq.c
@@ -628,7 +628,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
if (IS_ERR(tegra->regs))
return PTR_ERR(tegra->regs);
 
-   tegra->reset = devm_reset_control_get(&pdev->dev, "actmon");
+   tegra->reset = devm_reset_control_get_exclusive(&pdev->dev, "actmon");
if (IS_ERR(tegra->reset)) {
dev_err(&pdev->dev, "Failed to get reset\n");
return PTR_ERR(tegra->reset);
-- 
2.11.0



[PATCH 013/102] crypto: rockchip: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Herbert Xu 
Cc: "David S. Miller" 
Cc: Heiko Stuebner 
Cc: linux-cry...@vger.kernel.org
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Philipp Zabel 
---
 drivers/crypto/rockchip/rk3288_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/rockchip/rk3288_crypto.c 
b/drivers/crypto/rockchip/rk3288_crypto.c
index d0f80c6241f95..fdfd1f02911e9 100644
--- a/drivers/crypto/rockchip/rk3288_crypto.c
+++ b/drivers/crypto/rockchip/rk3288_crypto.c
@@ -294,7 +294,7 @@ static int rk_crypto_probe(struct platform_device *pdev)
goto err_crypto;
}
 
-   crypto_info->rst = devm_reset_control_get(dev, "crypto-rst");
+   crypto_info->rst = devm_reset_control_get_exclusive(dev, "crypto-rst");
if (IS_ERR(crypto_info->rst)) {
err = PTR_ERR(crypto_info->rst);
goto err_crypto;
-- 
2.11.0



[PATCH 004/102] ahci: st: explicitly request exclusive reset control

2017-07-19 Thread Philipp Zabel
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Patrice Chotard 
Cc: Tejun Heo 
Cc: linux-...@vger.kernel.org
Signed-off-by: Philipp Zabel 
---
 drivers/ata/ahci_st.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index bc345f2495553..8a26e917dae90 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -108,19 +108,19 @@ static int st_ahci_probe_resets(struct ahci_host_priv 
*hpriv,
 {
struct st_ahci_drv_data *drv_data = hpriv->plat_data;
 
-   drv_data->pwr = devm_reset_control_get(dev, "pwr-dwn");
+   drv_data->pwr = devm_reset_control_get_exclusive(dev, "pwr-dwn");
if (IS_ERR(drv_data->pwr)) {
dev_info(dev, "power reset control not defined\n");
drv_data->pwr = NULL;
}
 
-   drv_data->sw_rst = devm_reset_control_get(dev, "sw-rst");
+   drv_data->sw_rst = devm_reset_control_get_exclusive(dev, "sw-rst");
if (IS_ERR(drv_data->sw_rst)) {
dev_info(dev, "soft reset control not defined\n");
drv_data->sw_rst = NULL;
}
 
-   drv_data->pwr_rst = devm_reset_control_get(dev, "pwr-rst");
+   drv_data->pwr_rst = devm_reset_control_get_exclusive(dev, "pwr-rst");
if (IS_ERR(drv_data->pwr_rst)) {
dev_dbg(dev, "power soft reset control not defined\n");
drv_data->pwr_rst = NULL;
-- 
2.11.0



Re: [PATCH] ARC: reset: introduce HSDKv1 reset driver

2017-07-19 Thread Philipp Zabel
On Tue, 2017-07-18 at 20:25 +0300, Eugeniy Paltsev wrote:
> The HSDK v1 periphery IPs can be reset by accessing some registers
> from the CGU block.
> 
> The list of available reset lines is documented in the DT bindings.
> 
> Signed-off-by: Eugeniy Paltsev 
> ---
>  .../bindings/reset/snps,hsdk-v1-reset.txt  |  28 
>  MAINTAINERS|   7 +
>  drivers/reset/Kconfig  |   6 +
>  drivers/reset/Makefile |   1 +
>  drivers/reset/reset-hsdk-v1.c  | 141 
> +
>  include/dt-bindings/reset/snps,hsdk-v1-reset.h |  17 +++
>  6 files changed, 200 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt
>  create mode 100644 drivers/reset/reset-hsdk-v1.c
>  create mode 100644 include/dt-bindings/reset/snps,hsdk-v1-reset.h
> 
> diff --git a/Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt 
> b/Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt
> new file mode 100644
> index 000..4fdea89
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt
> @@ -0,0 +1,28 @@
> +Binding for the HSDK v1 reset controller
> +
> +This binding uses the common reset binding[1].
> +
> +[1] Documentation/devicetree/bindings/reset/reset.txt
> +
> +Required properties:
> +- compatible: should be "snps,hsdk-v1.0-reset".
> +- reg: should always contain 2 pairs address - length: first for reset
> +  configuration registers and second for corresponding SW reset and status 
> bits
> +  register.
> +- #reset-cells: from common reset binding; Should always be set to 1.
> +
> +Example:
> + reset: reset@880 {
> + compatible = "snps,hsdk-v1.0-reset";
> + #reset-cells = <1>;
> + reg = <0x880 0x80>, <0xFF0 0x4>;
> + };
> +
> +Specifying reset lines connected to IP modules:
> + ethernet@ {
> + 
> + resets = <&reset HSDK_V1_ETH_RESET>;
> + 
> + };
> +
> +The index could be found in 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 09b5ab6..99deabb 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11307,6 +11307,13 @@ L:   linux-...@vger.kernel.org
>  S:   Maintained
>  F:   drivers/mmc/host/dw_mmc*
>  
> +SYNOPSYS HSDK RESET CONTROLLER DRIVER
> +M:   Eugeniy Paltsev 
> +S:   Supported
> +F:   drivers/reset/reset-hsdk-v1.c
> +F:   include/dt-bindings/reset/snps,hsdk-v1-reset.h
> +F:   Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt
> +
>  SYSTEM TRACE MODULE CLASS
>  M:   Alexander Shishkin 
>  S:   Maintained
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index d21c07c..cb13f0d 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -34,6 +34,12 @@ config RESET_BERLIN
>   help
> This enables the reset controller driver for Marvell Berlin SoCs.
>  
> +config RESET_HSDK_V1
> + bool "HSDK v1 Reset Driver"
> + default n

I suppose there will be a SOC_HSDK_V1 or similar in the future so that
we can hide this option and enable it by default like the other reset
drivers?

> + help
> +   This enables the reset controller driver for HSDK v1.
> +
>  config RESET_IMX7
>   bool "i.MX7 Reset Driver" if COMPILE_TEST
>   default SOC_IMX7D
> diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile
> index 02a74db..772e5f2 100644
> --- a/drivers/reset/Makefile
> +++ b/drivers/reset/Makefile
> @@ -5,6 +5,7 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/
>  obj-$(CONFIG_RESET_A10SR) += reset-a10sr.o
>  obj-$(CONFIG_RESET_ATH79) += reset-ath79.o
>  obj-$(CONFIG_RESET_BERLIN) += reset-berlin.o
> +obj-$(CONFIG_RESET_HSDK_V1) += reset-hsdk-v1.o
>  obj-$(CONFIG_RESET_IMX7) += reset-imx7.o
>  obj-$(CONFIG_RESET_LPC18XX) += reset-lpc18xx.o
>  obj-$(CONFIG_RESET_MESON) += reset-meson.o
> diff --git a/drivers/reset/reset-hsdk-v1.c b/drivers/reset/reset-hsdk-v1.c
> new file mode 100644
> index 000..64d2a6e
> --- /dev/null
> +++ b/drivers/reset/reset-hsdk-v1.c
> @@ -0,0 +1,141 @@
> +/*
> + * Copyright (C) 2017 Synopsys.
> + *
> + * Synopsys HSDKv1 SDP reset driver.
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define to_hsdkv1_rst(p) container_of((p), struct hsdkv1_rst, rcdev)
> +
> +struct hsdkv1_rst {
> + void __iomem*regs_ctl;
> + void __iomem*regs_rst;
> + spinlock_t  lock;
> + struct reset_controller_dev rcdev;
> +};
> +
> +static const u32 rst_map[] = {
> + BIT(16), /* APB_RST  */
> + BIT(17), /* AXI_RST  */
> + BIT(18), /* ETH_RST  */
> + BIT(19), /* USB_RST  */
> +  

Re: [PATCH] gpu: Convert to using %pOF instead of full_name

2017-07-19 Thread Philipp Zabel
On Tue, 2017-07-18 at 16:43 -0500, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring 
> Cc: Russell King 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Jani Nikula 
> Cc: Sean Paul 
> Cc: Inki Dae 
> Cc: Joonyoung Shim 
> Cc: Seung-Woo Kim 
> Cc: Kyungmin Park 
> Cc: Kukjin Kim 
> Cc: Krzysztof Kozlowski 
> Cc: Javier Martinez Canillas 
> Cc: Xinliang Liu 
> Cc: Rongrong Zou 
> Cc: Xinwei Kong 
> Cc: Chen Feng 
> Cc: CK Hu 
> Cc: Philipp Zabel 
> Cc: Matthias Brugger 
> Cc: Neil Armstrong 
> Cc: Carlo Caione 
> Cc: Kevin Hilman 
> Cc: Thierry Reding 
> Cc: Laurent Pinchart 
> Cc: Mark Yao 
> Cc: Heiko Stuebner 
> Cc: Maxime Ripard 
> Cc: Chen-Yu Tsai 
> Cc: Jyri Sarha 
> Cc: Tomi Valkeinen 
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-samsung-...@vger.kernel.org
> Cc: linux-media...@lists.infradead.org
> Cc: linux-amlo...@lists.infradead.org
> Cc: linux-renesas-...@vger.kernel.org
> Cc: linux-rockc...@lists.infradead.org
> ---

Reviewed-by: Philipp Zabel 

regards
Philipp




Re: [PATCH] regulator: Convert to using %pOF instead of full_name

2017-07-19 Thread Philipp Zabel
On Tue, 2017-07-18 at 16:43 -0500, Rob Herring wrote:
> Now that we have a custom printf format specifier, convert users of
> full_name to use %pOF instead. This is preparation to remove storing
> of the full path string for each node.
> 
> Signed-off-by: Rob Herring 
> Cc: Liam Girdwood 
> Cc: Mark Brown 
> Cc: Sangbeom Kim 
> Cc: Krzysztof Kozlowski 
> Cc: Bartlomiej Zolnierkiewicz 
> Cc: Philipp Zabel 

Reviewed-by: Philipp Zabel 

regards
Philipp



Re: [PATCH v2] [media] staging/imx: remove confusing IS_ERR_OR_NULL usage

2017-07-12 Thread Philipp Zabel
On Tue, 2017-07-11 at 15:18 +0200, Arnd Bergmann wrote:
> While looking at a compiler warning, I noticed the use of
> IS_ERR_OR_NULL, which is generally a sign of a bad API design
> and should be avoided.
> 
> In this driver, this is fairly easy, we can simply stop storing
> error pointers in persistent structures, and change the two
> functions that might return either a NULL pointer or an error
> code to consistently return error pointers when failing.
> 
> of_parse_subdev() now separates the error code and the pointer
> it looks up, to clarify the interface. There are two cases
> where this function originally returns 'NULL', and I have
> changed that to '0' for success to keep the current behavior,
> though returning an error would also make sense there.
> 
> Fixes: e130291212df ("[media] media: Add i.MX media core driver")
> Signed-off-by: Arnd Bergmann 
> ---
> v2: fix type mismatch
> v3: rework of_parse_subdev() as well.

Thanks!

Reviewed-by: Philipp Zabel 
Tested-by: Philipp Zabel 

regards
Philipp




Re: [PATCH] serial: 8250_of: Fix regression in reset support

2017-07-11 Thread Philipp Zabel
Hi Linus,

On Mon, 2017-07-10 at 17:24 +0200, Linus Walleij wrote:
> commit e2860e1f62f2 ("serial: 8250_of: Add reset support")
> introduced reset support for the 8250_of driver.
> 
> However it unconditionally uses the assert/deassert pair to
> deassert reset on the device at probe and assert it at
> remove. This does not work with systems that have a
> self-deasserting reset controller, such as Gemini, that
> recently added a reset controller.

Self-deasserting resets are fundamentally incompatible with
assert/deassert in the current shared reset model (as there is no
framework for deferring or or vetoing reset assertions while one of the
devices sharing the reset line could be negatively affected).

The way it is implemented right now, after reset() is triggered once,
assert/deassert will return -EINVAL for the lifetime of the reset
control instance. Also, reset() returns -EINVAL between another users'
deassert() and assert() calls.

> As a result, the console will not probe on the Gemini with
> this message:
> 
> Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
> of_serial: probe of 4200.serial failed with error -524
> 
> This (-ENOTSUPP) is the error code returned by the
> deassert() operation on self-deasserting reset controllers.

One easy workaround would be to implement deassert() to be a no-op (or
to divert the call to reset()) in your reset controller driver. A more
intrusive variant would be to do the same in the core, as you suggest
below.

> Add some code and comments that will:
> 
> - In probe() avoid to bail out if -ENOTSUPP is returned
>   from the reset_deassert() call.

I think it would be better not to put this burden on the drivers.

> - If reset_assert() bails out with -ENOTSUPP on remove(),
>   try the self-deasserting method as a fallback.

I don't understand the purpose of this, see below.

> Cc: Joel Stanley 
> Cc: Philipp Zabel 
> Cc: Greg Kroah-Hartman 
> Fixes: e2860e1f62f2 ("serial: 8250_of: Add reset support")
> Signed-off-by: Linus Walleij 
> ---
> Philipp: please comment on this or ACK if it is the right
> approach. It sort of sets a precedent for handling
> different reset controllers from the consumer side.
> 
> Another possibility is to modify the reset core such
> that .deassert() bails out silently if the controller only
> has .reset(), and .assert() just calls .reset() if the
> controller does not have .assert().
>
> Actually I think the latter is more intuitive but it is
> also more intrusive.

I have been thinking about this. Due to the diversity of reset
controller implementations, I'm hesitant to do this in the core.

For starters, why would reset() be called during assert() and not during
deassert()? Can we be sure that this is the right thing for all reset
controllers?
The deassert() call guarantees that the reset line is deasserted after
the call (and as long as deassert_count > 0). What if somebody ends up
building a self-deasserting reset controller that has the reset line
initially asserted?
Also it is implied that after the call to deassert() the device is in a
working state, obviously. This might only be the case after the first
reset() for some devices.

> ---
>  drivers/tty/serial/8250/8250_of.c | 13 +++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_of.c 
> b/drivers/tty/serial/8250/8250_of.c
> index 0cf95fddccfc..927ee8561c8d 100644
> --- a/drivers/tty/serial/8250/8250_of.c
> +++ b/drivers/tty/serial/8250/8250_of.c
> @@ -138,7 +138,12 @@ static int of_platform_serial_setup(struct 
> platform_device *ofdev,
>   if (IS_ERR(info->rst))
>   goto out;
>   ret = reset_control_deassert(info->rst);
> - if (ret)
> + /*
> +  * If the deassert operation is not supported, this could be because
> +  * the reset controller is self-deasserting and onlt supports the
> +  * .reset() operation, so this is not a probe error.
> +  */
> + if (ret && (ret != -ENOTSUPP))

I don't like to have to do this in the drivers.

The driver just requests the reset line to be deasserted after the call,
if there is one. If the reset controller driver can guarantee that,
deassert() should not return an error.

>   goto out;
>  
>   port->type = type;
> @@ -235,10 +240,14 @@ static int of_platform_serial_probe(struct 
> platform_device *ofdev)
>  static int of_platform_serial_remove(struct platform_device *ofdev)
>  {
>   struct of_serial_info *info = platform_get_drvdata(ofdev);
> + int ret;
>  
>   serial8250_unregister_port(info->line);
>  
> - reset_control_assert(info->rst);
> + ret = reset_control_assert(info->rst);
> + /* If the as

Re: coda 2040000.vpu: firmware request failed

2017-07-07 Thread Philipp Zabel
Hi Jagan,

On Fri, 2017-07-07 at 18:15 +0530, Jagan Teki wrote:
> Hi,
> 
> I'm observing firmware request failure with i.MX6Q board, This is with
> latest linux-next (4.12) with firmware from, [1] and converted
> v4l-coda960-imx6q.bin using [2].
> 
> Log:
> --
> coda 204.vpu: Direct firmware load for vpu_fw_imx6q.bin failed with error 
> -2
> coda 204.vpu: Direct firmware load for vpu/vpu_fw_imx6q.bin failed
> with error -2
> coda 204.vpu: Direct firmware load for v4l-coda960-imx6q.bin
> failed with error -2

The error code is -ENOENT, so the firmware binary is not found where the
firmware loader code is looking. That could be caused by the coda driver
being probed before the file system containing the firmware binary is
mounted. Have you tried compiling the coda driver as a module
(CONFIG_VIDEO_CODA=m)?

> coda 204.vpu: firmware request failed
> 
> I've verified md4sum and VDDPU as well, hope these look OK.
> 
> # md5sum /lib/firmware/v4l-coda960-imx6q.bin
> af4971a37c7a3a50c99f7dfd36104c63  /lib/firmware/v4l-coda960-imx6q.bin
> # dmesg | grep regu | grep -i vddpu
> [0.061552] vddpu: supplied by regulator-dummy
> 
> Did I missed any, request for help?
> 
> [1] 
> http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-3.0.35-4.0.0.bin
> [2] 
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/181101.html
> 
> thanks!

Note that converting the NXP provided firmware is not necessary anymore
since commits a1a87fa3a0cf ("[media] coda: add support for native order
firmware files with Freescale header") and 2ac7f08e3075 ("[media] coda:
add support for firmware files named as distributed by NXP").

Also there are newer firmware binaries available, see
https://patchwork.linuxtv.org/patch/42332/

regards
Philipp



Re: PWM backlight initial state assumptions, or how pwm_bl killed my (nyan) cat^W backlight support

2017-07-05 Thread Philipp Zabel
Hi Paul,

On Wed, 2017-07-05 at 13:41 +0300, Paul Kocialkowski wrote:
> Hey,
> 
> On Wed, 2017-07-05 at 11:24 +0100, Daniel Thompson wrote:
> > On 04/07/17 21:13, Paul Kocialkowski wrote:
> > > As I try to maintain support for ARM CrOS (read, ChromeOS/ChromiumOS)
> > > devices in
> > > upstream Linux on my spare time, I try to test out rc and stable versions 
> > > as
> > > often as time allows. I have been rolling out 4.12 since Monday and 
> > > noticed
> > > that
> > > the backlight on my tegra124 nyan big stayed dark for this release.
> > > 
> > > Not very cool, although I'm not blaming anyone else than myself on this,
> > > I should have just tested it and brought the issue up during the rc cycle.
> > > Still, let's try to move forward.
> > 
> > Personally I might be inclined to spread the blame a bit wider ;-).
> > 
> > Did you bisect it down to a specific patch? An SHA-1 would be something 
> > of a time saver here!
> 
> The offending commit here is d1b81294575098d989be1f2f6bb628091ceaa87b, that
> added a check on the intial PWM state.
> 
> The policy I'm describing was introduced with
> 3698d7e7d221a5c90d4b55e96d0c8f98a8b4d7df which did not break my use case at 
> this
> point. It will still disable the driver if the regulator was not enabled
> already, which I think is not desirable. The policy on the initial GPIO state 
> is
> also quite disputable.

Some panels have a documented powerup sequence, which usually ends with
the backlight being enabled to avoid showing garbage before the panel is
initialized completely.
The reason for 3698d7e7d221 was a device with the display disabled out
of the bootloader, where the backlight is controlled by the simple-panel
driver. Enabling the backlight from the backlight driver before the
panel driver requests the backlight to be enabled (before the panel is
powered) would result in a white flash during boot.

I tried to be careful to only let the backlight driver set the initial
state to disabled if a few conditions are met: the GPIO is already
configured as output and disabled, and the backlight device tree node
has a phandle pointing to it, so we can expect there to be some
controlling instance that will enable it when appropriate.

I wonder why in your case there is a phandle link to the backlight node
but nothing actually enables the backlight during boot. I would expect
that to be handled by the panel driver.

> > > After investigating, it appears that the pwm_bl driver is enforcing a 
> > > policy
> > > on
> > > heavily relying on the backlight initial state
> > > (pwm_backlight_initial_power_state). To make it short, if backlight wasn't
> > > detected as already enabled by the bootloader, it's going to refuse to
> > > enable it
> > > during the whole lifetime of the driver.
> > > 
> > > This policy isn't exactly new (so I do realize that I'm a bit late to the
> > > party), but it went one step further this cycle by adding a check on the 
> > > PWM
> > > state. This broke support for my nyan big, as the pwm driver does not 
> > > check
> > > for
> > > the previous state at probe time and reports it as disabled initially.
> > > 
> > > One could say that the driver has to be fixed to report that state (and I
> > > agree
> > > it is a desirable thing to do), but I think it is a symptom of a broader
> > > issue.
> > > 
> > > Basically, do we really want pwm_bl to behave this way? What is the
> > > rationale
> > > behind this decision, other than "because we can"? A strong argument 
> > > against
> > > it
> > > is that not all bootloaders have support for turning the backlight on 
> > > (that
> > > is
> > > definitely not the case on the omap3 sniper and omap4 kc1 boards with
> > > upstream
> > > U-Boot, that I introduced to mainline Linux).
> > > 
> > > Also, we can still expect the gpio/regulator/pwm drivers to be reset at
> > > probe
> > > time (and I also agree it's not necessarily a good thing, especially as 
> > > far
> > > as
> > > backlight is concerned, but that's the reality and dropping backlight
> > > support in
> > > those cases doesn't seem like an appropriate course of action). This will
> > > result
> > > in pwm_bl assuming that backlight was not enabled by the bootloader and 
> > > thus
> > > refuse to enable it at all times.
> > > 
> > > Comments and reactions are welcome, as I'd really like to find a sane way 
> > > to
> > > resolve this problem.
> > > 
> > > Cheers!

regards
Philipp



<    2   3   4   5   6   7   8   9   10   11   >