Lines Matching full:preset
46 * @preset: array of Counter Register states
52 u16 preset[I8254_NUM_COUNTERS]; member
135 *ceiling = (priv->preset[count->id] == 0) ? U16_MAX : priv->preset[count->id]; in i8254_count_ceiling_read()
138 if (priv->preset[count->id] % 2) in i8254_count_ceiling_read()
139 *ceiling = priv->preset[count->id] - 1; in i8254_count_ceiling_read()
140 else if (priv->preset[count->id] == 0) in i8254_count_ceiling_read()
144 *ceiling = priv->preset[count->id]; in i8254_count_ceiling_read()
222 priv->preset[count->id] = 0; in i8254_count_mode_write()
242 *floor = (priv->preset[count->id] == 0) ? 0 : 1; in i8254_count_floor_read()
245 /* counter is always reloaded after 2 for even preset values */ in i8254_count_floor_read()
246 *floor = (priv->preset[count->id] % 2 || priv->preset[count->id] == 0) ? 0 : 2; in i8254_count_floor_read()
259 struct counter_count *const count, u64 *const preset) in i8254_count_preset_read() argument
263 *preset = priv->preset[count->id]; in i8254_count_preset_read()
269 struct counter_count *const count, const u64 preset) in i8254_count_preset_write() argument
275 if (preset > U16_MAX) in i8254_count_preset_write()
282 if (preset == 1) { in i8254_count_preset_write()
288 priv->preset[count->id] = preset; in i8254_count_preset_write()
290 put_unaligned_le16(preset, value); in i8254_count_preset_write()