diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-01-26 22:13:02 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-01-26 22:13:02 -0500 |
commit | f0271d65f9ac511d2e3e1fdbcd7418a5a7df0769 (patch) | |
tree | 11955198152ab0fcef09adc276dd98e3dc5c898c /arch/arm/mach-omap2/clockdomain.c | |
parent | 915aad89fcc57a03511c69915b3876f4e53074ee (diff) |
OMAP clockdomain/powerdomain: improve documentation
This patch only affects documentation; no functional changes are
included.
Clean up comments in the current clockdomain, powerdomain code and
header files. This mostly involves conversion to kerneldoc format,
although some clarifications are also included.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.c')
-rw-r--r-- | arch/arm/mach-omap2/clockdomain.c | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 6eaa9314cd64..a38a615b422f 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -351,10 +351,10 @@ static void _init_sleepdep_usecount(struct clockdomain *clkdm) | |||
351 | * @init_autodeps: optional pointer to an array of autodeps to register | 351 | * @init_autodeps: optional pointer to an array of autodeps to register |
352 | * | 352 | * |
353 | * Set up internal state. If a pointer to an array of clockdomains | 353 | * Set up internal state. If a pointer to an array of clockdomains |
354 | * was supplied, loop through the list of clockdomains, register all | 354 | * @clkdms was supplied, loop through the list of clockdomains, |
355 | * that are available on the current platform. Similarly, if a pointer | 355 | * register all that are available on the current platform. Similarly, |
356 | * to an array of clockdomain autodependencies was provided, register | 356 | * if a pointer to an array of clockdomain autodependencies |
357 | * those. No return value. | 357 | * @init_autodeps was provided, register those. No return value. |
358 | */ | 358 | */ |
359 | void clkdm_init(struct clockdomain **clkdms, | 359 | void clkdm_init(struct clockdomain **clkdms, |
360 | struct clkdm_autodep *init_autodeps) | 360 | struct clkdm_autodep *init_autodeps) |
@@ -386,8 +386,8 @@ void clkdm_init(struct clockdomain **clkdms, | |||
386 | * clkdm_lookup - look up a clockdomain by name, return a pointer | 386 | * clkdm_lookup - look up a clockdomain by name, return a pointer |
387 | * @name: name of clockdomain | 387 | * @name: name of clockdomain |
388 | * | 388 | * |
389 | * Find a registered clockdomain by its name. Returns a pointer to the | 389 | * Find a registered clockdomain by its name @name. Returns a pointer |
390 | * struct clockdomain if found, or NULL otherwise. | 390 | * to the struct clockdomain if found, or NULL otherwise. |
391 | */ | 391 | */ |
392 | struct clockdomain *clkdm_lookup(const char *name) | 392 | struct clockdomain *clkdm_lookup(const char *name) |
393 | { | 393 | { |
@@ -412,8 +412,8 @@ struct clockdomain *clkdm_lookup(const char *name) | |||
412 | * clkdm_for_each - call function on each registered clockdomain | 412 | * clkdm_for_each - call function on each registered clockdomain |
413 | * @fn: callback function * | 413 | * @fn: callback function * |
414 | * | 414 | * |
415 | * Call the supplied function for each registered clockdomain. | 415 | * Call the supplied function @fn for each registered clockdomain. |
416 | * The callback function can return anything but 0 to bail | 416 | * The callback function @fn can return anything but 0 to bail |
417 | * out early from the iterator. The callback function is called with | 417 | * out early from the iterator. The callback function is called with |
418 | * the clkdm_mutex held, so no clockdomain structure manipulation | 418 | * the clkdm_mutex held, so no clockdomain structure manipulation |
419 | * functions should be called from the callback, although hardware | 419 | * functions should be called from the callback, although hardware |
@@ -446,7 +446,7 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), | |||
446 | * @clkdm: struct clockdomain * | 446 | * @clkdm: struct clockdomain * |
447 | * | 447 | * |
448 | * Return a pointer to the struct powerdomain that the specified clockdomain | 448 | * Return a pointer to the struct powerdomain that the specified clockdomain |
449 | * 'clkdm' exists in, or returns NULL if clkdm argument is NULL. | 449 | * @clkdm exists in, or returns NULL if @clkdm is NULL. |
450 | */ | 450 | */ |
451 | struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm) | 451 | struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm) |
452 | { | 452 | { |
@@ -759,10 +759,10 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) | |||
759 | 759 | ||
760 | /** | 760 | /** |
761 | * omap2_clkdm_clktrctrl_read - read the clkdm's current state transition mode | 761 | * omap2_clkdm_clktrctrl_read - read the clkdm's current state transition mode |
762 | * @clk: struct clk * of a clockdomain | 762 | * @clkdm: struct clkdm * of a clockdomain |
763 | * | 763 | * |
764 | * Return the clockdomain's current state transition mode from the | 764 | * Return the clockdomain @clkdm current state transition mode from the |
765 | * corresponding domain OMAP2_CM_CLKSTCTRL register. Returns -EINVAL if clk | 765 | * corresponding domain CM_CLKSTCTRL register. Returns -EINVAL if @clkdm |
766 | * is NULL or the current mode upon success. | 766 | * is NULL or the current mode upon success. |
767 | */ | 767 | */ |
768 | static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm) | 768 | static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm) |
@@ -784,7 +784,7 @@ static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm) | |||
784 | * @clkdm: struct clockdomain * | 784 | * @clkdm: struct clockdomain * |
785 | * | 785 | * |
786 | * Instruct the CM to force a sleep transition on the specified | 786 | * Instruct the CM to force a sleep transition on the specified |
787 | * clockdomain 'clkdm'. Returns -EINVAL if clk is NULL or if | 787 | * clockdomain @clkdm. Returns -EINVAL if @clkdm is NULL or if |
788 | * clockdomain does not support software-initiated sleep; 0 upon | 788 | * clockdomain does not support software-initiated sleep; 0 upon |
789 | * success. | 789 | * success. |
790 | */ | 790 | */ |
@@ -828,7 +828,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm) | |||
828 | * @clkdm: struct clockdomain * | 828 | * @clkdm: struct clockdomain * |
829 | * | 829 | * |
830 | * Instruct the CM to force a wakeup transition on the specified | 830 | * Instruct the CM to force a wakeup transition on the specified |
831 | * clockdomain 'clkdm'. Returns -EINVAL if clkdm is NULL or if the | 831 | * clockdomain @clkdm. Returns -EINVAL if @clkdm is NULL or if the |
832 | * clockdomain does not support software-controlled wakeup; 0 upon | 832 | * clockdomain does not support software-controlled wakeup; 0 upon |
833 | * success. | 833 | * success. |
834 | */ | 834 | */ |
@@ -871,7 +871,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm) | |||
871 | * omap2_clkdm_allow_idle - enable hwsup idle transitions for clkdm | 871 | * omap2_clkdm_allow_idle - enable hwsup idle transitions for clkdm |
872 | * @clkdm: struct clockdomain * | 872 | * @clkdm: struct clockdomain * |
873 | * | 873 | * |
874 | * Allow the hardware to automatically switch the clockdomain into | 874 | * Allow the hardware to automatically switch the clockdomain @clkdm into |
875 | * active or idle states, as needed by downstream clocks. If the | 875 | * active or idle states, as needed by downstream clocks. If the |
876 | * clockdomain has any downstream clocks enabled in the clock | 876 | * clockdomain has any downstream clocks enabled in the clock |
877 | * framework, wkdep/sleepdep autodependencies are added; this is so | 877 | * framework, wkdep/sleepdep autodependencies are added; this is so |
@@ -904,8 +904,8 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm) | |||
904 | * @clkdm: struct clockdomain * | 904 | * @clkdm: struct clockdomain * |
905 | * | 905 | * |
906 | * Prevent the hardware from automatically switching the clockdomain | 906 | * Prevent the hardware from automatically switching the clockdomain |
907 | * into inactive or idle states. If the clockdomain has downstream | 907 | * @clkdm into inactive or idle states. If the clockdomain has |
908 | * clocks enabled in the clock framework, wkdep/sleepdep | 908 | * downstream clocks enabled in the clock framework, wkdep/sleepdep |
909 | * autodependencies are removed. No return value. | 909 | * autodependencies are removed. No return value. |
910 | */ | 910 | */ |
911 | void omap2_clkdm_deny_idle(struct clockdomain *clkdm) | 911 | void omap2_clkdm_deny_idle(struct clockdomain *clkdm) |
@@ -936,14 +936,14 @@ void omap2_clkdm_deny_idle(struct clockdomain *clkdm) | |||
936 | * @clkdm: struct clockdomain * | 936 | * @clkdm: struct clockdomain * |
937 | * @clk: struct clk * of the enabled downstream clock | 937 | * @clk: struct clk * of the enabled downstream clock |
938 | * | 938 | * |
939 | * Increment the usecount of this clockdomain 'clkdm' and ensure that | 939 | * Increment the usecount of the clockdomain @clkdm and ensure that it |
940 | * it is awake. Intended to be called by clk_enable() code. If the | 940 | * is awake before @clk is enabled. Intended to be called by |
941 | * clockdomain is in software-supervised idle mode, force the | 941 | * clk_enable() code. If the clockdomain is in software-supervised |
942 | * clockdomain to wake. If the clockdomain is in hardware-supervised | 942 | * idle mode, force the clockdomain to wake. If the clockdomain is in |
943 | * idle mode, add clkdm-pwrdm autodependencies, to ensure that devices | 943 | * hardware-supervised idle mode, add clkdm-pwrdm autodependencies, to |
944 | * in the clockdomain can be read from/written to by on-chip processors. | 944 | * ensure that devices in the clockdomain can be read from/written to |
945 | * Returns -EINVAL if passed null pointers; returns 0 upon success or | 945 | * by on-chip processors. Returns -EINVAL if passed null pointers; |
946 | * if the clockdomain is in hwsup idle mode. | 946 | * returns 0 upon success or if the clockdomain is in hwsup idle mode. |
947 | */ | 947 | */ |
948 | int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) | 948 | int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) |
949 | { | 949 | { |
@@ -988,13 +988,14 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) | |||
988 | * @clkdm: struct clockdomain * | 988 | * @clkdm: struct clockdomain * |
989 | * @clk: struct clk * of the disabled downstream clock | 989 | * @clk: struct clk * of the disabled downstream clock |
990 | * | 990 | * |
991 | * Decrement the usecount of this clockdomain 'clkdm'. Intended to be | 991 | * Decrement the usecount of this clockdomain @clkdm when @clk is |
992 | * called by clk_disable() code. If the usecount goes to 0, put the | 992 | * disabled. Intended to be called by clk_disable() code. If the |
993 | * clockdomain to sleep (software-supervised mode) or remove the | 993 | * clockdomain usecount goes to 0, put the clockdomain to sleep |
994 | * clkdm-pwrdm autodependencies (hardware-supervised mode). Returns | 994 | * (software-supervised mode) or remove the clkdm autodependencies |
995 | * -EINVAL if passed null pointers; -ERANGE if the clkdm usecount | 995 | * (hardware-supervised mode). Returns -EINVAL if passed null |
996 | * underflows and debugging is enabled; or returns 0 upon success or | 996 | * pointers; -ERANGE if the @clkdm usecount underflows and debugging |
997 | * if the clockdomain is in hwsup idle mode. | 997 | * is enabled; or returns 0 upon success or if the clockdomain is in |
998 | * hwsup idle mode. | ||
998 | */ | 999 | */ |
999 | int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) | 1000 | int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) |
1000 | { | 1001 | { |