diff options
Diffstat (limited to 'board/spring/battery.c')
-rw-r--r-- | board/spring/battery.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/board/spring/battery.c b/board/spring/battery.c deleted file mode 100644 index 246552786e..0000000000 --- a/board/spring/battery.c +++ /dev/null @@ -1,40 +0,0 @@ -/* 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. - * - * Smart battery driver for Spring. - */ - -#include "battery.h" -#include "battery_smart.h" - -/* Shutdown mode parameter to write to manufacturer access register */ -#define SB_SHUTDOWN_DATA 0x0010 - -/* Battery temperature ranges in degrees C */ -static const struct battery_info info = { - .start_charging_min_c = 5, - .start_charging_max_c = 45, - .charging_min_c = 5, - .charging_max_c = 60, - .discharging_min_c = 0, - .discharging_max_c = 100, -}; - -const struct battery_info *battery_get_info(void) -{ - return &info; -} - -int board_cut_off_battery(void) -{ - int rv; - - /* Ship mode command must be sent twice to take effect */ - rv = sb_write(SB_MANUFACTURER_ACCESS, SB_SHUTDOWN_DATA); - - if (rv != EC_SUCCESS) - return rv; - - return sb_write(SB_MANUFACTURER_ACCESS, SB_SHUTDOWN_DATA); -} |