[PATCH 2/8] lib: fwts_button.c: add more comments

IvanHu ivan.hu at canonical.com
Fri Jun 1 01:40:29 UTC 2012


On 05/25/2012 06:40 PM, Colin King wrote:
> From: Colin Ian King<colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king at canonical.com>
> ---
>   src/lib/src/fwts_button.c |   19 +++++++++++++++++++
>   1 file changed, 19 insertions(+)
>
> diff --git a/src/lib/src/fwts_button.c b/src/lib/src/fwts_button.c
> index e0574b8..2b8302f 100644
> --- a/src/lib/src/fwts_button.c
> +++ b/src/lib/src/fwts_button.c
> @@ -29,6 +29,11 @@
>
>   #define FWTS_PROC_ACPI_BUTTON	"/proc/acpi/button"
>
> +/*
> + *  fwts_button_match_state_proc()
> + *	find matching button state and keep count of matching
> + *	any non-matching states found, via proc iterface
> + */
>   static int fwts_button_match_state_proc(fwts_framework *fw,
>   	int button, int *matched, int *not_matched)
>   {
> @@ -88,6 +93,20 @@ static int fwts_button_match_state_proc(fwts_framework *fw,
>   	return FWTS_OK;
>   }
>
> +/*
> + *  fwts_button_match_state_proc()
> + *	find matching button state and keep count of matching
> + *	any non-matching states found
> + *
> + *  The button state can be:
> + *	FWTS_BUTTON_LID_ANY      - match any LID button state
> + * 	FWTS_BUTTON_LID_OPENED   - match any LID buttons that are open
> + * 	FWTS_BUTTON_LID_CLOSED   - match any LID buttons that are closed
> + *	FWTS_BUTTON_POWER_EXISTS - match any power putton states
> + *
> + * 	matched is a count of any button states that match, and not_matched
> + *	is a count of any button states that don't match.
> + */
>   int fwts_button_match_state(fwts_framework *fw, int button, int *matched, int *not_matched)
>   {
>   	*matched = 0;
Acked-by: Ivan Hu<ivan.hu at canonical.com>




More information about the fwts-devel mailing list