mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
clock management changes for i.MX
Another simple series related to clock management, this time only for imx. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIVAwUATwta7GCrR//JCVInAQJD6A//ZbZtOEctF1nfrpQ6LeoPdJFWUt/4d+GX JW2CksR94AB1BqTNV0N0a/pRUNTEo5bBVzeXJw8XnJSCNnIakJpFoeZBh93YTOsO ZfuxhYwkVrbCusELaltrSdj5lUW/KgE58vTpfCkkqGgyMQQTzH73zJyjNOYAaWAK FleQ5jCpxm3FqoA5jp9+7xcHwF+o2btKXzM4kyEO/cAaypEIOz83qAK16FKzIvuI ba9QgMXN5sAKwNMIkNYJruHknlshGT00NBlYJebT0MXbd7pyuN9VsIfMMEQ+VG8B 3hvfVvHrVeHiWoqdF0r8uxr/SZJiCZlE5RhDK1pO1MXPsroaOEAMSAeA/Y2193HK Dkz37iBBUf5T4mA5GfKb7dH4maM79OQ+SEtcQySF18hT+qCHeJV3J8WC0c7C81Ej 7RFBJjFfpwKwd/SXFKn/PYmlgJZ4aW1+FNyx5xnIjBNpnU8N9knw2h1qGVvcjp+V SRQ7zghQToDY425U0ziiFle3XsrC/a0QZrzbFo+rqgUXMZQ2Vq7CiZr/E8QNsbiE I0AVE6hlWEx3aXgDoHKb0K3kSthIT7QkmO2UjhJmplEIjgVZw+vfjmAM9O+AeWJC BYLzgl2CRAZekNBD77aUdB1VUVz2cUUQ2zgh0wH11k2ca2+h3Lyw4buzsV4u3nxj Fqinw2GEt2U= =czKE -----END PGP SIGNATURE----- Merge tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc clock management changes for i.MX Another simple series related to clock management, this time only for imx. * tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: mxs: select HAVE_CLK_PREPARE for clock clk: add config option HAVE_CLK_PREPARE into Kconfig ASoC: mxs-saif: convert to clk_prepare/clk_unprepare video: mxsfb: convert to clk_prepare/clk_unprepare serial: mxs-auart: convert to clk_prepare/clk_unprepare net: flexcan: convert to clk_prepare/clk_unprepare mtd: gpmi-lib: convert to clk_prepare/clk_unprepare mmc: mxs-mmc: convert to clk_prepare/clk_unprepare dma: mxs-dma: convert to clk_prepare/clk_unprepare net: fec: add clk_prepare/clk_unprepare ARM: mxs: convert platform code to clk_prepare/clk_unprepare clk: add helper functions clk_prepare_enable and clk_disable_unprepare Fix up trivial conflicts in drivers/net/ethernet/freescale/fec.c due to commit0ebafefcaa("net: fec: add clk_prepare/clk_unprepare") clashing trivially with commite163cc97f9("net/fec: fix the .remove code").
This commit is contained in:
commit
979ecef5b8
17 changed files with 97 additions and 58 deletions
|
|
@ -107,6 +107,28 @@ static inline void clk_unprepare(struct clk *clk)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* clk_prepare_enable helps cases using clk_enable in non-atomic context. */
|
||||
static inline int clk_prepare_enable(struct clk *clk)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = clk_prepare(clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = clk_enable(clk);
|
||||
if (ret)
|
||||
clk_unprepare(clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* clk_disable_unprepare helps cases using clk_disable in non-atomic context. */
|
||||
static inline void clk_disable_unprepare(struct clk *clk)
|
||||
{
|
||||
clk_disable(clk);
|
||||
clk_unprepare(clk);
|
||||
}
|
||||
|
||||
/**
|
||||
* clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
|
||||
* This is only valid once the clock source has been enabled.
|
||||
|
|
|
|||
Loading…
Reference in a new issue