On 11/6/24 5:26 AM, Guenter Roeck wrote:
[...]
@@ -480,6 +497,7 @@ static int pwm_fan_probe(struct platform_device
*pdev)
struct device *hwmon;
int ret;
const struct hwmon_channel_info **channels;
+ u32 pwm_min_from_stopped = 0;
u32 *fan_channel_config;
int channel_count = 1; /* We always have a PWM channel. */
int i;
@@ -620,6 +638,19 @@ static int pwm_fan_probe(struct platform_device
*pdev)
channels[1] = &ctx->fan_channel;
}
+ ret = of_property_read_u32(dev->of_node, "fan-stop-to-start-
percent",
+ &pwm_min_from_stopped);
+ if (!ret && pwm_min_from_stopped) {
+ ctx->pwm_duty_cycle_from_stopped =
+ DIV_ROUND_UP(pwm_min_from_stopped *
+ (ctx->pwm_state.period - 1),
+ 100);
Since "period" is u64, this results in the "ERROR: modpost:
"__aeabi_uldivmod"
[drivers/hwmon/pwm-fan.ko] undefined!" error as reported by 0-day. Or at
least
I think that is the problem. I'd suggest to try building the driver on a
32-bit
system to be sure.
Ah, right, fixed in V3. Thanks !