hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/regulator/gpio-regulator.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * gpio-regulator.h
34 *
....@@ -11,15 +12,12 @@
1112 *
1213 * Copyright (c) 2009 Nokia Corporation
1314 * Roger Quadros <ext-roger.quadros@nokia.com>
14
- *
15
- * This program is free software; you can redistribute it and/or
16
- * modify it under the terms of the GNU General Public License as
17
- * published by the Free Software Foundation; either version 2 of the
18
- * License, or (at your option) any later version.
1915 */
2016
2117 #ifndef __REGULATOR_GPIO_H
2218 #define __REGULATOR_GPIO_H
19
+
20
+#include <linux/gpio/consumer.h>
2321
2422 struct regulator_init_data;
2523
....@@ -44,19 +42,14 @@
4442 /**
4543 * struct gpio_regulator_config - config structure
4644 * @supply_name: Name of the regulator supply
47
- * @input_supply: Name of the regulator input supply
48
- * @enable_gpio: GPIO to use for enable control
49
- * set to -EINVAL if not used
50
- * @enable_high: Polarity of enable GPIO
51
- * 1 = Active high, 0 = Active low
5245 * @enabled_at_boot: Whether regulator has been enabled at
5346 * boot or not. 1 = Yes, 0 = No
5447 * This is used to keep the regulator at
5548 * the default state
5649 * @startup_delay: Start-up time in microseconds
57
- * @gpios: Array containing the gpios needed to control
58
- * the setting of the regulator
59
- * @nr_gpios: Number of gpios
50
+ * @gflags: Array of GPIO configuration flags for initial
51
+ * states
52
+ * @ngpios: Number of GPIOs and configurations available
6053 * @states: Array of gpio_regulator_state entries describing
6154 * the gpio state for specific voltages
6255 * @nr_states: Number of states available
....@@ -69,15 +62,12 @@
6962 */
7063 struct gpio_regulator_config {
7164 const char *supply_name;
72
- const char *input_supply;
7365
74
- int enable_gpio;
75
- unsigned enable_high:1;
7666 unsigned enabled_at_boot:1;
7767 unsigned startup_delay;
7868
79
- struct gpio *gpios;
80
- int nr_gpios;
69
+ enum gpiod_flags *gflags;
70
+ int ngpios;
8171
8272 struct gpio_regulator_state *states;
8373 int nr_states;