Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * LP8755 High Performance Power Management Unit Driver:System Interface Driver
0004  *
0005  *          Copyright (C) 2012 Texas Instruments
0006  *
0007  * Author: Daniel(Geon Si) Jeong <daniel.jeong@ti.com>
0008  *             G.Shark Jeong <gshark.jeong@gmail.com>
0009  */
0010 
0011 #ifndef _LP8755_H
0012 #define _LP8755_H
0013 
0014 #include <linux/regulator/consumer.h>
0015 
0016 #define LP8755_NAME "lp8755-regulator"
0017 /*
0018  *PWR FAULT : power fault detected
0019  *OCP : over current protect activated
0020  *OVP : over voltage protect activated
0021  *TEMP_WARN : thermal warning
0022  *TEMP_SHDN : thermal shutdonw detected
0023  *I_LOAD : current measured
0024  */
0025 #define LP8755_EVENT_PWR_FAULT REGULATOR_EVENT_FAIL
0026 #define LP8755_EVENT_OCP REGULATOR_EVENT_OVER_CURRENT
0027 #define LP8755_EVENT_OVP 0x10000
0028 #define LP8755_EVENT_TEMP_WARN 0x2000
0029 #define LP8755_EVENT_TEMP_SHDN REGULATOR_EVENT_OVER_TEMP
0030 #define LP8755_EVENT_I_LOAD 0x40000
0031 
0032 enum lp8755_bucks {
0033     LP8755_BUCK0 = 0,
0034     LP8755_BUCK1,
0035     LP8755_BUCK2,
0036     LP8755_BUCK3,
0037     LP8755_BUCK4,
0038     LP8755_BUCK5,
0039     LP8755_BUCK_MAX,
0040 };
0041 
0042 /**
0043  * multiphase configuration options
0044  */
0045 enum lp8755_mphase_config {
0046     MPHASE_CONF0,
0047     MPHASE_CONF1,
0048     MPHASE_CONF2,
0049     MPHASE_CONF3,
0050     MPHASE_CONF4,
0051     MPHASE_CONF5,
0052     MPHASE_CONF6,
0053     MPHASE_CONF7,
0054     MPHASE_CONF8,
0055     MPHASE_CONF_MAX
0056 };
0057 
0058 /**
0059  * struct lp8755_platform_data
0060  * @mphase_type : Multiphase Switcher Configurations.
0061  * @buck_data   : buck0~6 init voltage in uV
0062  */
0063 struct lp8755_platform_data {
0064     int mphase;
0065     struct regulator_init_data *buck_data[LP8755_BUCK_MAX];
0066 };
0067 #endif