Re: [PATCH 3/7] hwmon: (max31790) Allow setting pulses

2021-03-08 Thread Václav Kubernát
Thanks, I will include fixes in v2 of the patches. By the way, I'd like to mention that Jan is my colleague. Václav pá 5. 3. 2021 v 13:08 odesílatel Jan Kundrát napsal: > > > @@ -285,6 +295,9 @@ static int max31790_write_fan(struct device > > *dev, u32 attr, int channel, > >

Re: [PATCH 3/7] hwmon: (max31790) Allow setting pulses

2021-03-05 Thread Jan Kundrát
@@ -285,6 +295,9 @@ static int max31790_write_fan(struct device *dev, u32 attr, int channel, MAX31790_REG_FAN_CONFIG(channel), data->fan_config[channel]); break; + case hwmon_fan_pulses: + da

[PATCH 3/7] hwmon: (max31790) Allow setting pulses

2021-03-04 Thread Václav Kubernát
In the old code, the value calculated RPM_FROM_REG is misleading. The left-hand side of the division is correct (as per the datasheet, page 11). The misleading part is the right-hand side: the datasheet says it is should be "number of pulses * TACH count". The TACH count is the value of the registe