mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
This unifies the PWM module interface for LM4 and STM32. Now PWM channels are defined in board.h/board.c. Instead of calling functions named pwm_set_fan_duty(x), one can now use pwm_set_duty(PWM_CH_FAN, x), which prevents additional functions added when we have a new PWM channel. BUG=chrome-os-partner:18343 TEST=Limit input current on Spring. TEST=Check power LED in S0/S3/S5 on Snow. TEST=Check keyboard backlight functionality on Link. TEST=Check fan speed control/detecting on Link. BRANCH=None Change-Id: Ibac4d79f72e65c94776d503558a7592f7db859dc Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/64450 Reviewed-by: Randall Spangler <rspangler@chromium.org>
64 lines
1020 B
C
64 lines
1020 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.
|
|
*/
|
|
|
|
/* Emulator board configuration */
|
|
|
|
#ifndef __BOARD_H
|
|
#define __BOARD_H
|
|
|
|
/* Optional features */
|
|
#define CONFIG_EXTPOWER_GPIO
|
|
#undef CONFIG_FMAP
|
|
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
|
|
#define CONFIG_POWER_BUTTON
|
|
#undef CONFIG_WATCHDOG
|
|
#define CONFIG_PWM
|
|
|
|
#undef CONFIG_CONSOLE_HISTORY
|
|
#define CONFIG_CONSOLE_HISTORY 4
|
|
|
|
#define CONFIG_WP_ACTIVE_HIGH
|
|
|
|
/* Module IDs */
|
|
enum module_id {
|
|
MODULE_I2C,
|
|
MODULE_UART,
|
|
};
|
|
|
|
enum gpio_signal {
|
|
GPIO_EC_INT,
|
|
GPIO_LID_OPEN,
|
|
GPIO_POWER_BUTTON_L,
|
|
GPIO_WP,
|
|
GPIO_ENTERING_RW,
|
|
GPIO_AC_PRESENT,
|
|
|
|
GPIO_COUNT
|
|
};
|
|
|
|
enum temp_sensor_id {
|
|
TEMP_SENSOR_CPU = 0,
|
|
TEMP_SENSOR_BOARD,
|
|
TEMP_SENSOR_CASE,
|
|
TEMP_SENSOR_BATTERY,
|
|
|
|
TEMP_SENSOR_COUNT
|
|
};
|
|
|
|
enum adc_channel {
|
|
ADC_CH_CHARGER_CURRENT,
|
|
ADC_AC_ADAPTER_ID_VOLTAGE,
|
|
|
|
ADC_CH_COUNT
|
|
};
|
|
|
|
enum pwm_channel {
|
|
PWM_CH_FAN,
|
|
|
|
PWM_CH_COUNT
|
|
};
|
|
|
|
#endif /* __BOARD_H */
|