Files
OpenCellular/board/host/board.h
Shawn Nematbakhsh 86835f7067 charge_manager: Allow board to reject a selected charge port
Modify board_set_active_charge_port to return status indicating whether
the selected charge port was rejected. If rejected, zero out its
available charge and attempt to select a different charge port.

Also, reduce the length of related console prints.

BUG=chrome-os-partner:34677
TEST=Manual on Samus. Plug C-to-Arec into port 1, verify that charge
manager does not select port 1 as active and charging icon is not seen
in OS.
BRANCH=Samus.

Change-Id: I56e3337f90c04b93ef7cc9873af6ee0f4b1ffc7d
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/236361
Reviewed-by: Alec Berg <alecaberg@chromium.org>
2014-12-17 22:26:56 +00:00

60 lines
1.1 KiB
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_POWER_BUTTON
#undef CONFIG_WATCHDOG
#define CONFIG_SWITCH
#define CONFIG_INDUCTIVE_CHARGING
#undef CONFIG_CONSOLE_HISTORY
#define CONFIG_CONSOLE_HISTORY 4
#define CONFIG_WP_ACTIVE_HIGH
#include "gpio_signal.h"
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
};
/* Charge suppliers */
enum charge_supplier {
CHARGE_SUPPLIER_TEST1,
CHARGE_SUPPLIER_TEST2,
CHARGE_SUPPLIER_TEST3,
CHARGE_SUPPLIER_TEST4,
CHARGE_SUPPLIER_TEST5,
CHARGE_SUPPLIER_TEST6,
CHARGE_SUPPLIER_TEST7,
CHARGE_SUPPLIER_TEST8,
CHARGE_SUPPLIER_TEST9,
CHARGE_SUPPLIER_COUNT
};
/* supplier_priority table defined in board.c */
extern const int supplier_priority[];
#endif /* __BOARD_H */