blob: 5173e27f75f946c27ce76db67b71a1af825b538f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "gpio.h"
#include "power/qcom.h"
void board_set_switchcap_power(int enable)
{
gpio_set_level(GPIO_SWITCHCAP_ON, enable);
}
int board_is_switchcap_enabled(void)
{
return gpio_get_level(GPIO_SWITCHCAP_ON);
}
int board_is_switchcap_power_good(void)
{
return gpio_get_level(GPIO_SWITCHCAP_PG);
}
|