Home
last modified time | relevance | path

Searched full:hyst (Results 1 – 25 of 115) sorted by relevance

12345

/kernel/linux/linux-5.10/drivers/hwmon/
Demc1403.c106 unsigned int hyst; in show_hyst_common() local
113 retval = regmap_read(regmap, 0x21, &hyst); in show_hyst_common()
117 return sprintf(buf, "%d000\n", is_min ? limit + hyst : limit - hyst); in show_hyst_common()
140 int hyst; in hyst_store() local
151 hyst = limit * 1000 - val; in hyst_store()
152 hyst = clamp_val(DIV_ROUND_CLOSEST(hyst, 1000), 0, 255); in hyst_store()
153 retval = regmap_write(regmap, 0x21, hyst); in hyst_store()
173 static SENSOR_DEVICE_ATTR_RO(temp1_max_hyst, hyst, 0x05);
174 static SENSOR_DEVICE_ATTR_RW(temp1_crit_hyst, hyst, 0x20);
185 static SENSOR_DEVICE_ATTR_RO(temp2_max_hyst, hyst, 0x07);
[all …]
Dadt7x10.c69 u8 hyst; /* hysteresis offset */ member
193 data->hyst = ret; in adt7x10_fill_cache()
268 int hyst; in adt7x10_t_hyst_show() local
270 hyst = (data->hyst & ADT7X10_T_HYST_MASK) * 1000; in adt7x10_t_hyst_show()
277 hyst = -hyst; in adt7x10_t_hyst_show()
279 ADT7X10_REG_TO_TEMP(data, data->temp[nr]) - hyst); in adt7x10_t_hyst_show()
288 long hyst; in adt7x10_t_hyst_store() local
290 ret = kstrtol(buf, 10, &hyst); in adt7x10_t_hyst_store()
295 hyst = clamp_val(hyst, ADT7X10_TEMP_MIN, ADT7X10_TEMP_MAX); in adt7x10_t_hyst_store()
296 data->hyst = clamp_val(DIV_ROUND_CLOSEST(limit - hyst, 1000), in adt7x10_t_hyst_store()
[all …]
Djc42.c271 int temp, hyst; in jc42_read() local
291 hyst = jc42_hysteresis[(data->config & JC42_CFG_HYST_MASK) in jc42_read()
293 *val = temp - hyst; in jc42_read()
297 hyst = jc42_hysteresis[(data->config & JC42_CFG_HYST_MASK) in jc42_read()
299 *val = temp - hyst; in jc42_read()
320 int diff, hyst; in jc42_write() local
350 hyst = 0; in jc42_write()
353 hyst = 1; /* 1.5 degrees C */ in jc42_write()
355 hyst = 2; /* 3.0 degrees C */ in jc42_write()
357 hyst = 3; /* 6.0 degrees C */ in jc42_write()
[all …]
Dlm77.c243 int i, cur, conf, hyst, crit, min, max; in lm77_detect() local
266 hyst = i2c_smbus_read_word_data(client, 2); in lm77_detect()
272 || i2c_smbus_read_word_data(client, i + 2) != hyst in lm77_detect()
281 || ((hyst & 0x00f0) != 0xf0 && (hyst & 0x00f0) != 0x0) in lm77_detect()
296 hyst = i2c_smbus_read_word_data(client, 2); in lm77_detect()
297 if (i2c_smbus_read_word_data(client, 6) != hyst in lm77_detect()
298 || i2c_smbus_read_word_data(client, 7) != hyst) in lm77_detect()
Dtmp108.c96 int err, hyst; in tmp108_read() local
161 hyst = 0; in tmp108_read()
164 hyst = 1000; in tmp108_read()
167 hyst = 2000; in tmp108_read()
170 hyst = 4000; in tmp108_read()
179 *temp += hyst; in tmp108_read()
181 *temp -= hyst; in tmp108_read()
Dstts751.c93 int hyst; member
456 priv->hyst = temp - (priv->therm - priv->hyst); in therm_store()
472 return snprintf(buf, PAGE_SIZE, "%d\n", priv->hyst); in hyst_show()
489 priv->hyst = temp; in hyst_store()
490 dev_dbg(&priv->client->dev, "setting hyst %ld", temp); in hyst_store()
736 priv->hyst = priv->therm - tmp; in stts751_read_chip_config()
747 static SENSOR_DEVICE_ATTR_RW(temp1_crit_hyst, hyst, 0);
Dlm75.c786 int conf, hyst, os; in lm75_detect() local
834 hyst = i2c_smbus_read_byte_data(new_client, 2); in lm75_detect()
838 hyst = i2c_smbus_read_byte_data(new_client, 2); in lm75_detect()
839 if (i2c_smbus_read_byte_data(new_client, 4) != hyst in lm75_detect()
840 || i2c_smbus_read_byte_data(new_client, 5) != hyst in lm75_detect()
841 || i2c_smbus_read_byte_data(new_client, 6) != hyst in lm75_detect()
842 || i2c_smbus_read_byte_data(new_client, 7) != hyst) in lm75_detect()
855 if (hyst == 0 && os == 0) in lm75_detect()
861 || i2c_smbus_read_byte_data(new_client, i + 2) != hyst in lm75_detect()
/kernel/linux/linux-4.19/drivers/hwmon/
Dadt7x10.c82 u8 hyst; /* hysteresis offset */ member
206 data->hyst = ret; in adt7x10_fill_cache()
283 int hyst; in adt7x10_show_t_hyst() local
285 hyst = (data->hyst & ADT7X10_T_HYST_MASK) * 1000; in adt7x10_show_t_hyst()
292 hyst = -hyst; in adt7x10_show_t_hyst()
294 ADT7X10_REG_TO_TEMP(data, data->temp[nr]) - hyst); in adt7x10_show_t_hyst()
303 long hyst; in adt7x10_set_t_hyst() local
305 ret = kstrtol(buf, 10, &hyst); in adt7x10_set_t_hyst()
310 hyst = clamp_val(hyst, ADT7X10_TEMP_MIN, ADT7X10_TEMP_MAX); in adt7x10_set_t_hyst()
311 data->hyst = clamp_val(DIV_ROUND_CLOSEST(limit - hyst, 1000), in adt7x10_set_t_hyst()
[all …]
Djc42.c284 int temp, hyst; in jc42_read() local
304 hyst = jc42_hysteresis[(data->config & JC42_CFG_HYST_MASK) in jc42_read()
306 *val = temp - hyst; in jc42_read()
310 hyst = jc42_hysteresis[(data->config & JC42_CFG_HYST_MASK) in jc42_read()
312 *val = temp - hyst; in jc42_read()
333 int diff, hyst; in jc42_write() local
363 hyst = 0; in jc42_write()
366 hyst = 1; /* 1.5 degrees C */ in jc42_write()
368 hyst = 2; /* 3.0 degrees C */ in jc42_write()
370 hyst = 3; /* 6.0 degrees C */ in jc42_write()
[all …]
Dlm77.c255 int i, cur, conf, hyst, crit, min, max; in lm77_detect() local
278 hyst = i2c_smbus_read_word_data(client, 2); in lm77_detect()
284 || i2c_smbus_read_word_data(client, i + 2) != hyst in lm77_detect()
293 || ((hyst & 0x00f0) != 0xf0 && (hyst & 0x00f0) != 0x0) in lm77_detect()
308 hyst = i2c_smbus_read_word_data(client, 2); in lm77_detect()
309 if (i2c_smbus_read_word_data(client, 6) != hyst in lm77_detect()
310 || i2c_smbus_read_word_data(client, 7) != hyst) in lm77_detect()
Dtmp108.c105 int err, hyst; in tmp108_read() local
170 hyst = 0; in tmp108_read()
173 hyst = 1000; in tmp108_read()
176 hyst = 2000; in tmp108_read()
179 hyst = 4000; in tmp108_read()
188 *temp += hyst; in tmp108_read()
190 *temp -= hyst; in tmp108_read()
Demc1403.c117 unsigned int hyst; in show_hyst_common() local
124 retval = regmap_read(regmap, 0x21, &hyst); in show_hyst_common()
128 return sprintf(buf, "%d000\n", is_min ? limit + hyst : limit - hyst); in show_hyst_common()
151 int hyst; in store_hyst() local
162 hyst = limit * 1000 - val; in store_hyst()
163 hyst = clamp_val(DIV_ROUND_CLOSEST(hyst, 1000), 0, 255); in store_hyst()
164 retval = regmap_write(regmap, 0x21, hyst); in store_hyst()
Dlm75.c530 int conf, hyst, os; in lm75_detect() local
576 hyst = i2c_smbus_read_byte_data(new_client, 2); in lm75_detect()
580 hyst = i2c_smbus_read_byte_data(new_client, 2); in lm75_detect()
581 if (i2c_smbus_read_byte_data(new_client, 4) != hyst in lm75_detect()
582 || i2c_smbus_read_byte_data(new_client, 5) != hyst in lm75_detect()
583 || i2c_smbus_read_byte_data(new_client, 6) != hyst in lm75_detect()
584 || i2c_smbus_read_byte_data(new_client, 7) != hyst) in lm75_detect()
597 if (hyst == 0 && os == 0) in lm75_detect()
603 || i2c_smbus_read_byte_data(new_client, i + 2) != hyst in lm75_detect()
Dstts751.c102 int hyst; member
465 priv->hyst = temp - (priv->therm - priv->hyst); in set_therm()
481 return snprintf(buf, PAGE_SIZE, "%d\n", priv->hyst); in show_hyst()
498 priv->hyst = temp; in set_hyst()
499 dev_dbg(&priv->client->dev, "setting hyst %ld", temp); in set_hyst()
744 priv->hyst = priv->therm - tmp; in stts751_read_chip_config()
/kernel/linux/linux-5.10/drivers/thermal/
Dthermal_netlink.h18 int temp, int hyst);
20 int temp, int hyst);
68 int temp, int hyst) in thermal_notify_tz_trip_add() argument
74 int temp, int hyst) in thermal_notify_tz_trip_change() argument
Dgov_bang_bang.c30 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update()
88 * (trip_temp - hyst): +<----+
96 * (trip_temp - hyst) so that the fan gets turned off again.
/kernel/linux/linux-5.10/drivers/mfd/
Dtps65218.c238 u32 hyst; in tps65218_voltage_set_uv_hyst() local
241 "ti,under-voltage-hyst-microvolt", &hyst)) in tps65218_voltage_set_uv_hyst()
244 if (hyst != 400000 && hyst != 200000) { in tps65218_voltage_set_uv_hyst()
246 "Invalid ti,under-voltage-hyst-microvolt value\n"); in tps65218_voltage_set_uv_hyst()
252 hyst == 400000 ? TPS65218_CONFIG2_UVLOHYS : 0, in tps65218_voltage_set_uv_hyst()
/kernel/linux/linux-4.19/drivers/clk/bcm/
Dclk-kona-setup.c82 struct bcm_clk_hyst *hyst; in peri_clk_data_offsets_valid() local
108 hyst = &peri->hyst; in peri_clk_data_offsets_valid()
116 if (hyst_exists(hyst)) { in peri_clk_data_offsets_valid()
117 if (hyst->offset > limit) { in peri_clk_data_offsets_valid()
120 name, hyst->offset, limit); in peri_clk_data_offsets_valid()
124 } else if (hyst_exists(hyst)) { in peri_clk_data_offsets_valid()
276 static bool hyst_valid(struct bcm_clk_hyst *hyst, const char *clock_name) in hyst_valid() argument
278 if (!bit_posn_valid(hyst->en_bit, "hysteresis enable", clock_name)) in hyst_valid()
281 if (!bit_posn_valid(hyst->val_bit, "hysteresis value", clock_name)) in hyst_valid()
405 struct bcm_clk_hyst *hyst; in peri_clk_data_valid() local
[all …]
/kernel/linux/linux-5.10/drivers/clk/bcm/
Dclk-kona-setup.c82 struct bcm_clk_hyst *hyst; in peri_clk_data_offsets_valid() local
108 hyst = &peri->hyst; in peri_clk_data_offsets_valid()
116 if (hyst_exists(hyst)) { in peri_clk_data_offsets_valid()
117 if (hyst->offset > limit) { in peri_clk_data_offsets_valid()
120 name, hyst->offset, limit); in peri_clk_data_offsets_valid()
124 } else if (hyst_exists(hyst)) { in peri_clk_data_offsets_valid()
276 static bool hyst_valid(struct bcm_clk_hyst *hyst, const char *clock_name) in hyst_valid() argument
278 if (!bit_posn_valid(hyst->en_bit, "hysteresis enable", clock_name)) in hyst_valid()
281 if (!bit_posn_valid(hyst->val_bit, "hysteresis value", clock_name)) in hyst_valid()
405 struct bcm_clk_hyst *hyst; in peri_clk_data_valid() local
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlxsw/
Dcore_thermal.c46 int hyst; member
55 .hyst = MLXSW_THERMAL_HYSTERESIS_TEMP,
63 .hyst = MLXSW_THERMAL_HYSTERESIS_TEMP,
70 .hyst = MLXSW_THERMAL_HYSTERESIS_TEMP,
341 *p_hyst = thermal->trips[trip].hyst; in mlxsw_thermal_get_trip_hyst()
346 int trip, int hyst) in mlxsw_thermal_set_trip_hyst() argument
350 thermal->trips[trip].hyst = hyst; in mlxsw_thermal_set_trip_hyst()
511 *p_hyst = tz->trips[trip].hyst; in mlxsw_thermal_module_trip_hyst_get()
517 int hyst) in mlxsw_thermal_module_trip_hyst_set() argument
521 tz->trips[trip].hyst = hyst; in mlxsw_thermal_module_trip_hyst_set()
/kernel/linux/linux-4.19/drivers/thermal/
Dgov_bang_bang.c40 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update()
98 * (trip_temp - hyst): +<----+
106 * (trip_temp - hyst) so that the fan gets turned off again.
/kernel/linux/linux-5.10/drivers/thermal/samsung/
Dexynos_tmu.c200 u8 temp, u8 hyst);
266 int ret = 0, temp, hyst; in exynos_tmu_initialize() local
314 ret = tzd->ops->get_trip_hyst(tzd, i, &hyst); in exynos_tmu_initialize()
317 hyst /= MCELSIUS; in exynos_tmu_initialize()
318 data->tmu_set_trip_hyst(data, i, temp, hyst); in exynos_tmu_initialize()
382 int trip, u8 temp, u8 hyst) in exynos4210_tmu_set_trip_hyst() argument
411 int trip, u8 temp, u8 hyst) in exynos4412_tmu_set_trip_hyst() argument
417 if (hyst) in exynos4412_tmu_set_trip_hyst()
418 th |= temp_to_code(data, temp - hyst) << 8 * trip; in exynos4412_tmu_set_trip_hyst()
470 int trip, u8 temp, u8 hyst) in exynos5433_tmu_set_trip_hyst() argument
[all …]
/kernel/linux/linux-4.19/drivers/thermal/samsung/
Dexynos_tmu.c211 u8 temp, u8 hyst);
277 int ret = 0, temp, hyst; in exynos_tmu_initialize() local
325 ret = tzd->ops->get_trip_hyst(tzd, i, &hyst); in exynos_tmu_initialize()
328 hyst /= MCELSIUS; in exynos_tmu_initialize()
329 data->tmu_set_trip_hyst(data, i, temp, hyst); in exynos_tmu_initialize()
393 int trip, u8 temp, u8 hyst) in exynos4210_tmu_set_trip_hyst() argument
422 int trip, u8 temp, u8 hyst) in exynos4412_tmu_set_trip_hyst() argument
428 if (hyst) in exynos4412_tmu_set_trip_hyst()
429 th |= temp_to_code(data, temp - hyst) << 8 * trip; in exynos4412_tmu_set_trip_hyst()
481 int trip, u8 temp, u8 hyst) in exynos5433_tmu_set_trip_hyst() argument
[all …]
/kernel/linux/linux-5.10/drivers/thermal/intel/int340x_thermal/
Dint340x_thermal_zone.c135 unsigned long long hyst; in int340x_thermal_get_trip_hyst() local
140 status = acpi_evaluate_integer(d->adev->handle, "GTSH", NULL, &hyst); in int340x_thermal_get_trip_hyst()
144 *temp = hyst * 100; in int340x_thermal_get_trip_hyst()
/kernel/linux/linux-4.19/drivers/thermal/int340x_thermal/
Dint340x_thermal_zone.c143 unsigned long long hyst; in int340x_thermal_get_trip_hyst() local
148 status = acpi_evaluate_integer(d->adev->handle, "GTSH", NULL, &hyst); in int340x_thermal_get_trip_hyst()
152 *temp = hyst * 100; in int340x_thermal_get_trip_hyst()

12345