mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-13 03:15:06 +00:00
gcc 8.1 complains about duplicate const, and while some of these really are duplicate, others look like they were supposed to tighten the API contract so that variables are "const pointer to const data", but didn't have that effect. BUG=b:65441143 BRANCH=none TEST=building Chrome EC as part of upstream coreboot's build with a gcc 8.1 compiler now works (better. there are other issues left) Change-Id: I6016c5f282516471746f08d5714ea07ebdd10331 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/1039812 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@google.com> Reviewed-by: Vincent Palatin <vpalatin@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 */
|