Skip to content

Commit 6229b35

Browse files
prabhakarladWim Van Sebroeck
authored andcommitted
watchdog: rzv2h: Make "oscclk" and reset controller optional
Update the rzv2h_wdt driver to make the "oscclk" clock and reset controller optional. Use devm_clk_get_optional_prepared() to obtain the "oscclk" clock, allowing the driver to work on platforms that do not provide this clock, such as the RZ/T2H SoC. Similarly, use devm_reset_control_get_optional_exclusive() to allow the driver to function on platforms that lack a reset controller. These changes are preparatory steps for supporting the RZ/T2H SoC, which does not provide an "oscclk" clock or a reset controller. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
1 parent 19f7eae commit 6229b35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/watchdog/rzv2h_wdt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
230230
if (IS_ERR(priv->pclk))
231231
return dev_err_probe(dev, PTR_ERR(priv->pclk), "no pclk");
232232

233-
priv->oscclk = devm_clk_get_prepared(dev, "oscclk");
233+
priv->oscclk = devm_clk_get_optional_prepared(dev, "oscclk");
234234
if (IS_ERR(priv->oscclk))
235235
return dev_err_probe(dev, PTR_ERR(priv->oscclk), "no oscclk");
236236

237-
priv->rstc = devm_reset_control_get_exclusive(dev, NULL);
237+
priv->rstc = devm_reset_control_get_optional_exclusive(dev, NULL);
238238
if (IS_ERR(priv->rstc))
239239
return dev_err_probe(dev, PTR_ERR(priv->rstc),
240240
"failed to get cpg reset");

0 commit comments

Comments
 (0)