~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/regulator/gpio-regulator.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * gpio-regulator.h
  4  *
  5  * Copyright 2011 Heiko Stuebner <heiko@sntech.de>
  6  *
  7  * based on fixed.h
  8  *
  9  * Copyright 2008 Wolfson Microelectronics PLC.
 10  *
 11  * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
 12  *
 13  * Copyright (c) 2009 Nokia Corporation
 14  * Roger Quadros <ext-roger.quadros@nokia.com>
 15  */
 16 
 17 #ifndef __REGULATOR_GPIO_H
 18 #define __REGULATOR_GPIO_H
 19 
 20 #include <linux/gpio/consumer.h>
 21 
 22 struct regulator_init_data;
 23 
 24 enum regulator_type;
 25 
 26 /**
 27  * struct gpio_regulator_state - state description
 28  * @value:              microvolts or microamps
 29  * @gpios:              bitfield of gpio target-states for the value
 30  *
 31  * This structure describes a supported setting of the regulator
 32  * and the necessary gpio-state to achieve it.
 33  *
 34  * The n-th bit in the bitfield describes the state of the n-th GPIO
 35  * from the gpios-array defined in gpio_regulator_config below.
 36  */
 37 struct gpio_regulator_state {
 38         int value;
 39         int gpios;
 40 };
 41 
 42 /**
 43  * struct gpio_regulator_config - config structure
 44  * @supply_name:        Name of the regulator supply
 45  * @input_supply:       Name of the input regulator supply
 46  * @enabled_at_boot:    Whether regulator has been enabled at
 47  *                      boot or not. 1 = Yes, 0 = No
 48  *                      This is used to keep the regulator at
 49  *                      the default state
 50  * @startup_delay:      Start-up time in microseconds
 51  * @gflags:             Array of GPIO configuration flags for initial
 52  *                      states
 53  * @ngpios:             Number of GPIOs and configurations available
 54  * @states:             Array of gpio_regulator_state entries describing
 55  *                      the gpio state for specific voltages
 56  * @nr_states:          Number of states available
 57  * @regulator_type:     either REGULATOR_CURRENT or REGULATOR_VOLTAGE
 58  * @init_data:          regulator_init_data
 59  *
 60  * This structure contains gpio-voltage regulator configuration
 61  * information that must be passed by platform code to the
 62  * gpio-voltage regulator driver.
 63  */
 64 struct gpio_regulator_config {
 65         const char *supply_name;
 66         const char *input_supply;
 67 
 68         unsigned enabled_at_boot:1;
 69         unsigned startup_delay;
 70 
 71         enum gpiod_flags *gflags;
 72         int ngpios;
 73 
 74         struct gpio_regulator_state *states;
 75         int nr_states;
 76 
 77         enum regulator_type type;
 78         struct regulator_init_data *init_data;
 79 };
 80 
 81 #endif
 82 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php