Lines Matching +full:fan +full:- +full:hat
1 // SPDX-License-Identifier: GPL-2.0
6 * - no support for offset/polarity
7 * - fixed 30 kHz period
9 * Argon Fan HAT https://argon40.com/products/argon-fan-hat
28 if (wf->duty_length_ns > ARGON40_FAN_HAT_PERIOD_NS) in argon_fan_hat_round_waveform_tohw()
31 *wfhw = mul_u64_u64_div_u64(wf->duty_length_ns, 100, ARGON40_FAN_HAT_PERIOD_NS); in argon_fan_hat_round_waveform_tohw()
43 wf->period_length_ns = ARGON40_FAN_HAT_PERIOD_NS; in argon_fan_hat_round_waveform_fromhw()
44 wf->duty_length_ns = DIV64_U64_ROUND_UP(wf->period_length_ns * *wfhw, 100); in argon_fan_hat_round_waveform_fromhw()
45 wf->duty_offset_ns = 0; in argon_fan_hat_round_waveform_fromhw()
67 * reading from the controller stops the fan, therefore there
74 struct pwm_chip *chip = devm_pwmchip_alloc(&i2c->dev, 1, 0); in argon_fan_hat_i2c_probe()
80 chip->ops = &argon_fan_hat_pwm_ops; in argon_fan_hat_i2c_probe()
83 ret = devm_pwmchip_add(&i2c->dev, chip); in argon_fan_hat_i2c_probe()
85 return dev_err_probe(&i2c->dev, ret, "Could not add PWM chip\n"); in argon_fan_hat_i2c_probe()
91 { .compatible = "argon40,fan-hat" },
98 .name = "argon-fan-hat",
108 MODULE_DESCRIPTION("Argon40 Fan HAT");