Home
last modified time | relevance | path

Searched refs:tach (Results 1 – 10 of 10) sorted by relevance

/drivers/hwmon/
Dpwm-fan.c65 struct pwm_fan_tach *tach = dev_id; in pulse_handler() local
67 atomic_inc(&tach->pulses); in pulse_handler()
80 struct pwm_fan_tach *tach = &ctx->tachs[i]; in sample_timer() local
83 pulses = atomic_read(&tach->pulses); in sample_timer()
84 atomic_sub(pulses, &tach->pulses); in sample_timer()
85 tach->rpm = (unsigned int)(pulses * 1000 * 60) / in sample_timer()
86 (tach->pulses_per_revolution * delta); in sample_timer()
393 struct pwm_fan_tach *tach = &ctx->tachs[i]; in pwm_fan_probe() local
396 tach->irq = platform_get_irq(pdev, i); in pwm_fan_probe()
397 if (tach->irq == -EPROBE_DEFER) in pwm_fan_probe()
[all …]
Dadt7475.c208 u16 tach[2][4]; member
258 static inline int tach2rpm(u16 tach) in tach2rpm() argument
260 if (tach == 0 || tach == 0xFFFF) in tach2rpm()
263 return (90000 * 60) / tach; in tach2rpm()
706 out = tach2rpm(data->tach[sattr->nr][sattr->index]); in tach_show()
725 data->tach[MIN][sattr->index] = rpm2tach(val); in tach_store()
728 data->tach[MIN][sattr->index]); in tach_store()
1138 static SENSOR_DEVICE_ATTR_2_RO(fan1_input, tach, INPUT, 0);
1139 static SENSOR_DEVICE_ATTR_2_RW(fan1_min, tach, MIN, 0);
1140 static SENSOR_DEVICE_ATTR_2_RO(fan1_alarm, tach, ALARM, 0);
[all …]
Dmax31790.c65 u16 tach[NR_CHANNEL * 2]; member
98 data->tach[i] = rv; in max31790_update_device()
107 data->tach[NR_CHANNEL + i] = rv; in max31790_update_device()
177 if (data->tach[channel] == FAN_COUNT_REG_MAX) in max31790_read_fan()
180 rpm = RPM_FROM_REG(data->tach[channel], sr); in max31790_read_fan()
Daxi-fan-control.c134 const u32 tach = axi_ioread(ADI_REG_TACH_MEASUR, ctl); in axi_fan_control_get_fan_rpm() local
136 if (tach == 0) in axi_fan_control_get_fan_rpm()
147 return DIV_ROUND_CLOSEST(60 * ctl->clk_rate, ctl->ppr * tach); in axi_fan_control_get_fan_rpm()
Dmax6650.c112 u8 tach[4]; member
172 data->tach[i] = reg; in max6650_update_device()
563 *val = DIV_ROUND_CLOSEST(data->tach[channel] * 120, in max6650_read()
DKconfig390 tristate "ASPEED AST2400/AST2500 PWM and Fan tach driver"
/drivers/gpu/drm/nouveau/nvkm/subdev/therm/
Dgt215.c32 u32 tach = nvkm_rd32(device, 0x00e728) & 0x0000ffff; in gt215_therm_fan_sense() local
35 return tach * 60 / 2; in gt215_therm_fan_sense()
43 struct dcb_gpio_func *tach = &therm->fan->tach; in gt215_therm_init() local
49 if (tach->func != DCB_GPIO_UNUSED) { in gt215_therm_init()
51 nvkm_mask(device, 0x00e720, 0x001f0000, tach->line << 16); in gt215_therm_init()
Dfan.c130 u64 start, end, tach; in nvkm_therm_fan_sense() local
135 if (therm->fan->tach.func == DCB_GPIO_UNUSED) in nvkm_therm_fan_sense()
143 prev = nvkm_gpio_get(gpio, 0, therm->fan->tach.func, in nvkm_therm_fan_sense()
144 therm->fan->tach.line); in nvkm_therm_fan_sense()
149 cur = nvkm_gpio_get(gpio, 0, therm->fan->tach.func, in nvkm_therm_fan_sense()
150 therm->fan->tach.line); in nvkm_therm_fan_sense()
161 tach = (u64)60000000000ULL; in nvkm_therm_fan_sense()
162 do_div(tach, (end - start)); in nvkm_therm_fan_sense()
163 return tach; in nvkm_therm_fan_sense()
260 &therm->fan->tach); in nvkm_therm_fan_ctor()
[all …]
Dgf119.c128 if (therm->fan->tach.func != DCB_GPIO_UNUSED) { in gf119_therm_init()
129 nvkm_mask(device, 0x00d79c, 0x000000ff, therm->fan->tach.line); in gf119_therm_init()
Dpriv.h52 struct dcb_gpio_func tach; member