Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _GSC_HWMON_H
0003 #define _GSC_HWMON_H
0004 
0005 enum gsc_hwmon_mode {
0006     mode_temperature,
0007     mode_voltage_24bit,
0008     mode_voltage_raw,
0009     mode_voltage_16bit,
0010     mode_fan,
0011     mode_max,
0012 };
0013 
0014 /**
0015  * struct gsc_hwmon_channel - configuration parameters
0016  * @reg:  I2C register offset
0017  * @mode: channel mode
0018  * @name: channel name
0019  * @mvoffset: voltage offset
0020  * @vdiv: voltage divider array (2 resistor values in milli-ohms)
0021  */
0022 struct gsc_hwmon_channel {
0023     unsigned int reg;
0024     unsigned int mode;
0025     const char *name;
0026     unsigned int mvoffset;
0027     unsigned int vdiv[2];
0028 };
0029 
0030 /**
0031  * struct gsc_hwmon_platform_data - platform data for gsc_hwmon driver
0032  * @channels:   pointer to array of gsc_hwmon_channel structures
0033  *      describing channels
0034  * @nchannels:  number of elements in @channels array
0035  * @vreference: voltage reference (mV)
0036  * @resolution: ADC bit resolution
0037  * @fan_base: register base for FAN controller
0038  */
0039 struct gsc_hwmon_platform_data {
0040     const struct gsc_hwmon_channel *channels;
0041     int nchannels;
0042     unsigned int resolution;
0043     unsigned int vreference;
0044     unsigned int fan_base;
0045 };
0046 #endif