mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
Now that it doesn't need to leverage SWITCH_TASK to send the AC_CHANGE notification, pure GPIO-based external power detection can move from switch.c to its own file. BUG=chrome-os-partner:18256 BRANCH=none TEST=add AC power, UI shows charging indicator; remove AC, indicator goes away Change-Id: Id495f34185b7d971c241ac6d0a8311a6bf544507 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/45789
26 lines
595 B
C
26 lines
595 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 detection API for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_EXTPOWER_H
|
|
#define __CROS_EC_EXTPOWER_H
|
|
|
|
#include "common.h"
|
|
|
|
/**
|
|
* Return non-zero if external power is present.
|
|
*/
|
|
int extpower_is_present(void);
|
|
|
|
/**
|
|
* Interrupt handler for external power GPIOs.
|
|
*
|
|
* @param signal Signal which triggered the interrupt.
|
|
*/
|
|
void extpower_interrupt(enum gpio_signal signal);
|
|
|
|
#endif /* __CROS_EC_EXTPOWER_H */
|