Files
OpenCellular/common/battery_spring.c
Vic Yang 8961ef44e4 spring: Implement battery cut-off command
BUG=chrome-os-partner:18818
TEST='ectool batterycutoff' on Spring.
BRANCH=spring

Change-Id: Idf315562930744ae1e7425d6e15915b0477c2343
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49651
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2013-05-01 13:19:35 -07:00

22 lines
587 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.
*
* Smart battery driver for Spring.
*/
#include "host_command.h"
#include "smart_battery.h"
#define PARAM_CUT_OFF 0x0010
int battery_command_cut_off(struct host_cmd_handler_args *args)
{
sb_write(SB_MANUFACTURER_ACCESS, PARAM_CUT_OFF);
sb_write(SB_MANUFACTURER_ACCESS, PARAM_CUT_OFF);
return EC_RES_SUCCESS;
}
DECLARE_HOST_COMMAND(EC_CMD_BATTERY_CUT_OFF, battery_command_cut_off,
EC_VER_MASK(0));