blob: fce4657e94862a9ac16053b592f70f50ebc6db50 [file] [log] [blame]
Thomas Gleixner2b27bdc2019-05-29 16:57:50 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +03002/*
3 * OMAP4 Bandgap temperature sensor driver
4 *
5 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
6 * Contact:
7 * Eduardo Valentin <eduardo.valentin@ti.com>
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +03008 */
Eduardo Valentin03e859d2013-03-19 10:54:21 -04009#ifndef __TI_BANDGAP_H
10#define __TI_BANDGAP_H
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +030011
Eduardo Valentinebf0bd52013-03-15 09:00:35 -040012#include <linux/spinlock.h>
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +030013#include <linux/types.h>
14#include <linux/err.h>
15
Linus Walleij7375f2a2020-02-29 22:05:32 +010016struct gpio_desc;
17
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +030018/**
Eduardo Valentin0c004772013-03-15 08:59:52 -040019 * DOC: bandgap driver data structure
20 * ==================================
Eduardo Valentin9879b2c2013-03-19 10:54:23 -040021 *
22 * +----------+----------------+
23 * | struct temp_sensor_regval |
24 * +---------------------------+
25 * * (Array of)
26 * |
27 * |
Eduardo Valentin03e859d2013-03-19 10:54:21 -040028 * +-------------------+ +-----------------+
29 * | struct ti_bandgap |-->| struct device * |
30 * +----------+--------+ +-----------------+
Eduardo Valentin0c004772013-03-15 08:59:52 -040031 * |
32 * |
33 * V
Eduardo Valentin03e859d2013-03-19 10:54:21 -040034 * +------------------------+
35 * | struct ti_bandgap_data |
36 * +------------------------+
Eduardo Valentin0c004772013-03-15 08:59:52 -040037 * |
38 * |
39 * * (Array of)
40 * +------------+------------------------------------------------------+
Eduardo Valentin03e859d2013-03-19 10:54:21 -040041 * | +----------+------------+ +-------------------------+ |
42 * | | struct ti_temp_sensor |-->| struct temp_sensor_data | |
43 * | +-----------------------+ +------------+------------+ |
Eduardo Valentin0c004772013-03-15 08:59:52 -040044 * | | |
Eduardo Valentin9879b2c2013-03-19 10:54:23 -040045 * | + |
46 * | V |
47 * | +----------+-------------------+ |
48 * | | struct temp_sensor_registers | |
49 * | +------------------------------+ |
Eduardo Valentin0c004772013-03-15 08:59:52 -040050 * | |
51 * +-------------------------------------------------------------------+
52 *
53 * Above is a simple diagram describing how the data structure below
Eduardo Valentin03e859d2013-03-19 10:54:21 -040054 * are organized. For each bandgap device there should be a ti_bandgap_data
Eduardo Valentin0c004772013-03-15 08:59:52 -040055 * containing the device instance configuration, as well as, an array of
56 * sensors, representing every sensor instance present in this bandgap.
57 */
58
59/**
60 * struct temp_sensor_registers - descriptor to access registers and bitfields
61 * @temp_sensor_ctrl: TEMP_SENSOR_CTRL register offset
62 * @bgap_tempsoff_mask: mask to temp_sensor_ctrl.tempsoff
63 * @bgap_soc_mask: mask to temp_sensor_ctrl.soc
64 * @bgap_eocz_mask: mask to temp_sensor_ctrl.eocz
65 * @bgap_dtemp_mask: mask to temp_sensor_ctrl.dtemp
66 * @bgap_mask_ctrl: BANDGAP_MASK_CTRL register offset
67 * @mask_hot_mask: mask to bandgap_mask_ctrl.mask_hot
68 * @mask_cold_mask: mask to bandgap_mask_ctrl.mask_cold
J Keerthy525ee282013-04-01 12:04:38 -040069 * @mask_counter_delay_mask: mask to bandgap_mask_ctrl.mask_counter_delay
Eduardo Valentin0c004772013-03-15 08:59:52 -040070 * @mask_freeze_mask: mask to bandgap_mask_ctrl.mask_free
Eduardo Valentin0c004772013-03-15 08:59:52 -040071 * @bgap_mode_ctrl: BANDGAP_MODE_CTRL register offset
72 * @mode_ctrl_mask: mask to bandgap_mode_ctrl.mode_ctrl
73 * @bgap_counter: BANDGAP_COUNTER register offset
74 * @counter_mask: mask to bandgap_counter.counter
75 * @bgap_threshold: BANDGAP_THRESHOLD register offset (TALERT thresholds)
76 * @threshold_thot_mask: mask to bandgap_threhold.thot
77 * @threshold_tcold_mask: mask to bandgap_threhold.tcold
78 * @tshut_threshold: TSHUT_THRESHOLD register offset (TSHUT thresholds)
Eduardo Valentin0c004772013-03-15 08:59:52 -040079 * @tshut_hot_mask: mask to tshut_threhold.thot
80 * @tshut_cold_mask: mask to tshut_threhold.thot
81 * @bgap_status: BANDGAP_STATUS register offset
Eduardo Valentin0c004772013-03-15 08:59:52 -040082 * @status_hot_mask: mask to bandgap_status.hot
83 * @status_cold_mask: mask to bandgap_status.cold
Eduardo Valentin0c004772013-03-15 08:59:52 -040084 * @ctrl_dtemp_1: CTRL_DTEMP1 register offset
85 * @ctrl_dtemp_2: CTRL_DTEMP2 register offset
Eduardo Valentin0c004772013-03-15 08:59:52 -040086 * @bgap_efuse: BANDGAP_EFUSE register offset
87 *
88 * The register offsets and bitfields might change across
89 * OMAP and variants versions. Hence this struct serves as a
90 * descriptor map on how to access the registers and the bitfields.
91 *
92 * This descriptor contains registers of all versions of bandgap chips.
93 * Not all versions will use all registers, depending on the available
94 * features. Please read TRMs for descriptive explanation on each bitfield.
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +030095 */
96
97struct temp_sensor_registers {
98 u32 temp_sensor_ctrl;
99 u32 bgap_tempsoff_mask;
100 u32 bgap_soc_mask;
Bartlomiej Zolnierkiewicz9bebf342018-05-02 15:20:35 +0200101 u32 bgap_eocz_mask;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300102 u32 bgap_dtemp_mask;
103
104 u32 bgap_mask_ctrl;
105 u32 mask_hot_mask;
106 u32 mask_cold_mask;
J Keerthy525ee282013-04-01 12:04:38 -0400107 u32 mask_counter_delay_mask;
Eduardo Valentin1aa556a2013-02-26 18:53:29 -0400108 u32 mask_freeze_mask;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300109
110 u32 bgap_mode_ctrl;
111 u32 mode_ctrl_mask;
112
113 u32 bgap_counter;
114 u32 counter_mask;
115
116 u32 bgap_threshold;
117 u32 threshold_thot_mask;
118 u32 threshold_tcold_mask;
119
120 u32 tshut_threshold;
121 u32 tshut_hot_mask;
122 u32 tshut_cold_mask;
123
124 u32 bgap_status;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300125 u32 status_hot_mask;
126 u32 status_cold_mask;
127
Bartlomiej Zolnierkiewicz9bebf342018-05-02 15:20:35 +0200128 u32 ctrl_dtemp_1;
129 u32 ctrl_dtemp_2;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300130 u32 bgap_efuse;
131};
132
133/**
Eduardo Valentin0c004772013-03-15 08:59:52 -0400134 * struct temp_sensor_data - The thresholds and limits for temperature sensors.
135 * @tshut_hot: temperature to trigger a thermal reset (initial value)
136 * @tshut_cold: temp to get the plat out of reset due to thermal (init val)
137 * @t_hot: temperature to trigger a thermal alert (high initial value)
138 * @t_cold: temperature to trigger a thermal alert (low initial value)
139 * @min_freq: sensor minimum clock rate
140 * @max_freq: sensor maximum clock rate
Eduardo Valentin0c004772013-03-15 08:59:52 -0400141 *
142 * This data structure will hold the required thresholds and temperature limits
143 * for a specific temperature sensor, like shutdown temperature, alert
144 * temperature, clock / rate used, ADC conversion limits and update intervals
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300145 */
146struct temp_sensor_data {
147 u32 tshut_hot;
148 u32 tshut_cold;
149 u32 t_hot;
150 u32 t_cold;
151 u32 min_freq;
152 u32 max_freq;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300153};
154
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400155struct ti_bandgap_data;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300156
157/**
Eduardo Valentin9879b2c2013-03-19 10:54:23 -0400158 * struct temp_sensor_regval - temperature sensor register values and priv data
159 * @bg_mode_ctrl: temp sensor control register value
160 * @bg_ctrl: bandgap ctrl register value
161 * @bg_counter: bandgap counter value
162 * @bg_threshold: bandgap threshold register value
163 * @tshut_threshold: bandgap tshut register value
164 * @data: private data
165 *
166 * Data structure to save and restore bandgap register set context. Only
167 * required registers are shadowed, when needed.
168 */
169struct temp_sensor_regval {
170 u32 bg_mode_ctrl;
171 u32 bg_ctrl;
172 u32 bg_counter;
173 u32 bg_threshold;
174 u32 tshut_threshold;
175 void *data;
176};
177
178/**
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400179 * struct ti_bandgap - bandgap device structure
Eduardo Valentin0c004772013-03-15 08:59:52 -0400180 * @dev: struct device pointer
181 * @base: io memory base address
182 * @conf: struct with bandgap configuration set (# sensors, conv_table, etc)
Eduardo Valentin9879b2c2013-03-19 10:54:23 -0400183 * @regval: temperature sensor register values
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300184 * @fclock: pointer to functional clock of temperature sensor
Eduardo Valentin0c004772013-03-15 08:59:52 -0400185 * @div_clk: pointer to divider clock of temperature sensor fclk
Eduardo Valentin61603af2013-03-19 10:54:25 -0400186 * @lock: spinlock for ti_bandgap structure
Eduardo Valentin0c004772013-03-15 08:59:52 -0400187 * @irq: MPU IRQ number for thermal alert
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300188 * @tshut_gpio: GPIO where Tshut signal is routed
189 * @clk_rate: Holds current clock rate
Eduardo Valentin0c004772013-03-15 08:59:52 -0400190 *
191 * The bandgap device structure representing the bandgap device instance.
192 * It holds most of the dynamic stuff. Configurations and sensor specific
193 * entries are inside the @conf structure.
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300194 */
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400195struct ti_bandgap {
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300196 struct device *dev;
197 void __iomem *base;
Eduardo Valentin9879b2c2013-03-19 10:54:23 -0400198 const struct ti_bandgap_data *conf;
199 struct temp_sensor_regval *regval;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300200 struct clk *fclock;
201 struct clk *div_clk;
Eduardo Valentinebf0bd52013-03-15 09:00:35 -0400202 spinlock_t lock; /* shields this struct */
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300203 int irq;
Linus Walleij7375f2a2020-02-29 22:05:32 +0100204 struct gpio_desc *tshut_gpiod;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300205 u32 clk_rate;
206};
207
208/**
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400209 * struct ti_temp_sensor - bandgap temperature sensor configuration data
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300210 * @ts_data: pointer to struct with thresholds, limits of temperature sensor
211 * @registers: pointer to the list of register offsets and bitfields
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300212 * @domain: the name of the domain where the sensor is located
Eduardo Valentin0c004772013-03-15 08:59:52 -0400213 * @slope_pcb: sensor gradient slope info for hotspot extrapolation equation
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300214 * with no external influence
Eduardo Valentin0c004772013-03-15 08:59:52 -0400215 * @constant_pcb: sensor gradient const info for hotspot extrapolation equation
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300216 * with no external influence
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300217 * @register_cooling: function to describe how this sensor is going to be cooled
218 * @unregister_cooling: function to release cooling data
Eduardo Valentin0c004772013-03-15 08:59:52 -0400219 *
220 * Data structure to describe a temperature sensor handled by a bandgap device.
221 * It should provide configuration details on this sensor, such as how to
222 * access the registers affecting this sensor, shadow register buffer, how to
223 * assess the gradient from hotspot, how to cooldown the domain when sensor
224 * reports too hot temperature.
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300225 */
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400226struct ti_temp_sensor {
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300227 struct temp_sensor_data *ts_data;
228 struct temp_sensor_registers *registers;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300229 char *domain;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300230 /* for hotspot extrapolation */
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300231 const int slope_pcb;
232 const int constant_pcb;
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400233 int (*register_cooling)(struct ti_bandgap *bgp, int id);
234 int (*unregister_cooling)(struct ti_bandgap *bgp, int id);
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300235};
236
237/**
Eduardo Valentin61603af2013-03-19 10:54:25 -0400238 * DOC: ti bandgap feature types
Eduardo Valentin0c004772013-03-15 08:59:52 -0400239 *
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400240 * TI_BANDGAP_FEATURE_TSHUT - used when the thermal shutdown signal output
Eduardo Valentin0c004772013-03-15 08:59:52 -0400241 * of a bandgap device instance is routed to the processor. This means
242 * the system must react and perform the shutdown by itself (handle an
243 * IRQ, for instance).
244 *
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400245 * TI_BANDGAP_FEATURE_TSHUT_CONFIG - used when the bandgap device has control
Eduardo Valentin0c004772013-03-15 08:59:52 -0400246 * over the thermal shutdown configuration. This means that the thermal
247 * shutdown thresholds are programmable, for instance.
248 *
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400249 * TI_BANDGAP_FEATURE_TALERT - used when the bandgap device instance outputs
Eduardo Valentin0c004772013-03-15 08:59:52 -0400250 * a signal representing violation of programmable alert thresholds.
251 *
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400252 * TI_BANDGAP_FEATURE_MODE_CONFIG - used when it is possible to choose which
Eduardo Valentin0c004772013-03-15 08:59:52 -0400253 * mode, continuous or one shot, the bandgap device instance will operate.
254 *
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400255 * TI_BANDGAP_FEATURE_COUNTER - used when the bandgap device instance allows
Eduardo Valentin0c004772013-03-15 08:59:52 -0400256 * programming the update interval of its internal state machine.
257 *
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400258 * TI_BANDGAP_FEATURE_POWER_SWITCH - used when the bandgap device allows
Eduardo Valentin0c004772013-03-15 08:59:52 -0400259 * itself to be switched on/off.
260 *
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400261 * TI_BANDGAP_FEATURE_CLK_CTRL - used when the clocks feeding the bandgap
Eduardo Valentin0c004772013-03-15 08:59:52 -0400262 * device are gateable or not.
263 *
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400264 * TI_BANDGAP_FEATURE_FREEZE_BIT - used when the bandgap device features
Eduardo Valentin0c004772013-03-15 08:59:52 -0400265 * a history buffer that its update can be freezed/unfreezed.
266 *
J Keerthy3ff027f2013-04-01 12:04:40 -0400267 * TI_BANDGAP_FEATURE_COUNTER_DELAY - used when the bandgap device features
268 * a delay programming based on distinct values.
269 *
J Keerthy07a7fb62013-04-01 12:04:43 -0400270 * TI_BANDGAP_FEATURE_HISTORY_BUFFER - used when the bandgap device features
271 * a history buffer of temperatures.
272 *
Keerthy79010632015-04-22 18:21:41 +0530273 * TI_BANDGAP_FEATURE_ERRATA_814 - used to workaorund when the bandgap device
274 * has Errata 814
Pavel Machek9c5c87e2015-04-02 16:49:07 +0200275 * TI_BANDGAP_FEATURE_UNRELIABLE - used when the sensor readings are too
276 * inaccurate.
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400277 * TI_BANDGAP_HAS(b, f) - macro to check if a bandgap device is capable of a
Eduardo Valentin0c004772013-03-15 08:59:52 -0400278 * specific feature (above) or not. Return non-zero, if yes.
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300279 */
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400280#define TI_BANDGAP_FEATURE_TSHUT BIT(0)
281#define TI_BANDGAP_FEATURE_TSHUT_CONFIG BIT(1)
282#define TI_BANDGAP_FEATURE_TALERT BIT(2)
283#define TI_BANDGAP_FEATURE_MODE_CONFIG BIT(3)
284#define TI_BANDGAP_FEATURE_COUNTER BIT(4)
285#define TI_BANDGAP_FEATURE_POWER_SWITCH BIT(5)
286#define TI_BANDGAP_FEATURE_CLK_CTRL BIT(6)
287#define TI_BANDGAP_FEATURE_FREEZE_BIT BIT(7)
J Keerthy3ff027f2013-04-01 12:04:40 -0400288#define TI_BANDGAP_FEATURE_COUNTER_DELAY BIT(8)
J Keerthy07a7fb62013-04-01 12:04:43 -0400289#define TI_BANDGAP_FEATURE_HISTORY_BUFFER BIT(9)
Keerthy79010632015-04-22 18:21:41 +0530290#define TI_BANDGAP_FEATURE_ERRATA_814 BIT(10)
Bartlomiej Zolnierkiewicz9bebf342018-05-02 15:20:35 +0200291#define TI_BANDGAP_FEATURE_UNRELIABLE BIT(11)
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400292#define TI_BANDGAP_HAS(b, f) \
293 ((b)->conf->features & TI_BANDGAP_FEATURE_ ## f)
Eduardo Valentin0c004772013-03-15 08:59:52 -0400294
295/**
Eduardo Valentin61603af2013-03-19 10:54:25 -0400296 * struct ti_bandgap_data - ti bandgap data configuration structure
Eduardo Valentin0c004772013-03-15 08:59:52 -0400297 * @features: a bitwise flag set to describe the device features
298 * @conv_table: Pointer to ADC to temperature conversion table
Eduardo Valentin26a70ed2013-03-15 09:00:14 -0400299 * @adc_start_val: ADC conversion table starting value
300 * @adc_end_val: ADC conversion table ending value
Eduardo Valentin0c004772013-03-15 08:59:52 -0400301 * @fclock_name: clock name of the functional clock
302 * @div_ck_name: clock name of the clock divisor
303 * @sensor_count: count of temperature sensor within this bandgap device
304 * @report_temperature: callback to report thermal alert to thermal API
305 * @expose_sensor: callback to export sensor to thermal API
306 * @remove_sensor: callback to destroy sensor from thermal API
307 * @sensors: array of sensors present in this bandgap instance
308 *
309 * This is a data structure which should hold most of the static configuration
310 * of a bandgap device instance. It should describe which features this instance
311 * is capable of, the clock names to feed this device, the amount of sensors and
312 * their configuration representation, and how to export and unexport them to
313 * a thermal API.
314 */
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400315struct ti_bandgap_data {
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300316 unsigned int features;
317 const int *conv_table;
Eduardo Valentin26a70ed2013-03-15 09:00:14 -0400318 u32 adc_start_val;
319 u32 adc_end_val;
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300320 char *fclock_name;
321 char *div_ck_name;
322 int sensor_count;
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400323 int (*report_temperature)(struct ti_bandgap *bgp, int id);
324 int (*expose_sensor)(struct ti_bandgap *bgp, int id, char *domain);
325 int (*remove_sensor)(struct ti_bandgap *bgp, int id);
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300326
327 /* this needs to be at the end */
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400328 struct ti_temp_sensor sensors[];
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300329};
330
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400331int ti_bandgap_read_thot(struct ti_bandgap *bgp, int id, int *thot);
332int ti_bandgap_write_thot(struct ti_bandgap *bgp, int id, int val);
333int ti_bandgap_read_tcold(struct ti_bandgap *bgp, int id, int *tcold);
334int ti_bandgap_write_tcold(struct ti_bandgap *bgp, int id, int val);
335int ti_bandgap_read_update_interval(struct ti_bandgap *bgp, int id,
336 int *interval);
337int ti_bandgap_write_update_interval(struct ti_bandgap *bgp, int id,
338 u32 interval);
339int ti_bandgap_read_temperature(struct ti_bandgap *bgp, int id,
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300340 int *temperature);
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400341int ti_bandgap_set_sensor_data(struct ti_bandgap *bgp, int id, void *data);
342void *ti_bandgap_get_sensor_data(struct ti_bandgap *bgp, int id);
J Keerthy2f440b02013-04-01 12:04:45 -0400343int ti_bandgap_get_trend(struct ti_bandgap *bgp, int id, int *trend);
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300344
Pavel Machek9c5c87e2015-04-02 16:49:07 +0200345#ifdef CONFIG_OMAP3_THERMAL
346extern const struct ti_bandgap_data omap34xx_data;
Eduardo Valentinb840b6e2015-09-21 17:32:15 -0700347extern const struct ti_bandgap_data omap36xx_data;
Pavel Machek9c5c87e2015-04-02 16:49:07 +0200348#else
349#define omap34xx_data NULL
Eduardo Valentinb840b6e2015-09-21 17:32:15 -0700350#define omap36xx_data NULL
Pavel Machek9c5c87e2015-04-02 16:49:07 +0200351#endif
352
Eduardo Valentin1a312702012-07-12 19:02:31 +0300353#ifdef CONFIG_OMAP4_THERMAL
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400354extern const struct ti_bandgap_data omap4430_data;
355extern const struct ti_bandgap_data omap4460_data;
356extern const struct ti_bandgap_data omap4470_data;
Eduardo Valentin1a312702012-07-12 19:02:31 +0300357#else
358#define omap4430_data NULL
359#define omap4460_data NULL
360#define omap4470_data NULL
361#endif
362
Eduardo Valentin949f5a52012-07-12 19:02:32 +0300363#ifdef CONFIG_OMAP5_THERMAL
Eduardo Valentin03e859d2013-03-19 10:54:21 -0400364extern const struct ti_bandgap_data omap5430_data;
Eduardo Valentin949f5a52012-07-12 19:02:32 +0300365#else
366#define omap5430_data NULL
367#endif
368
Eduardo Valentin25870e62013-05-29 15:07:45 +0000369#ifdef CONFIG_DRA752_THERMAL
370extern const struct ti_bandgap_data dra752_data;
371#else
372#define dra752_data NULL
373#endif
Eduardo Valentin8feaf0ce2012-07-12 19:02:29 +0300374#endif