mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
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>
38 lines
755 B
C
38 lines
755 B
C
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_ALS_H
|
|
#define __CROS_EC_ALS_H
|
|
|
|
#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;
|
|
};
|
|
|
|
extern struct als_t als[];
|
|
|
|
/**
|
|
* Read an ALS
|
|
*
|
|
* @param id Which one?
|
|
* @param lux Put value here
|
|
*
|
|
* @return EC_SUCCESS, or non-zero if error.
|
|
*/
|
|
int als_read(enum als_id id, int *lux);
|
|
|
|
#endif /* __CROS_EC_ALS_H */
|