Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Guenter Roeck <linux@roeck-us.net>, linux-hwmon@vger.kernel.org
Cc: Conor Dooley <conor+dt@kernel.org>,
	Jean Delvare <jdelvare@suse.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Rob Herring <robh@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/2] hwmon: (pwm-fan) Introduce start from stopped state handling
Date: Wed, 6 Nov 2024 19:58:51 +0100	[thread overview]
Message-ID: <592f2327-c642-42bb-b01b-c601c6ece18a@denx.de> (raw)
In-Reply-To: <eb635646-17fa-4380-bc9e-b872af227e21@roeck-us.net>

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 !

  reply	other threads:[~2024-11-06 20:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06  2:14 [PATCH v2 1/2] dt-bindings: hwmon: pwm-fan: Document start from stopped state properties Marek Vasut
2024-11-06  2:14 ` [PATCH v2 2/2] hwmon: (pwm-fan) Introduce start from stopped state handling Marek Vasut
2024-11-06  4:26   ` Guenter Roeck
2024-11-06 18:58     ` Marek Vasut [this message]
2024-11-06  3:33 ` [PATCH v2 1/2] dt-bindings: hwmon: pwm-fan: Document start from stopped state properties Rob Herring (Arm)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=592f2327-c642-42bb-b01b-c601c6ece18a@denx.de \
    --to=marex@denx.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox