Skip to contentSkip to conversation

drm: lima: Add support for multiple reset lines

PATCH In review John Stultz 2 participants 2 messages Oct 1, 2019 – Oct 5, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: lima: Add support for multiple reset lines

From: Peter Griffin <[email protected]>

Some SoCs like HiKey have 2 reset lines, so update to use the devm_reset_control_array_* variant of the API so that multiple resets can be specified in DT.

---
 drivers/gpu/drm/lima/lima_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/lima/lima_device.c +2 -1
index d86b8d81a483..e3e0ca11382e 100644
@@ -105,7 +105,8 @@ static int lima_clk_init(struct lima_device *dev)
 	if (err)
 		goto error_out0;
 
-	dev->reset = devm_reset_control_get_optional(dev->dev, NULL);
+	dev->reset = devm_reset_control_array_get_optional_shared(dev->dev);
+
 	if (IS_ERR(dev->reset)) {
 		err = PTR_ERR(dev->reset);
 		if (err != -EPROBE_DEFER)
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 33 lines · John Stultz

From: Peter Griffin <[email protected]>

Some SoCs like HiKey have 2 reset lines, so update to use the devm_reset_control_array_* variant of the API so that multiple resets can be specified in DT.

---
 drivers/gpu/drm/lima/lima_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/lima/lima_device.c +2 -2
index d86b8d81a483..e3e0ca11382e 100644
@@ -105,7 +105,8 @@ static int lima_clk_init(struct lima_device *dev)
        if (err)
                goto error_out0;
 
-       dev->reset = devm_reset_control_get_optional(dev->dev, NULL);
+       dev->reset = devm_reset_control_array_get_optional_shared(dev->dev);
+
        if (IS_ERR(dev->reset)) {
                err = PTR_ERR(dev->reset);
                if (err != -EPROBE_DEFER)
--
Quoted 2 lines

2.17.1

Looks good for me, patch is:

I'll apply it to drm-misc-next.

Thanks,
Qiang