125 static char fanX_mode[] =
"fanX_mode";
126 static char fanX_target[] =
"fanX_target";
127 static char fanX_min[] =
"fanX_min";
128 static char fanX_max[] =
"fanX_max";
131 u16 fan_target =
config->default_fan_target[fan_idx];
132 u8 fan_min =
config->default_fan_min[fan_idx];
133 u8 fan_max =
config->default_fan_max[fan_idx];
135 fanX_mode[3] =
'1' + fan_idx;
141 fanX_target[3] =
'1' + fan_idx;
146 "Setting it8516e fan%d "
147 "control to auto.\n",
152 "Setting it8516e fan%d "
153 "control to %d%% PWM.\n",
154 fan_idx + 1, fan_target);
155 if (fan_target > 100)
161 "Setting it8516e fan%d "
162 "control to %d RPMs.\n",
163 fan_idx + 1, fan_target);
168 "Setting it8516e fan%d control to %d C.\n",
169 fan_idx + 1, fan_target);
170 if (fan_target > 1024)
174 fanX_min[3] =
'1' + fan_idx;
175 fanX_max[3] =
'1' + fan_idx;
179 if (!fan_max || fan_max > 100)
183 if (fan_max <= fan_min)
186 fan_max = fan_min + 1;
189 "Setting it8516e fan%d limits to %d%% - %d%% PWM.\n",
190 fan_idx + 1, fan_min, fan_max);
242 CHIP_NAME(
"Kontron (Fintec/ITE) IT8516E EC")
#define printk(level,...)
struct resource * find_resource(const struct device *dev, unsigned int index)
Return an existing resource structure for a given index.
int send_ec_command(u8 command)
void ec_set_ports(u16 cmd_reg, u16 data_reg)
int send_ec_data(u8 data)
static void it8516e_set_fan_from_options(const config_t *const config, const u8 fan_idx)
static struct pnp_info it8516e_dev_infos[]
static void it8516e_set_fan_temperature(const u8 idx, const u16 temp)
Sets the target temperature for a fan in IT8516E_MODE_THERMAL.
static void it8516e_pm2_init(struct device *dev)
static void it8516e_set_fan_speed(const u8 idx, const u16 speed)
Sets the target speed in RPM for a fan in IT8516E_MODE_SPEED.
static void it8516e_set_systemp_type(const u8 type)
Sets the type of the external temperature sensor used.
static void it8516e_enable(struct device *dev)
static void it8516e_set_fan_pwm(const u8 idx, const u8 pwm)
Sets the PWM rate of a fan in IT8516E_MODE_PWM.
@ IT8516E_CMD_SET_FAN_TEMP
@ IT8516E_CMD_SET_FAN_MODE
@ IT8516E_CMD_SET_FAN_PWM
@ IT8516E_CMD_GET_FAN_TEMP
@ IT8516E_CMD_GET_FAN_PWM
@ IT8516E_CMD_SET_SYSTEMP_TYPE
@ IT8516E_CMD_GET_SYSTEMP_TYPE
@ IT8516E_CMD_SET_FAN_LIMITS
@ IT8516E_CMD_GET_FAN_MODE
@ IT8516E_CMD_GET_FAN_SPEED
@ IT8516E_CMD_SET_FAN_SPEED
const struct chip_operations ec_kontron_it8516e_ops
static void it8516e_set_fan_mode(const u8 idx, const u8 mode)
Sets the operating mode of a fan.
static struct device_operations it8516e_pm2_ops
static void it8516e_set_fan_limits(const u8 idx, const u8 min, const u8 max)
Sets the minimum and maximum PWM rate of a fan in IT8516E_MODE_THERMAL.
@ IT8516E_SYSTEMP_LASTPLUSONE
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
unsigned int get_uint_option(const char *name, const unsigned int fallback)
void pnp_enable(struct device *dev)
void pnp_read_resources(struct device *dev)
void pnp_enable_devices(struct device *base_dev, struct device_operations *ops, unsigned int functions, struct pnp_info *info)
struct device_operations pnp_ops
void pnp_set_resources(struct device *dev)
void pnp_enable_resources(struct device *dev)
void(* read_resources)(struct device *dev)
DEVTREE_CONST void * chip_info