Home
last modified time | relevance | path

Searched refs:threshold_hi (Results 1 – 3 of 3) sorted by relevance

/openbmc/linux/drivers/iio/adc/
H A Dhi8435.c51 unsigned threshold_hi[2]; /* GND-Open and Supply-Open thresholds */ member
215 if (val < 2 || val > 21 || (val + 2) > priv->threshold_hi[mode]) in hi8435_write_event_value()
224 if ((priv->threshold_hi[mode] - priv->threshold_lo[mode]) % 2) in hi8435_write_event_value()
225 priv->threshold_hi[mode]--; in hi8435_write_event_value()
231 if (val == priv->threshold_hi[mode]) in hi8435_write_event_value()
234 priv->threshold_hi[mode] = val; in hi8435_write_event_value()
237 if ((priv->threshold_hi[mode] - priv->threshold_lo[mode]) % 2) in hi8435_write_event_value()
252 reg = priv->threshold_hi[mode] - priv->threshold_lo[mode]; in hi8435_write_event_value()
255 reg |= (priv->threshold_hi[mode] + priv->threshold_lo[mode]); in hi8435_write_event_value()
508 priv->threshold_hi[0] = priv->threshold_hi[1] = 4; in hi8435_probe()
/openbmc/linux/drivers/misc/
H A Dbh1770glc.c301 u16 threshold_hi, u16 threshold_lo) in bh1770_lux_update_thresholds() argument
315 if (threshold_hi != BH1770_LUX_RANGE && threshold_hi != 0) in bh1770_lux_update_thresholds()
316 threshold_hi = bh1770_lux_adjusted_to_raw(chip, threshold_hi); in bh1770_lux_update_thresholds()
321 if (chip->lux_thres_hi_onchip == threshold_hi && in bh1770_lux_update_thresholds()
325 chip->lux_thres_hi_onchip = threshold_hi; in bh1770_lux_update_thresholds()
328 data[0] = threshold_hi; in bh1770_lux_update_thresholds()
329 data[1] = threshold_hi >> 8; in bh1770_lux_update_thresholds()
/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dcore_env.c804 int err, threshold_hi; in mlxsw_env_temp_event_set() local
818 &threshold_hi); in mlxsw_env_temp_event_set()
823 threshold_hi = MLXSW_REG_MTMP_THRESH_HI; in mlxsw_env_temp_event_set()
830 threshold_hi = threshold_hi / 1000 * 8; in mlxsw_env_temp_event_set()
832 mlxsw_reg_mtmp_temperature_threshold_hi_set(mtmp_pl, threshold_hi); in mlxsw_env_temp_event_set()
833 mlxsw_reg_mtmp_temperature_threshold_lo_set(mtmp_pl, threshold_hi - in mlxsw_env_temp_event_set()