mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
Make internal APIs static, and remove board_ prefix for clarity. Move TSU6721 calls from charger task to extpower_usb functions for better encapsulation. No functional changes, just moving code. Yes, this will make cherry-picking back from spring to TOT less convenient, but now the code is more readable and it will make maintaining the PMU code easier as we add boards. BUG=chrome-os-partner:18343 BRANCH=none TEST=build spring Change-Id: I52b37e57fc8519859996a110b0503277c6f0bbc8 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47657
40 lines
993 B
C
40 lines
993 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.
|
|
*/
|
|
|
|
/* External power via USB for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_EXTPOWER_USB_H
|
|
#define __CROS_EC_EXTPOWER_USB_H
|
|
|
|
#include "common.h"
|
|
|
|
/*
|
|
* TODO: this currently piggy-backs on the charger task. Should be able to
|
|
* move updates to deferred functions and get rid of all the ifdef's in the
|
|
* charger task. At that point, all these APIs will be internal to the
|
|
* extpower module and this entire header file can go away.
|
|
*/
|
|
|
|
/**
|
|
* Properly limit input power on EC boot.
|
|
*
|
|
* Called from charger task.
|
|
*/
|
|
void extpower_charge_init(void);
|
|
|
|
/**
|
|
* Update external power state.
|
|
*
|
|
* Called from charger task.
|
|
*/
|
|
void extpower_charge_update(int force_update);
|
|
|
|
/**
|
|
* Return non-zero if external power needs update from charge task.
|
|
*/
|
|
int extpower_charge_needs_update(void);
|
|
|
|
#endif /* __CROS_EC_EXTPOWER_USB_H */
|