* [PATCH 019/102] drm: kirin: explicitly request exclusive reset control
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
@ 2017-07-19 15:25 ` Philipp Zabel
2017-07-19 15:25 ` [PATCH 020/102] drm/nouveau/tegra: " Philipp Zabel
` (8 subsequent siblings)
9 siblings, 0 replies; 23+ messages in thread
From: Philipp Zabel @ 2017-07-19 15:25 UTC (permalink / raw)
To: linux-kernel
Cc: Chen Feng, dri-devel, Xinliang Liu, Xinwei Kong, Rongrong Zou
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 <z.liuxinliang@hisilicon.com>
Cc: Rongrong Zou <zourongrong@gmail.com>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 020/102] drm/nouveau/tegra: explicitly request exclusive reset control
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
2017-07-19 15:25 ` [PATCH 019/102] drm: kirin: explicitly request exclusive reset control Philipp Zabel
@ 2017-07-19 15:25 ` Philipp Zabel
2017-07-19 15:25 ` [PATCH 021/102] drm/rockchip: " Philipp Zabel
` (7 subsequent siblings)
9 siblings, 0 replies; 23+ messages in thread
From: Philipp Zabel @ 2017-07-19 15:25 UTC (permalink / raw)
To: linux-kernel
Cc: Philipp Zabel, Ben Skeggs, David Airlie, Thierry Reding,
Jonathan Hunter, dri-devel, nouveau, linux-tegra
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 <bskeggs@redhat.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 021/102] drm/rockchip: explicitly request exclusive reset control
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
2017-07-19 15:25 ` [PATCH 019/102] drm: kirin: explicitly request exclusive reset control Philipp Zabel
2017-07-19 15:25 ` [PATCH 020/102] drm/nouveau/tegra: " Philipp Zabel
@ 2017-07-19 15:25 ` Philipp Zabel
2017-07-19 15:25 ` [PATCH 022/102] drm/sti: " Philipp Zabel
` (6 subsequent siblings)
9 siblings, 0 replies; 23+ messages in thread
From: Philipp Zabel @ 2017-07-19 15:25 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-rockchip, dri-devel
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 <mark.yao@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 022/102] drm/sti: explicitly request exclusive reset control
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
` (2 preceding siblings ...)
2017-07-19 15:25 ` [PATCH 021/102] drm/rockchip: " Philipp Zabel
@ 2017-07-19 15:25 ` Philipp Zabel
2017-07-20 10:09 ` Benjamin Gaignard
2017-07-19 15:25 ` [PATCH 023/102] drm/stm: " Philipp Zabel
` (5 subsequent siblings)
9 siblings, 1 reply; 23+ messages in thread
From: Philipp Zabel @ 2017-07-19 15:25 UTC (permalink / raw)
To: linux-kernel; +Cc: Philipp Zabel, Benjamin Gaignard, Vincent Abriou, dri-devel
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 <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 022/102] drm/sti: explicitly request exclusive reset control
2017-07-19 15:25 ` [PATCH 022/102] drm/sti: " Philipp Zabel
@ 2017-07-20 10:09 ` Benjamin Gaignard
0 siblings, 0 replies; 23+ messages in thread
From: Benjamin Gaignard @ 2017-07-20 10:09 UTC (permalink / raw)
To: Philipp Zabel
Cc: Vincent Abriou, Linux Kernel Mailing List,
dri-devel@lists.freedesktop.org
2017-07-19 17:25 GMT+02:00 Philipp Zabel <p.zabel@pengutronix.de>:
> 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 <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> ---
> 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
>
--
Benjamin Gaignard
Graphic Study Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 023/102] drm/stm: explicitly request exclusive reset control
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
` (3 preceding siblings ...)
2017-07-19 15:25 ` [PATCH 022/102] drm/sti: " Philipp Zabel
@ 2017-07-19 15:25 ` Philipp Zabel
2017-07-19 15:25 ` [PATCH 024/102] drm/sun4i: " Philipp Zabel
` (4 subsequent siblings)
9 siblings, 0 replies; 23+ messages in thread
From: Philipp Zabel @ 2017-07-19 15:25 UTC (permalink / raw)
To: linux-kernel
Cc: Philipp Zabel, Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
Vincent Abriou, dri-devel
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 <yannick.fertre@st.com>
Cc: Philippe Cornu <philippe.cornu@st.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 024/102] drm/sun4i: explicitly request exclusive reset control
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
` (4 preceding siblings ...)
2017-07-19 15:25 ` [PATCH 023/102] drm/stm: " Philipp Zabel
@ 2017-07-19 15:25 ` Philipp Zabel
2017-07-19 15:25 ` [PATCH 025/102] drm/tegra: " Philipp Zabel
` (3 subsequent siblings)
9 siblings, 0 replies; 23+ messages in thread
From: Philipp Zabel @ 2017-07-19 15:25 UTC (permalink / raw)
To: linux-kernel; +Cc: dri-devel, Maxime Ripard, Chen-Yu Tsai
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 <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 025/102] drm/tegra: explicitly request exclusive reset control
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
` (5 preceding siblings ...)
2017-07-19 15:25 ` [PATCH 024/102] drm/sun4i: " Philipp Zabel
@ 2017-07-19 15:25 ` Philipp Zabel
2017-07-19 15:25 ` [PATCH 026/102] gpu: host1x: " Philipp Zabel
` (2 subsequent siblings)
9 siblings, 0 replies; 23+ messages in thread
From: Philipp Zabel @ 2017-07-19 15:25 UTC (permalink / raw)
To: linux-kernel
Cc: Philipp Zabel, Thierry Reding, Jonathan Hunter, dri-devel,
linux-tegra
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 <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -2609,7 +2609,7 @@ static int tegra_sor_probe(struct platform_device *pdev)
}
if (!pdev->dev.pm_domain) {
- sor->rst = devm_reset_control_get(&pdev->dev, "sor");
+ sor->rst = devm_reset_control_get_exclusive(&pdev->dev, "sor");
if (IS_ERR(sor->rst)) {
err = PTR_ERR(sor->rst);
dev_err(&pdev->dev, "failed to get reset control: %d\n",
--
2.11.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 026/102] gpu: host1x: explicitly request exclusive reset control
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
` (6 preceding siblings ...)
2017-07-19 15:25 ` [PATCH 025/102] drm/tegra: " Philipp Zabel
@ 2017-07-19 15:25 ` Philipp Zabel
[not found] ` <20170719152646.25903-1-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-07-20 20:36 ` (no subject) Heiko Stuebner
9 siblings, 0 replies; 23+ messages in thread
From: Philipp Zabel @ 2017-07-19 15:25 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-tegra, Thierry Reding, dri-devel
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 <thierry.reding@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/gpu/host1x/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 2c58a390123a1..5af7055280c6c 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -170,7 +170,7 @@ static int host1x_probe(struct platform_device *pdev)
return err;
}
- host->rst = devm_reset_control_get(&pdev->dev, "host1x");
+ host->rst = devm_reset_control_get_exclusive(&pdev->dev, "host1x");
if (IS_ERR(host->rst)) {
err = PTR_ERR(host->rst);
dev_err(&pdev->dev, "failed to get reset: %d\n", err);
--
2.11.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 23+ messages in thread[parent not found: <20170719152646.25903-1-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: [PATCH 000/102] Convert drivers to explicit reset API
[not found] ` <20170719152646.25903-1-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2017-07-19 19:15 ` Thomas Petazzoni
2017-07-20 9:36 ` Philipp Zabel
2017-07-20 6:56 ` Maxime Ripard
2017-07-20 8:11 ` Greg Kroah-Hartman
2 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2017-07-19 19:15 UTC (permalink / raw)
To: Philipp Zabel
Cc: Andrew Lunn, Prashant Gaikwad, Heiko Stuebner, Peter Chen,
Linus Walleij, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Marc Dietrich, Rakesh Iyer, Peter Meerwald-Stadler,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang, Xinliang Liu,
Chanwoo Choi, Alan Stern, Jiri Slaby, Michael Turquette,
Guenter Roeck, Ohad Ben-Cohen, linux-pm-u79uwXL29TY76Z2rM5mHXA,
Thomas Gleixner, Vincent Abriou, Bin Liu, Greg Kroah-Hartman,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA
Hello,
On Wed, 19 Jul 2017 17:25:04 +0200, Philipp Zabel wrote:
> The reset control API has two modes: exclusive access, where the driver
> expects to have full and immediate control over the state of the reset
> line, and shared (clock-like) access, where drivers only request reset
> deassertion while active, but don't care about the state of the reset line
> while inactive.
>
> 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.
>
> This series converts all drivers that currently implicitly request
> exclusive reset controls to the corresponding explicit API call. It is,
> for the most part, generated from the following semantic patch:
>
> @@
> expression rstc, dev, id;
> @@
> -rstc = reset_control_get(dev, id);
> +rstc = reset_control_get_exclusive(dev, id);
I don't know if it has been discussed in the past, so forgive me if it
has been. Have you considered adding a "int flags" argument to the
existing reset_control_get_*() functions, rather than introducing
separate exclusive variants ?
Indeed, with a "int flags" argument you could in the future add more
variants/behaviors without actually multiplying the number of
functions. Something like the "flags" argument for request_irq() for
example.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 000/102] Convert drivers to explicit reset API
2017-07-19 19:15 ` [PATCH 000/102] Convert drivers to explicit reset API Thomas Petazzoni
@ 2017-07-20 9:36 ` Philipp Zabel
[not found] ` <1500543415.2354.37.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
0 siblings, 1 reply; 23+ messages in thread
From: Philipp Zabel @ 2017-07-20 9:36 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: linux-kernel, Andrew Lunn, Prashant Gaikwad, Heiko Stuebner,
Peter Chen, Linus Walleij, dri-devel, Marc Dietrich, Rakesh Iyer,
Peter Meerwald-Stadler, linux-clk, Wim Van Sebroeck, Wolfram Sang,
Xinliang Liu, Chanwoo Choi, Alan Stern, Jiri Slaby,
Michael Turquette, Guenter Roeck, Ohad Ben-Cohen, linux-pm,
Thomas Gleixner <tglx>
Hi Thomas,
On Wed, 2017-07-19 at 21:15 +0200, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 19 Jul 2017 17:25:04 +0200, Philipp Zabel wrote:
> > The reset control API has two modes: exclusive access, where the driver
> > expects to have full and immediate control over the state of the reset
> > line, and shared (clock-like) access, where drivers only request reset
> > deassertion while active, but don't care about the state of the reset line
> > while inactive.
> >
> > 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.
> >
> > This series converts all drivers that currently implicitly request
> > exclusive reset controls to the corresponding explicit API call. It is,
> > for the most part, generated from the following semantic patch:
> >
> > @@
> > expression rstc, dev, id;
> > @@
> > -rstc = reset_control_get(dev, id);
> > +rstc = reset_control_get_exclusive(dev, id);
>
> I don't know if it has been discussed in the past, so forgive me if it
> has been. Have you considered adding a "int flags" argument to the
> existing reset_control_get_*() functions, rather than introducing
> separate exclusive variants ?
>
> Indeed, with a "int flags" argument you could in the future add more
> variants/behaviors without actually multiplying the number of
> functions. Something like the "flags" argument for request_irq() for
> example.
I can't find the discussion right now, but I remember we had talked
about this in the past.
Behind the scenes, all the inline API functions already call common
entry points with flags (well, currently separate bool parameters for
shared and optional).
One reason against exposing those as an int flags in the user facing API
is the possibility to accidentally provide a wrong value.
regards
Philipp
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 000/102] Convert drivers to explicit reset API
[not found] ` <20170719152646.25903-1-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-07-19 19:15 ` [PATCH 000/102] Convert drivers to explicit reset API Thomas Petazzoni
@ 2017-07-20 6:56 ` Maxime Ripard
2017-07-20 8:11 ` Greg Kroah-Hartman
2 siblings, 0 replies; 23+ messages in thread
From: Maxime Ripard @ 2017-07-20 6:56 UTC (permalink / raw)
To: Philipp Zabel
Cc: Andrew Lunn, Prashant Gaikwad, Heiko Stuebner, Peter Chen,
Linus Walleij, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Marc Dietrich, Rakesh Iyer, Peter Meerwald-Stadler,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Wim Van Sebroeck, Wolfram Sang,
Xinliang Liu, Chanwoo Choi, Alan Stern, Jiri Slaby,
Michael Turquette, Guenter Roeck, Ohad Ben-Cohen,
linux-pm-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner, Vincent Abriou,
Bin Liu, Greg Kroah-Hartman, linux-usb-u79uwXL29TaqPxH82wqD4g
[-- Attachment #1.1: Type: text/plain, Size: 8914 bytes --]
On Wed, Jul 19, 2017 at 05:25:04PM +0200, Philipp Zabel wrote:
> The reset control API has two modes: exclusive access, where the driver
> expects to have full and immediate control over the state of the reset
> line, and shared (clock-like) access, where drivers only request reset
> deassertion while active, but don't care about the state of the reset line
> while inactive.
>
> 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.
>
> This series converts all drivers that currently implicitly request
> exclusive reset controls to the corresponding explicit API call. It is,
> for the most part, generated from the following semantic patch:
>
> @@
> expression rstc, dev, id;
> @@
> -rstc = reset_control_get(dev, id);
> +rstc = reset_control_get_exclusive(dev, id);
> @@
> expression rstc, dev, id;
> @@
> -rstc = reset_control_get_optional(dev, id);
> +rstc = reset_control_get_optional_exclusive(dev, id);
> @@
> expression rstc, node, id;
> @@
> -rstc = of_reset_control_get(node, id);
> +rstc = of_reset_control_get_exclusive(node, id);
> @@
> expression rstc, node, index;
> @@
> -rstc = of_reset_control_get_by_index(node, index);
> +rstc = of_reset_control_get_exclusive_by_index(node, index);
> @@
> expression rstc, dev, id;
> @@
> -rstc = devm_reset_control_get(dev, id);
> +rstc = devm_reset_control_get_exclusive(dev, id);
> @@
> expression rstc, dev, id;
> @@
> -rstc = devm_reset_control_get_optional(dev, id);
> +rstc = devm_reset_control_get_optional_exclusive(dev, id);
> @@
> expression rstc, dev, index;
> @@
> -rstc = devm_reset_control_get_by_index(dev, index);
> +rstc = devm_reset_control_get_exclusive_by_index(dev, index);
>
> After all driver patches are applied, the temporary transition helpers
> can be removed.
>
> regards
> Philipp
>
> Philipp Zabel (102):
> ARM: rockchip: explicitly request exclusive reset control
> ARM: socfpga: explicitly request exclusive reset control
> MIPS: pci-mt7620: explicitly request exclusive reset control
> ahci: st: explicitly request exclusive reset control
> ata: sata_gemini: explicitly request exclusive reset control
> ata: ahci_tegra: explicitly request exclusive reset control
> bus: sunxi-rsb: explicitly request exclusive reset control
> bus: tegra-gmi: explicitly request exclusive reset control
> clk: sunxi: explicitly request exclusive reset control
> clk: tegra: explicitly request exclusive reset control
> clocksource/drivers/timer-stm32: explicitly request exclusive reset
> control
> clocksource/drivers/sun5i: explicitly request exclusive reset control
> crypto: rockchip: explicitly request exclusive reset control
> crypto: sun4i-ss - request exclusive reset control
> PM / devfreq: tegra: explicitly request exclusive reset control
> dmaengine: stm32-dma: explicitly request exclusive reset control
> dmaengine: sun6i: explicitly request exclusive reset control
> dmaengine: tegra-apb: explicitly request exclusive reset control
> drm: kirin: explicitly request exclusive reset control
> drm/nouveau/tegra: explicitly request exclusive reset control
> drm/rockchip: explicitly request exclusive reset control
> drm/sti: explicitly request exclusive reset control
> drm/stm: explicitly request exclusive reset control
> drm/sun4i: explicitly request exclusive reset control
> drm/tegra: explicitly request exclusive reset control
> gpu: host1x: explicitly request exclusive reset control
> i2c: mv64xxx: explicitly request exclusive reset control
> i2c: stm32f4: explicitly request exclusive reset control
> i2c: sun6i-pw2i: explicitly request exclusive reset control
> i2c: tegra: explicitly request exclusive reset control
> iio: adc: rockchip_saradc: explicitly request exclusive reset control
> iio: dac: stm32-dac-core: explicitly request exclusive reset control
> Input: tegra-kbc - request exclusive reset control
> coda: explicitly request exclusive reset control
> st-rc: explicitly request exclusive reset control
> stm32-dcmi: explicitly request exclusive reset control
> rc: sunxi-cir: explicitly request exclusive reset control
> mmc: dw_mmc: explicitly request exclusive reset control
> mmc: sdhci-st: explicitly request exclusive reset control
> mmc: sunxi: explicitly request exclusive reset control
> mmc: tegra: explicitly request exclusive reset control
> mtd: nand: sunxi: explicitly request exclusive reset control
> mtd: spi-nor: stm32-quadspi: explicitly request exclusive reset
> control
> net: dsa: mt7530: explicitly request exclusive reset control
> net: ethernet: hisi_femac: explicitly request exclusive reset control
> net: ethernet: hix5hd2_gmac: explicitly request exclusive reset
> control
> net: stmmac: explicitly request exclusive reset control
> net: stmmac: dwc-qos: explicitly request exclusive reset control
> ath10k: explicitly request exclusive reset control
> nvmem: lpc18xx-eeprom: explicitly request exclusive reset control
> PCI: dwc: pcie-qcom: explicitly request exclusive reset control
> PCI: imx6: explicitly request exclusive reset control
> PCI: tegra: explicitly request exclusive reset control
> PCI: rockchip: explicitly request exclusive reset control
> phy: berlin-usb: explicitly request exclusive reset control
> PCI: mediatek: explicitly request exclusive reset control
> phy: qcom-usb-hs: explicitly request exclusive reset control
> phy: rockchip-pcie: explicitly request exclusive reset control
> phy: rockchip-typec: explicitly request exclusive reset control
> phy: rockchip-usb: explicitly request exclusive reset control
> phy: sun4i-usb: explicitly request exclusive reset control
> phy: sun9i-usb: explicitly request exclusive reset control
> phy: tegra: explicitly request exclusive reset control
> phy: qcom-qmp: explicitly request exclusive reset control
> phy: qcom-qusb2: explicitly request exclusive reset control
> pinctrl: stm32: explicitly request exclusive reset control
> pinctrl: sunxi: explicitly request exclusive reset control
> pinctrl: tegra: explicitly request exclusive reset control
> pwm: hibvt: explicitly request exclusive reset control
> pwm: tegra: explicitly request exclusive reset control
> remoteproc/keystone: explicitly request exclusive reset control
> remoteproc: qcom: explicitly request exclusive reset control
> remoteproc: st: explicitly request exclusive reset control
> soc: mediatek: PMIC wrap: explicitly request exclusive reset control
> soc/tegra: pmc: explicitly request exclusive reset control
> spi: stm32: explicitly request exclusive reset control
> spi: sun6i: explicitly request exclusive reset control
> spi: tegra20-slink: explicitly request exclusive reset control
> spi: tegra114: explicitly request exclusive reset control
> spi: tegra20-sflash: explicitly request exclusive reset control
> staging: nvec: explicitly request exclusive reset control
> thermal: rockchip: explicitly request exclusive reset control
> thermal: tegra: explicitly request exclusive reset control
> serial: 8250_dw: explicitly request exclusive reset control
> serial: tegra: explicitly request exclusive reset control
> usb: chipidea: msm: explicitly request exclusive reset control
> usb: dwc2: explicitly request exclusive reset control
> usb: host: ehci-tegra: explicitly request exclusive reset control
> usb: host: xhci-tegra: explicitly request exclusive reset control
> usb: musb: sunxi: explicitly request exclusive reset control
> usb: phy: msm: explicitly request exclusive reset control
> usb: phy: qcom-8x16-usb: explicitly request exclusive reset control
> watchdog: asm9260: explicitly request exclusive reset control
> watchdog: mt7621: explicitly request exclusive reset control
> watchdog: rt2880: explicitly request exclusive reset control
> watchdog: zx2967: explicitly request exclusive reset control
> ASoC: img: explicitly request exclusive reset control
> ASoC: stm32: explicitly request exclusive reset control
> ASoC: sun4i: explicitly request exclusive reset control
> ASoC: tegra: explicitly request exclusive reset control
> Documentation: devres: add explicit exclusive/shared reset control
> request calls
> reset: finish transition to explicit exclusive reset control requests
For all sunxi patches:
Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
[-- Attachment #2: Type: text/plain, Size: 200 bytes --]
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 000/102] Convert drivers to explicit reset API
[not found] ` <20170719152646.25903-1-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-07-19 19:15 ` [PATCH 000/102] Convert drivers to explicit reset API Thomas Petazzoni
2017-07-20 6:56 ` Maxime Ripard
@ 2017-07-20 8:11 ` Greg Kroah-Hartman
2017-07-20 9:24 ` Philipp Zabel
2 siblings, 1 reply; 23+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-20 8:11 UTC (permalink / raw)
To: Philipp Zabel
Cc: Andrew Lunn, Prashant Gaikwad, Heiko Stuebner, Peter Chen,
Linus Walleij, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Marc Dietrich, Rakesh Iyer, Peter Meerwald-Stadler,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Wim Van Sebroeck, Wolfram Sang,
Xinliang Liu, Chanwoo Choi, Alan Stern, Jiri Slaby,
Michael Turquette, Guenter Roeck, Ohad Ben-Cohen,
linux-pm-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner, Vincent Abriou,
Bin Liu, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel@
On Wed, Jul 19, 2017 at 05:25:04PM +0200, Philipp Zabel wrote:
> The reset control API has two modes: exclusive access, where the driver
> expects to have full and immediate control over the state of the reset
> line, and shared (clock-like) access, where drivers only request reset
> deassertion while active, but don't care about the state of the reset line
> while inactive.
>
> 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.
>
> This series converts all drivers that currently implicitly request
> exclusive reset controls to the corresponding explicit API call. It is,
> for the most part, generated from the following semantic patch:
Hey, I'm all for large api changes, but this really seems ackward, isn't
there a "better" way to do this?
Why not, as you say the "implicit" request is exclusive, just leave
everything alone and state that the "reset_control_get()" call is
exclusive and make the shared one the "odd" usage as that seems to not
be the normal case.
That should be a much smaller patch right?
That way you don't break everything here, and require 100+ patches to
just change the name of a function from one to another and do nothing
else.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 000/102] Convert drivers to explicit reset API
2017-07-20 8:11 ` Greg Kroah-Hartman
@ 2017-07-20 9:24 ` Philipp Zabel
0 siblings, 0 replies; 23+ messages in thread
From: Philipp Zabel @ 2017-07-20 9:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Andrew Lunn, Prashant Gaikwad, Heiko Stuebner, Peter Chen,
Linus Walleij, dri-devel, Marc Dietrich, Rakesh Iyer,
Peter Meerwald-Stadler, linux-clk, Wim Van Sebroeck, Wolfram Sang,
Xinliang Liu, Chanwoo Choi, Alan Stern, Jiri Slaby,
Michael Turquette, Guenter Roeck, Ohad Ben-Cohen, linux-pm,
Thomas Gleixner, Vincent Abriou, Bin Liu, linux-usb,
linux-wireless, linux-kernel@
Hi Greg,
The patches in this series are completely independent of each other, and
I would like the subsystem maintainers to apply them at their own
leisure.
Well, except for the last one, which I will apply only after there are
no more users of the transition helpers.
On Thu, 2017-07-20 at 10:11 +0200, Greg Kroah-Hartman wrote:
> On Wed, Jul 19, 2017 at 05:25:04PM +0200, Philipp Zabel wrote:
> > The reset control API has two modes: exclusive access, where the driver
> > expects to have full and immediate control over the state of the reset
> > line, and shared (clock-like) access, where drivers only request reset
> > deassertion while active, but don't care about the state of the reset line
> > while inactive.
> >
> > 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.
> >
> > This series converts all drivers that currently implicitly request
> > exclusive reset controls to the corresponding explicit API call. It is,
> > for the most part, generated from the following semantic patch:
>
> Hey, I'm all for large api changes, but this really seems ackward, isn't
> there a "better" way to do this?
It is a bit awkward. I am sorry I haven't done this earlier. Quite a few
new drivers started using the old API after the explicit requests were
introduced last year.
> Why not, as you say the "implicit" request is exclusive, just leave
> everything alone and state that the "reset_control_get()" call is
> exclusive
I think it is better to let the drivers explicitly state what they
expect from the API, and using reset_control_get_exclusive vs _shared
helps driver developers to make a conscious decision.
Further, the implicit API call predates shared reset support, so it is
not clear that all of the old users really need exclusive control.
A few drivers have been switched to the shared API already.
> and make the shared one the "odd" usage as that seems to not
> be the normal case.
I am not sure, there have been people arguing that the "clock-like" case
really is the common one. I suppose some of those drivers touched by the
100 patches in this series could also be changed to shared. But I don't
dare to make this decision for each of them.
> That should be a much smaller patch right?
>
> That way you don't break everything here, and require 100+ patches to
> just change the name of a function from one to another and do nothing
> else.
I don't break anything here, and I'm absolutely fine with squashing
patches together per subsystem where that is preferable.
regards
Philipp
^ permalink raw reply [flat|nested] 23+ messages in thread
* (no subject)
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
` (8 preceding siblings ...)
[not found] ` <20170719152646.25903-1-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2017-07-20 20:36 ` Heiko Stuebner
9 siblings, 0 replies; 23+ messages in thread
From: Heiko Stuebner @ 2017-07-20 20:36 UTC (permalink / raw)
To: Philipp Zabel
Cc: linux-kernel, David S. Miller, Emilio López, Adrian Hunter,
Alan Stern, Alan Tull, Alexandre Torgue, Andrew Lunn, Ben Skeggs,
Benjamin Gaignard, Bin Liu, Bjorn Andersson, Bjorn Helgaas,
Boris Brezillon, Brian Norris, Chanwoo Choi, Chen Feng,
Chen-Yu Tsai, Corentin Labbe, Cyrille Pitchen, Dan Williams,
Daniel Lezcano
Hi,
> crypto: rockchip: explicitly request exclusive reset control
> iio: adc: rockchip_saradc: explicitly request exclusive reset control
> PCI: rockchip: explicitly request exclusive reset control
> phy: rockchip-pcie: explicitly request exclusive reset control
> phy: rockchip-typec: explicitly request exclusive reset control
> phy: rockchip-usb: explicitly request exclusive reset control
> thermal: rockchip: explicitly request exclusive reset control
for the driver-related Rockchip changes
Acked-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 23+ messages in thread