linux/include/linux/platform_data/gsc_hwmon.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2#ifndef _GSC_HWMON_H
   3#define _GSC_HWMON_H
   4
   5enum gsc_hwmon_mode {
   6        mode_temperature,
   7        mode_voltage,
   8        mode_voltage_raw,
   9        mode_max,
  10};
  11
  12/**
  13 * struct gsc_hwmon_channel - configuration parameters
  14 * @reg:  I2C register offset
  15 * @mode: channel mode
  16 * @name: channel name
  17 * @mvoffset: voltage offset
  18 * @vdiv: voltage divider array (2 resistor values in milli-ohms)
  19 */
  20struct gsc_hwmon_channel {
  21        unsigned int reg;
  22        unsigned int mode;
  23        const char *name;
  24        unsigned int mvoffset;
  25        unsigned int vdiv[2];
  26};
  27
  28/**
  29 * struct gsc_hwmon_platform_data - platform data for gsc_hwmon driver
  30 * @channels:   pointer to array of gsc_hwmon_channel structures
  31 *              describing channels
  32 * @nchannels:  number of elements in @channels array
  33 * @vreference: voltage reference (mV)
  34 * @resolution: ADC bit resolution
  35 * @fan_base: register base for FAN controller
  36 */
  37struct gsc_hwmon_platform_data {
  38        const struct gsc_hwmon_channel *channels;
  39        int nchannels;
  40        unsigned int resolution;
  41        unsigned int vreference;
  42        unsigned int fan_base;
  43};
  44#endif
  45