4 * Copyright (C) 2013 ams
5 * Copyright (c) 2013, NVIDIA Corporation. All rights reserved.
7 * Author: Florian Lobmaier <florian.lobmaier@ams.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #ifndef __LINUX_MFD_AS3722_PLAT_H
26 #define __LINUX_MFD_AS3722_PLAT_H
28 #include <linux/types.h>
30 #define AS3722_EXT_CONTROL_ENABLE1 0x1
31 #define AS3722_EXT_CONTROL_ENABLE2 0x2
32 #define AS3722_EXT_CONTROL_ENABLE3 0x3
35 enum as3722_adc_source {
39 AS3722_ADC_TEMP_SENSOR = 3,
46 AS3722_ADC_GPIO7 = 10,
48 AS3722_ADC_PWM_CLK2 = 12,
49 AS3722_ADC_PWM_DAT2 = 13,
50 AS3722_ADC_TEMP1_SD0 = 16,
51 AS3722_ADC_TEMP2_SD0 = 17,
52 AS3722_ADC_TEMP3_SD0 = 18,
53 AS3722_ADC_TEMP4_SD0 = 19,
54 AS3722_ADC_TEMP_SD1 = 20,
55 AS3722_ADC_TEMP1_SD6 = 21,
56 AS3722_ADC_TEMP2_SD6 = 22,
59 enum as3722_adc_channel {
65 enum as3722_regulators_id_ {
84 AS3722_NUM_REGULATORS,
101 * struct as3722_pinctrl_platform_data: Pincontrol platform data.
103 * @function: Function option of pin. NULL for default.
104 * @prop_bias_pull: Pull up, pull down and normal option. NULL for default.
105 * @prop_open_drain: Open drain enable/disable. NULL for default.
106 * @prop_high_impedance: High impedance enable/disable. NULL for default.
107 * @prop_gpio_mode: GPIO mode, if pin function is in gpio, gpio mode
108 * like input, output-high and output-low.
110 struct as3722_pinctrl_platform_data {
112 const char *function;
113 const char *prop_bias_pull;
114 const char *prop_open_drain;
115 const char *prop_high_impedance;
116 const char *prop_gpio_mode;
120 * as3722_regulator_platform_data: Regulator platform data.
121 * @ext_control: External control.
123 struct as3722_regulator_platform_data {
124 struct regulator_init_data *reg_init;
126 bool enable_tracking;
127 bool disable_tracking_suspend;
131 * as3722_adc_extcon_platform_data: ADC platform data.
132 * @connection_name: Extcon connection name.
134 struct as3722_adc_extcon_platform_data {
135 const char *connection_name;
136 bool enable_adc1_continuous_mode;
137 bool enable_low_voltage_range;
143 struct as3722_platform_data {
144 struct as3722_regulator_platform_data *reg_pdata[AS3722_NUM_REGULATORS];
148 int use_internal_int_pullup;
149 int use_internal_i2c_pullup;
152 bool use_power_reset;
153 struct as3722_gpio_config *gpio_cfgs;
154 struct as3722_pinctrl_platform_data *pinctrl_pdata;
156 struct as3722_adc_extcon_platform_data *extcon_pdata;
157 int watchdog_timer_initial_period;
158 int watchdog_timer_mode;
159 bool enable_clk32k_out;