summaryrefslogtreecommitdiff
path: root/include/als.h
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2015-09-23 12:30:14 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-10-02 12:55:51 -0700
commit229094b2455e093c95d07251a0021f3b637e813c (patch)
tree9f9000c571d4c4dca79737902d14fe4a6a84643f /include/als.h
parent2aebfda07f3fe4d3ee058022f088283b35f4f976 (diff)
downloadchrome-ec-229094b2455e093c95d07251a0021f3b637e813c.tar.gz
ALS: Disable the ALS task if all the ALS inits fail
BUG=none TEST=Manually tested on Kunimitsu & Strago. Removed the ALS sensor from DUT, using "taskinfo" console command observed that the ALS task is not running. BRANCH=none Change-Id: I96cb720bd8d70033d433cdc2cd9cea9b56a3b389 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/301753 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/als.h')
-rw-r--r--include/als.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/als.h b/include/als.h
index c2a4e3a01e..89d1e06628 100644
--- a/include/als.h
+++ b/include/als.h
@@ -8,12 +8,16 @@
#include "common.h"
+/* Priority for ALS HOOK int */
+#define HOOK_PRIO_ALS_INIT (HOOK_PRIO_DEFAULT + 1)
+
/* Defined in board.h */
enum als_id;
/* Initialized in board.c */
struct als_t {
const char const *name;
+ int (*init)(void);
int (*read)(int *lux, int af);
int attenuation_factor;
};