![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0+ */ 0002 /* 0003 * max8998.h - Voltage regulator driver for the Maxim 8998 0004 * 0005 * Copyright (C) 2009-2010 Samsung Electrnoics 0006 * Kyungmin Park <kyungmin.park@samsung.com> 0007 * Marek Szyprowski <m.szyprowski@samsung.com> 0008 */ 0009 0010 #ifndef __LINUX_MFD_MAX8998_H 0011 #define __LINUX_MFD_MAX8998_H 0012 0013 #include <linux/regulator/machine.h> 0014 0015 /* MAX 8998 regulator ids */ 0016 enum { 0017 MAX8998_LDO2 = 2, 0018 MAX8998_LDO3, 0019 MAX8998_LDO4, 0020 MAX8998_LDO5, 0021 MAX8998_LDO6, 0022 MAX8998_LDO7, 0023 MAX8998_LDO8, 0024 MAX8998_LDO9, 0025 MAX8998_LDO10, 0026 MAX8998_LDO11, 0027 MAX8998_LDO12, 0028 MAX8998_LDO13, 0029 MAX8998_LDO14, 0030 MAX8998_LDO15, 0031 MAX8998_LDO16, 0032 MAX8998_LDO17, 0033 MAX8998_BUCK1, 0034 MAX8998_BUCK2, 0035 MAX8998_BUCK3, 0036 MAX8998_BUCK4, 0037 MAX8998_EN32KHZ_AP, 0038 MAX8998_EN32KHZ_CP, 0039 MAX8998_ENVICHG, 0040 MAX8998_ESAFEOUT1, 0041 MAX8998_ESAFEOUT2, 0042 MAX8998_CHARGER, 0043 }; 0044 0045 /** 0046 * max8998_regulator_data - regulator data 0047 * @id: regulator id 0048 * @initdata: regulator init data (contraints, supplies, ...) 0049 * @reg_node: DT node of regulator (unused on non-DT platforms) 0050 */ 0051 struct max8998_regulator_data { 0052 int id; 0053 struct regulator_init_data *initdata; 0054 struct device_node *reg_node; 0055 }; 0056 0057 /** 0058 * struct max8998_board - packages regulator init data 0059 * @regulators: array of defined regulators 0060 * @num_regulators: number of regulators used 0061 * @irq_base: base IRQ number for max8998, required for IRQs 0062 * @ono: power onoff IRQ number for max8998 0063 * @buck_voltage_lock: Do NOT change the values of the following six 0064 * registers set by buck?_voltage?. The voltage of BUCK1/2 cannot 0065 * be other than the preset values. 0066 * @buck1_voltage: BUCK1 DVS mode 1 voltage registers 0067 * @buck2_voltage: BUCK2 DVS mode 2 voltage registers 0068 * @buck1_set1: BUCK1 gpio pin 1 to set output voltage 0069 * @buck1_set2: BUCK1 gpio pin 2 to set output voltage 0070 * @buck1_default_idx: Default for BUCK1 gpio pin 1, 2 0071 * @buck2_set3: BUCK2 gpio pin to set output voltage 0072 * @buck2_default_idx: Default for BUCK2 gpio pin. 0073 * @wakeup: Allow to wake up from suspend 0074 * @rtc_delay: LP3974 RTC chip bug that requires delay after a register 0075 * write before reading it. 0076 * @eoc: End of Charge Level in percent: 10% ~ 45% by 5% step 0077 * If it equals 0, leave it unchanged. 0078 * Otherwise, it is a invalid value. 0079 * @restart: Restart Level in mV: 100, 150, 200, and -1 for disable. 0080 * If it equals 0, leave it unchanged. 0081 * Otherwise, it is a invalid value. 0082 * @timeout: Full Timeout in hours: 5, 6, 7, and -1 for disable. 0083 * If it equals 0, leave it unchanged. 0084 * Otherwise, leave it unchanged. 0085 */ 0086 struct max8998_platform_data { 0087 struct max8998_regulator_data *regulators; 0088 int num_regulators; 0089 unsigned int irq_base; 0090 int ono; 0091 bool buck_voltage_lock; 0092 int buck1_voltage[4]; 0093 int buck2_voltage[2]; 0094 int buck1_set1; 0095 int buck1_set2; 0096 int buck1_default_idx; 0097 int buck2_set3; 0098 int buck2_default_idx; 0099 bool wakeup; 0100 bool rtc_delay; 0101 int eoc; 0102 int restart; 0103 int timeout; 0104 }; 0105 0106 #endif /* __LINUX_MFD_MAX8998_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |