Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/sun4i: dsi: Get the mod clock for A31

As per the user manual, look like mod clock is not mandatory
for all Allwinner MIPI DSI controllers, it is connected to
CLK_DSI_SCLK for A31 and not available in A64.

So, add compatible check for A31 and get mod clock accordingly.

Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20191222132229.30276-4-jagan@amarulasolutions.com

authored by

Jagan Teki and committed by
Maxime Ripard
26a839b3 db08ca5a

+7 -4
+7 -4
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
··· 1120 1120 return PTR_ERR(dsi->reset); 1121 1121 } 1122 1122 1123 - dsi->mod_clk = devm_clk_get(dev, "mod"); 1124 - if (IS_ERR(dsi->mod_clk)) { 1125 - dev_err(dev, "Couldn't get the DSI mod clock\n"); 1126 - return PTR_ERR(dsi->mod_clk); 1123 + if (of_device_is_compatible(dev->of_node, 1124 + "allwinner,sun6i-a31-mipi-dsi")) { 1125 + dsi->mod_clk = devm_clk_get(dev, "mod"); 1126 + if (IS_ERR(dsi->mod_clk)) { 1127 + dev_err(dev, "Couldn't get the DSI mod clock\n"); 1128 + return PTR_ERR(dsi->mod_clk); 1129 + } 1127 1130 } 1128 1131 1129 1132 /*