Message ID | 1337942453-30224-3-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
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_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; > -- > 1.7.10 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
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_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@canonical.com>
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;