xref: /OK3568_Linux_fs/kernel/include/linux/platform_data/max6697.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * max6697.h
4*4882a593Smuzhiyun  *     Copyright (c) 2012 Guenter Roeck <linux@roeck-us.net>
5*4882a593Smuzhiyun  */
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #ifndef MAX6697_H
8*4882a593Smuzhiyun #define MAX6697_H
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #include <linux/types.h>
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun /*
13*4882a593Smuzhiyun  * For all bit masks:
14*4882a593Smuzhiyun  * bit 0:    local temperature
15*4882a593Smuzhiyun  * bit 1..7: remote temperatures
16*4882a593Smuzhiyun  */
17*4882a593Smuzhiyun struct max6697_platform_data {
18*4882a593Smuzhiyun 	bool smbus_timeout_disable;	/* set to disable SMBus timeouts */
19*4882a593Smuzhiyun 	bool extended_range_enable;	/* set to enable extended temp range */
20*4882a593Smuzhiyun 	bool beta_compensation;		/* set to enable beta compensation */
21*4882a593Smuzhiyun 	u8 alert_mask;			/* set bit to 1 to disable alert */
22*4882a593Smuzhiyun 	u8 over_temperature_mask;	/* set bit to 1 to disable */
23*4882a593Smuzhiyun 	u8 resistance_cancellation;	/* set bit to 0 to disable
24*4882a593Smuzhiyun 					 * bit mask for MAX6581,
25*4882a593Smuzhiyun 					 * boolean for other chips
26*4882a593Smuzhiyun 					 */
27*4882a593Smuzhiyun 	u8 ideality_mask;		/* set bit to 0 to disable */
28*4882a593Smuzhiyun 	u8 ideality_value;		/* transistor ideality as per
29*4882a593Smuzhiyun 					 * MAX6581 datasheet
30*4882a593Smuzhiyun 					 */
31*4882a593Smuzhiyun };
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun #endif /* MAX6697_H */
34