[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdaH2eZSCtEdCw+S1eGVrPBdEo83gbSf2wzu3-p0=P+CmQ@mail.gmail.com>
Date: Thu, 1 Jun 2023 13:39:37 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: nick.hawkins@....com
Cc: verdun@....com, brgl@...ev.pl, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, jdelvare@...e.com,
linux@...ck-us.net, andy.shevchenko@...il.com,
linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org
Subject: Re: [PATCH v2 2/5] gpio: gxp: Add HPE GXP GPIO
Hi Nick,
thanks for your patch!
On Wed, May 31, 2023 at 5:23 PM <nick.hawkins@....com> wrote:
> +/* Provide info for fan driver */
> +u8 fan_presence;
> +EXPORT_SYMBOL(fan_presence);
> +
> +u8 fan_fail;
> +EXPORT_SYMBOL(fan_fail);
> +
> +/* Remember last PSU config */
> +u8 psu_presence;
As Bartosz said this doesn't work.
to me it looks like you should define a GPIO-controlled fan in the
device tree, similar to this:
fan0: gpio-fan {
compatible = "gpio-fan";
gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
gpio-fan,speed-map = <0 0>, <10000 1>;
#cooling-cells = <2>;
};
Then that cooling cell should be used by a thermal driver for the chassis
to keep the temperature reasonable. I bet you have a temperature sensor
as well, meaning they should form a thermal zone controlled by the fan.
Examples of chassis thermal zones in device tree:
arch/arm/boot/dts/gemini-dlink-dir-685.dts
arch/arm/boot/dts/gemini-dlink-dns-313.dts
Yours,
Linus Walleij
Powered by blists - more mailing lists