From: Thomas Petazzoni Date: Fri, 21 Nov 2014 16:00:05 +0000 (+0100) Subject: clk: mvebu: add suspend/resume for gatable clocks X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~14^2~2^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f571053152f660769f9f39f150ac984bc4c6ac85;p=pandora-kernel.git clk: mvebu: add suspend/resume for gatable clocks This commit adds suspend/resume support for the gatable clock driver used on Marvell EBU platforms. When getting out of suspend, the Marvell EBU platforms go through the bootloader, which re-enables all gatable clocks. However, upon resume, the clock framework will not disable again all gatable clocks that are not used. Therefore, if the clock driver does not save/restore the state of the gatable clocks, all gatable clocks that are not claimed by any device driver will remain enabled after a resume. This is why this driver saves and restores the state of those clocks. Since clocks aren't real devices, we don't have the normal ->suspend() and ->resume() of the device model, and have to use the ->suspend() and ->resume() hooks of the syscore_ops mechanism. This mechanism has the unfortunate idea of not providing a way of passing private data, which requires us to change the driver to make the assumption that there is only once instance of the gatable clock control structure. Signed-off-by: Thomas Petazzoni Cc: Mike Turquette Cc: linux-kernel@vger.kernel.org Acked-by: Gregory CLEMENT Link: https://lkml.kernel.org/r/1416585613-2113-9-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper --- Reading git-diff-tree failed