On Mon, 29 Jan 2018 15:59:33 +0200 Tomi Valkeinen tomi.valkeinen@ti.com wrote:
On 29/01/18 15:14, Boris Brezillon wrote:
You don't disable the dsi_sys_clk neither in the ok nor in the error paths.
Hm, it shouldn't be enabled in the first place: the runtime resume hook takes care of enabling it, and we don't need this clock to access IP registers (which is all we do in the probe).
Ah, right, you can just use pm_runtime directly to enable the IP.
I was looking at the docs, but it wasn't quite clear to me when exactly dsi_sys_clk is needed. I take it that you can access registers with just the dsi_p_clk, but you can't really do anything with the IP without dsi_sys_clk? If so, I think enabling both dsi_p_clk and dsi_sys_clk in the runtime PM callbacks is ok.
That's my understanding.
Alternatively, if dsi_sys_clk is only needed for some specific functionality, a more correct way would be to enable that clock only when that operation is performed.
IIUC, it's needed to clock the PPI domain, so any operation transmitting things on the DSI bus requires the sys clock.