@@ -108,10 +108,22 @@ static int atmel_hlcdc_probe(struct platform_device *pdev)
return PTR_ERR(hlcdc->periph_clk);
}
+ /*
+ * Obtain one of the main clocks (GCK / LVDS PLL) required by the
+ * LCD to function,
+ * GCK for Parallel RGB and MIPI displays;
+ * LVDS PLL for LVDS displays.
+ */
+ hlcdc->sys_clk = NULL;
+ hlcdc->lvds_pll_clk = NULL;
hlcdc->sys_clk = devm_clk_get(dev, "sys_clk");
if (IS_ERR(hlcdc->sys_clk)) {
- dev_err(dev, "failed to get system clock\n");
- return PTR_ERR(hlcdc->sys_clk);
+ dev_dbg(dev, "failed to get system clock\n");
+ hlcdc->lvds_pll_clk = devm_clk_get(dev, "lvds_pll_clk");
+ if (IS_ERR(hlcdc->lvds_pll_clk)) {
+ dev_err(dev, "failed to get LVDS PLL clock\n");
+ return PTR_ERR(hlcdc->lvds_pll_clk);
+ }
}
hlcdc->slow_clk = devm_clk_get(dev, "slow_clk");
@@ -75,6 +75,7 @@
*/
struct atmel_hlcdc {
struct regmap *regmap;
+ struct clk *lvds_pll_clk;
struct clk *periph_clk;
struct clk *sys_clk;
struct clk *slow_clk;