mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
Replace all license headers with the SPDX-License-Identitier headers to follow the current recommendations. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
40 lines
789 B
C
40 lines
789 B
C
/*
|
|
* Copyright (c) 2023, Linaro Ltd.
|
|
* All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef _LOCAL_GPIO_H_
|
|
#define _LOCAL_GPIO_H_
|
|
|
|
enum {
|
|
GPIO_POWER = 0, // Power input enable
|
|
GPIO_FASTBOOT_KEY, // Usually volume key
|
|
GPIO_POWER_KEY, // Key to power the device
|
|
GPIO_USB_DISCONNECT, // Simulate main USB connection
|
|
GPIO_COUNT
|
|
};
|
|
|
|
struct local_gpio_options {
|
|
struct {
|
|
char *chip;
|
|
bool present;
|
|
unsigned int offset;
|
|
bool active_low;
|
|
} gpios[GPIO_COUNT];
|
|
};
|
|
|
|
struct local_gpio {
|
|
struct local_gpio_options *options;
|
|
struct {
|
|
void *chip;
|
|
void *line;
|
|
} gpios[GPIO_COUNT];
|
|
};
|
|
|
|
int local_gpio_init(struct local_gpio *local_gpio);
|
|
int local_gpio_set_value(struct local_gpio *local_gpio, unsigned int gpio, bool on);
|
|
|
|
#endif /* _LOCAL_GPIO_H_ */
|