blob: 5a5a8de98181e448384ae59c09a62e651151a0ca [file] [log] [blame]
Thomas Gleixnera912e802019-05-27 08:55:00 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Lars-Peter Clausen50704372010-10-21 17:55:01 +02002/*
3 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
Lars-Peter Clausen50704372010-10-21 17:55:01 +02004 */
5
6#ifndef __LINUX_POWER_GPIO_CHARGER_H__
7#define __LINUX_POWER_GPIO_CHARGER_H__
8
9#include <linux/power_supply.h>
10#include <linux/types.h>
11
12/**
13 * struct gpio_charger_platform_data - platform_data for gpio_charger devices
14 * @name: Name for the chargers power_supply device
15 * @type: Type of the charger
16 * @gpio: GPIO which is used to indicate the chargers status
17 * @gpio_active_low: Should be set to 1 if the GPIO is active low otherwise 0
18 * @supplied_to: Array of battery names to which this chargers supplies power
19 * @num_supplicants: Number of entries in the supplied_to array
20 */
21struct gpio_charger_platform_data {
22 const char *name;
23 enum power_supply_type type;
24
25 int gpio;
26 int gpio_active_low;
27
28 char **supplied_to;
29 size_t num_supplicants;
30};
31
32#endif