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

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/samsung/core.h

Version: ~ [ linux-5.13-rc7 ] ~ [ linux-5.12.12 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.45 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.127 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.195 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.237 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.273 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.273 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ 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.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * core.h
  3  *
  4  * copyright (c) 2011 Samsung Electronics Co., Ltd
  5  *              http://www.samsung.com
  6  *
  7  *  This program is free software; you can redistribute  it and/or modify it
  8  *  under  the terms of  the GNU General  Public License as published by the
  9  *  Free Software Foundation;  either version 2 of the  License, or (at your
 10  *  option) any later version.
 11  *
 12  */
 13 
 14 #ifndef __LINUX_MFD_SEC_CORE_H
 15 #define __LINUX_MFD_SEC_CORE_H
 16 
 17 enum sec_device_type {
 18         S5M8751X,
 19         S5M8763X,
 20         S5M8767X,
 21         S2MPA01,
 22         S2MPS11X,
 23         S2MPS14X,
 24 };
 25 
 26 /**
 27  * struct sec_pmic_dev - s2m/s5m master device for sub-drivers
 28  * @dev:                Master device of the chip
 29  * @pdata:              Platform data populated with data from DTS
 30  *                      or board files
 31  * @regmap_pmic:        Regmap associated with PMIC's I2C address
 32  * @i2c:                I2C client of the main driver
 33  * @device_type:        Type of device, matches enum sec_device_type
 34  * @irq_base:           Base IRQ number for device, required for IRQs
 35  * @irq:                Generic IRQ number for device
 36  * @irq_data:           Runtime data structure for IRQ controller
 37  * @ono:                Power onoff IRQ number for s5m87xx
 38  * @wakeup:             Whether or not this is a wakeup device
 39  * @wtsr_smpl:          Whether or not to enable in RTC driver the Watchdog
 40  *                      Timer Software Reset (registers set to default value
 41  *                      after PWRHOLD falling) and Sudden Momentary Power Loss
 42  *                      (PMIC will enter power on sequence after short drop in
 43  *                      VBATT voltage).
 44  */
 45 struct sec_pmic_dev {
 46         struct device *dev;
 47         struct sec_platform_data *pdata;
 48         struct regmap *regmap_pmic;
 49         struct i2c_client *i2c;
 50 
 51         unsigned long device_type;
 52         int irq_base;
 53         int irq;
 54         struct regmap_irq_chip_data *irq_data;
 55 
 56         int ono;
 57         bool wakeup;
 58         bool wtsr_smpl;
 59 };
 60 
 61 int sec_irq_init(struct sec_pmic_dev *sec_pmic);
 62 void sec_irq_exit(struct sec_pmic_dev *sec_pmic);
 63 int sec_irq_resume(struct sec_pmic_dev *sec_pmic);
 64 
 65 struct sec_platform_data {
 66         struct sec_regulator_data       *regulators;
 67         struct sec_opmode_data          *opmode;
 68         int                             device_type;
 69         int                             num_regulators;
 70 
 71         int                             irq_base;
 72         int                             (*cfg_pmic_irq)(void);
 73 
 74         int                             ono;
 75         bool                            wakeup;
 76         bool                            buck_voltage_lock;
 77 
 78         int                             buck_gpios[3];
 79         int                             buck_ds[3];
 80         unsigned int                    buck2_voltage[8];
 81         bool                            buck2_gpiodvs;
 82         unsigned int                    buck3_voltage[8];
 83         bool                            buck3_gpiodvs;
 84         unsigned int                    buck4_voltage[8];
 85         bool                            buck4_gpiodvs;
 86 
 87         int                             buck_set1;
 88         int                             buck_set2;
 89         int                             buck_set3;
 90         int                             buck2_enable;
 91         int                             buck3_enable;
 92         int                             buck4_enable;
 93         int                             buck_default_idx;
 94         int                             buck2_default_idx;
 95         int                             buck3_default_idx;
 96         int                             buck4_default_idx;
 97 
 98         int                             buck_ramp_delay;
 99 
100         int                             buck2_ramp_delay;
101         int                             buck34_ramp_delay;
102         int                             buck5_ramp_delay;
103         int                             buck16_ramp_delay;
104         int                             buck7810_ramp_delay;
105         int                             buck9_ramp_delay;
106         int                             buck24_ramp_delay;
107         int                             buck3_ramp_delay;
108         int                             buck7_ramp_delay;
109         int                             buck8910_ramp_delay;
110 
111         bool                            buck1_ramp_enable;
112         bool                            buck2_ramp_enable;
113         bool                            buck3_ramp_enable;
114         bool                            buck4_ramp_enable;
115         bool                            buck6_ramp_enable;
116 
117         int                             buck2_init;
118         int                             buck3_init;
119         int                             buck4_init;
120 };
121 
122 /**
123  * sec_regulator_data - regulator data
124  * @id: regulator id
125  * @initdata: regulator init data (contraints, supplies, ...)
126  */
127 struct sec_regulator_data {
128         int                             id;
129         struct regulator_init_data      *initdata;
130         struct device_node              *reg_node;
131         int                             ext_control_gpio;
132 };
133 
134 /*
135  * sec_opmode_data - regulator operation mode data
136  * @id: regulator id
137  * @mode: regulator operation mode
138  */
139 struct sec_opmode_data {
140         int id;
141         unsigned int mode;
142 };
143 
144 /*
145  * samsung regulator operation mode
146  * SEC_OPMODE_OFF       Regulator always OFF
147  * SEC_OPMODE_ON        Regulator always ON
148  * SEC_OPMODE_LOWPOWER  Regulator is on in low-power mode
149  * SEC_OPMODE_SUSPEND   Regulator is changed by PWREN pin
150  *                      If PWREN is high, regulator is on
151  *                      If PWREN is low, regulator is off
152  */
153 
154 enum sec_opmode {
155         SEC_OPMODE_OFF,
156         SEC_OPMODE_ON,
157         SEC_OPMODE_LOWPOWER,
158         SEC_OPMODE_SUSPEND,
159 };
160 
161 #endif /*  __LINUX_MFD_SEC_CORE_H */
162 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp