Patchwork [8/8] lib: fwts_wakealarm.c: add more comments

login
register
mail settings
Submitter Colin King
Date May 25, 2012, 10:40 a.m.
Message ID <1337942453-30224-9-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/161284/
State Accepted
Headers show

Comments

Colin King - May 25, 2012, 10:40 a.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_wakealarm.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
Keng-Yu Lin - May 31, 2012, 6:51 a.m.
On Fri, May 25, 2012 at 6:40 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_wakealarm.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/src/lib/src/fwts_wakealarm.c b/src/lib/src/fwts_wakealarm.c
> index f830717..56d4317 100644
> --- a/src/lib/src/fwts_wakealarm.c
> +++ b/src/lib/src/fwts_wakealarm.c
> @@ -27,6 +27,11 @@
>
>  static char *fwts_wkalarm = "/sys/class/rtc/rtc0/wakealarm";
>
> +/*
> + *  fwts_wakealarm_get_irq_state()
> + *     get wakealarm IRQ state.  checks if alarm_IRQ exists and if
> + *     it is set.
> + */
>  int fwts_wakealarm_get_irq_state(void)
>  {
>        FILE *fp;
> @@ -47,6 +52,10 @@ int fwts_wakealarm_get_irq_state(void)
>        return FWTS_ERROR;
>  }
>
> +/*
> + *  fwts_wakealarm_trigger()
> + *     trigger the RTC wakealarm to fire in 'seconds' seconds from now.
> + */
>  int fwts_wakealarm_trigger(fwts_framework *fw, const int seconds)
>  {
>        char buffer[32];
> @@ -72,6 +81,11 @@ int fwts_wakealarm_trigger(fwts_framework *fw, const int seconds)
>        return FWTS_OK;
>  }
>
> +/*
> + *  fwts_wakealarm_test_firing()
> + *     test RTC wakealarm trigger and firing from 'seconds' seconds time
> + *     from now.  returns FWTS_OK if passed, otherwise FWTS_ERROR.
> + */
>  int fwts_wakealarm_test_firing(fwts_framework *fw, const int seconds)
>  {
>        int ret;
> --
> 1.7.10
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - June 1, 2012, 1:42 a.m.
On 05/25/2012 06:40 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   src/lib/src/fwts_wakealarm.c |   14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/src/lib/src/fwts_wakealarm.c b/src/lib/src/fwts_wakealarm.c
> index f830717..56d4317 100644
> --- a/src/lib/src/fwts_wakealarm.c
> +++ b/src/lib/src/fwts_wakealarm.c
> @@ -27,6 +27,11 @@
>
>   static char *fwts_wkalarm = "/sys/class/rtc/rtc0/wakealarm";
>
> +/*
> + *  fwts_wakealarm_get_irq_state()
> + *	get wakealarm IRQ state.  checks if alarm_IRQ exists and if
> + *	it is set.
> + */
>   int fwts_wakealarm_get_irq_state(void)
>   {
>   	FILE *fp;
> @@ -47,6 +52,10 @@ int fwts_wakealarm_get_irq_state(void)
>   	return FWTS_ERROR;
>   }
>
> +/*
> + *  fwts_wakealarm_trigger()
> + *	trigger the RTC wakealarm to fire in 'seconds' seconds from now.
> + */
>   int fwts_wakealarm_trigger(fwts_framework *fw, const int seconds)
>   {
>   	char buffer[32];
> @@ -72,6 +81,11 @@ int fwts_wakealarm_trigger(fwts_framework *fw, const int seconds)
>   	return FWTS_OK;
>   }
>
> +/*
> + *  fwts_wakealarm_test_firing()
> + *	test RTC wakealarm trigger and firing from 'seconds' seconds time
> + * 	from now.  returns FWTS_OK if passed, otherwise FWTS_ERROR.
> + */
>   int fwts_wakealarm_test_firing(fwts_framework *fw, const int seconds)
>   {
>   	int ret;
Acked-by: Ivan Hu<ivan.hu@canonical.com>

Patch

diff --git a/src/lib/src/fwts_wakealarm.c b/src/lib/src/fwts_wakealarm.c
index f830717..56d4317 100644
--- a/src/lib/src/fwts_wakealarm.c
+++ b/src/lib/src/fwts_wakealarm.c
@@ -27,6 +27,11 @@ 
 
 static char *fwts_wkalarm = "/sys/class/rtc/rtc0/wakealarm";
 
+/*
+ *  fwts_wakealarm_get_irq_state()
+ *	get wakealarm IRQ state.  checks if alarm_IRQ exists and if
+ *	it is set.
+ */
 int fwts_wakealarm_get_irq_state(void)
 {
 	FILE *fp;
@@ -47,6 +52,10 @@  int fwts_wakealarm_get_irq_state(void)
 	return FWTS_ERROR;
 }
 
+/*
+ *  fwts_wakealarm_trigger()
+ *	trigger the RTC wakealarm to fire in 'seconds' seconds from now.
+ */
 int fwts_wakealarm_trigger(fwts_framework *fw, const int seconds)
 {
 	char buffer[32];
@@ -72,6 +81,11 @@  int fwts_wakealarm_trigger(fwts_framework *fw, const int seconds)
 	return FWTS_OK;
 }
 
+/*
+ *  fwts_wakealarm_test_firing()
+ *	test RTC wakealarm trigger and firing from 'seconds' seconds time
+ * 	from now.  returns FWTS_OK if passed, otherwise FWTS_ERROR.
+ */
 int fwts_wakealarm_test_firing(fwts_framework *fw, const int seconds)
 {
 	int ret;