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

TOMOYO Linux Cross Reference
Linux/include/linux/regulator/lp872x.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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-only */
  2 /*
  3  * Copyright 2012 Texas Instruments
  4  *
  5  * Author: Milo(Woogyom) Kim <milo.kim@ti.com>
  6  */
  7 
  8 #ifndef __LP872X_REGULATOR_H__
  9 #define __LP872X_REGULATOR_H__
 10 
 11 #include <linux/regulator/machine.h>
 12 #include <linux/platform_device.h>
 13 #include <linux/gpio/consumer.h>
 14 
 15 #define LP872X_MAX_REGULATORS           9
 16 
 17 #define LP8720_ENABLE_DELAY             200
 18 #define LP8725_ENABLE_DELAY             30000
 19 
 20 enum lp872x_regulator_id {
 21         LP8720_ID_BASE,
 22         LP8720_ID_LDO1 = LP8720_ID_BASE,
 23         LP8720_ID_LDO2,
 24         LP8720_ID_LDO3,
 25         LP8720_ID_LDO4,
 26         LP8720_ID_LDO5,
 27         LP8720_ID_BUCK,
 28 
 29         LP8725_ID_BASE,
 30         LP8725_ID_LDO1 = LP8725_ID_BASE,
 31         LP8725_ID_LDO2,
 32         LP8725_ID_LDO3,
 33         LP8725_ID_LDO4,
 34         LP8725_ID_LDO5,
 35         LP8725_ID_LILO1,
 36         LP8725_ID_LILO2,
 37         LP8725_ID_BUCK1,
 38         LP8725_ID_BUCK2,
 39 
 40         LP872X_ID_MAX,
 41 };
 42 
 43 enum lp872x_dvs_sel {
 44         SEL_V1,
 45         SEL_V2,
 46 };
 47 
 48 /**
 49  * lp872x_dvs
 50  * @gpio       : gpio descriptor for dvs control
 51  * @vsel       : dvs selector for buck v1 or buck v2 register
 52  * @init_state : initial dvs pin state
 53  */
 54 struct lp872x_dvs {
 55         struct gpio_desc *gpio;
 56         enum lp872x_dvs_sel vsel;
 57         enum gpiod_flags init_state;
 58 };
 59 
 60 /**
 61  * lp872x_regdata
 62  * @id        : regulator id
 63  * @init_data : init data for each regulator
 64  */
 65 struct lp872x_regulator_data {
 66         enum lp872x_regulator_id id;
 67         struct regulator_init_data *init_data;
 68 };
 69 
 70 /**
 71  * lp872x_platform_data
 72  * @general_config    : the value of LP872X_GENERAL_CFG register
 73  * @update_config     : if LP872X_GENERAL_CFG register is updated, set true
 74  * @regulator_data    : platform regulator id and init data
 75  * @dvs               : dvs data for buck voltage control
 76  * @enable_gpio       : gpio descriptor for enable control
 77  */
 78 struct lp872x_platform_data {
 79         u8 general_config;
 80         bool update_config;
 81         struct lp872x_regulator_data regulator_data[LP872X_MAX_REGULATORS];
 82         struct lp872x_dvs *dvs;
 83         struct gpio_desc *enable_gpio;
 84 };
 85 
 86 #endif
 87 

~ [ 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