mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
This unifies all the EC header files to use __CROS_EC_FILENAME_H as the include guard. Well, except for test/ util/ and extra/ which use __TEST_ __UTIL_ and __EXTRA_ prefixes respectively. BUG=chromium:496895 BRANCH=none TEST=make buildall -j Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Iea71b3a08bdec94a11239de810a2b2e152b15029 Reviewed-on: https://chromium-review.googlesource.com/278121 Reviewed-by: Randall Spangler <rspangler@chromium.org>
63 lines
1.4 KiB
C
63 lines
1.4 KiB
C
/* Copyright (c) 2014 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.
|
|
*/
|
|
|
|
/* NPCX-specific MFT module for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_FAN_CHIP_H
|
|
#define __CROS_EC_FAN_CHIP_H
|
|
|
|
/* MFT module select */
|
|
enum npcx_mft_module {
|
|
NPCX_MFT_MODULE_1 = 0,
|
|
NPCX_MFT_MODULE_2 = 0,
|
|
NPCX_MFT_MODULE_3 = 0,
|
|
/* Number of MFT modules */
|
|
NPCX_MFT_MODULE_COUNT
|
|
};
|
|
|
|
/* MFT module port */
|
|
enum npcx_mft_module_port {
|
|
NPCX_MFT_MODULE_PORT_TA,
|
|
NPCX_MFT_MODULE_PORT_TB,
|
|
/* Number of MFT module ports */
|
|
NPCX_MFT_MODULE_PORT_COUNT
|
|
};
|
|
|
|
/* Data structure to define MFT channels. */
|
|
struct mft_t {
|
|
/* MFT module ID */
|
|
enum npcx_mft_module module;
|
|
/* MFT port */
|
|
enum npcx_mft_module_port port;
|
|
/* MFT TCNT default count */
|
|
uint32_t default_count;
|
|
/* MFT freq */
|
|
uint32_t freq;
|
|
};
|
|
|
|
/* Tacho measurement state */
|
|
enum tacho_measure_state {
|
|
/* Tacho init state */
|
|
TACHO_IN_IDLE = 0,
|
|
/* Tacho first edge state */
|
|
TACHO_WAIT_FOR_1_EDGE,
|
|
/* Tacho second edge state */
|
|
TACHO_WAIT_FOR_2_EDGE,
|
|
/* Tacho underflow state */
|
|
TACHO_UNDERFLOW
|
|
};
|
|
|
|
/* Tacho status data structure */
|
|
struct tacho_status_t {
|
|
/* Current state of the measurement */
|
|
enum tacho_measure_state cur_state;
|
|
/* Pulse counter value between edge1 and edge2 */
|
|
uint32_t edge_interval;
|
|
};
|
|
|
|
extern const struct mft_t mft_channels[];
|
|
|
|
#endif /* __CROS_EC_FAN_CHIP_H */
|