Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp663203rwd; Thu, 1 Jun 2023 05:12:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HQJA33v7wa8hI5QZdahcAI+uKzG+nSdTcEQvWTjPOvhuCAHblcvLil3GvqMrpEGQbj1LM X-Received: by 2002:a05:6870:770d:b0:19f:36ea:989c with SMTP id dw13-20020a056870770d00b0019f36ea989cmr5887431oab.0.1685621573879; Thu, 01 Jun 2023 05:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685621573; cv=none; d=google.com; s=arc-20160816; b=PJoIqdsldPfjxldz+kjJN8JpNFTBIvTzVmFWcFSwq3sUDSQPGHE70wtNnDgnwLAJee iU1MAElej+5OfC2tOJwk6uqOXSWJBbLYqxFzbFdY3FjE0+aJxilDMzwu9FQMHJYx7LMM L2xev7NZE/OkNFoQ77WZcML6wvq5Q0wBFYT6MuWiy+QfTlzMIQQSqYSVqCoMKzFFrVog s1o2qVHfzEFCCzH8tloh2B/JWFRHkRuWTgLFYyQAFrNmpy/MfxMhDY98JLAXaPSFCofg zD5ZKJVg8LnLKORuOP7TlwV1ULl2DAEqXTKZB0nCf8oWT++AAOdkcfH2/E9jnhfj7QwN eQjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=JtKqDhOhV8jcZhCSJeAVNY1VyfUXM1TIO50JtxkLlV8=; b=SgXDjVuBYayTm3r+fwNGD69EYrnPlNZJtLtjkC/UiGWzQsDBA429UKi6zd0BVXnSLu idfaCbNBrWPf9zrBmoGFGD/IBIw/92LvKRbRNWGY/bus5DaOJQYScGGsxUWLmxkLRqti 1AJ/3dEoDfQKuv8m9z8fByZMD5IVJDrKd6NBxR5i9ZfSNS6VJymFGLSml5OWwJoets7M yJfpoK3vfyDQtxi3Jm1YHW50Zx2Z4xfg/GqatXXDVnSD1r2aNiFu5jTwbBYe8gI8Quvn QqXNr5bKNDPLd9wATR06DKrJ3Moo68u4qCXruL+Ubt9XKe4L/V28tStaftdWGKIoImOs cSDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wPaEH8XF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z123-20020a633381000000b0053b8c98d14bsi2681651pgz.859.2023.06.01.05.12.41; Thu, 01 Jun 2023 05:12:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wPaEH8XF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232853AbjFALjn (ORCPT + 99 others); Thu, 1 Jun 2023 07:39:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232626AbjFALjl (ORCPT ); Thu, 1 Jun 2023 07:39:41 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45AC1137 for ; Thu, 1 Jun 2023 04:39:39 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-bad97da58adso767299276.1 for ; Thu, 01 Jun 2023 04:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685619578; x=1688211578; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JtKqDhOhV8jcZhCSJeAVNY1VyfUXM1TIO50JtxkLlV8=; b=wPaEH8XFaAQh5F9IVbR25tk3T1wzNl5jkgIhZZ20Ec+I85gyyrdM1EAKOvfqTk2bH3 dT1lK1AItS7uuYxQ/uZG2wyXsF/QgISfDDTsW/2gh3GZ+4DBBPSPf4hYJPdrBHndyrAy KzTRwyvZ0GNCWwStb9suC2CXdvTyrmcJ1e6NjVbBqFHWN3X+RmtEVgoYf2lZmscQDNpO RMp3xcatfs2Swbc++cBCimb5MuiksZlykgtws415BNpPNVl/Ih6qjy8eCW4cLGxAEu88 zr0LSwEoLTDFQGVX95WxbQwAJCOYAgykodH9zJU4piFsQ6sCdwp6BVW6Jh6XVqjcbqsz pg9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685619578; x=1688211578; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JtKqDhOhV8jcZhCSJeAVNY1VyfUXM1TIO50JtxkLlV8=; b=CJkRyrs1FZP/kWPIZ4UK2imBu0N9wM9lqAvYh4tg91kFMnv7aDCT/chfMXE6w8GoS+ 5MpzefPtGrnDy58c9Ca+JDLQ9kMFhlScOYZFzii2epGmaMkaXAzVGCGQ1UT2wrww3MGT Uv4qz2Y8dGEyWIjRO8bw+UDrUrjWov65Tiq8cqJ6/pVfgPUrNy3TxgehcAWgvAFfd91V 6bvoPbemHrWzuFQR/PtMhxN9m2kP9AcpvAxCg8bHfsjWDd7yIFHurx/0oo6FYYmAZJOx deTJGB2IT+7USQzNU1YtXNNTtmEIza+jBhv0+F57sskPt6ZfFYZJKawWHrQHrPzXVK4u 2EIQ== X-Gm-Message-State: AC+VfDwXkC0gw66BCDpu4qCrtInirf7MjJ1rEdhhVI6RCVlO4XLaWNfw vc/b0HHGMpoDRTNUi0ZXLa/R9kn7wISpC0TwhAutzw== X-Received: by 2002:a81:7d41:0:b0:561:ed46:2f51 with SMTP id y62-20020a817d41000000b00561ed462f51mr9778258ywc.22.1685619578459; Thu, 01 Jun 2023 04:39:38 -0700 (PDT) MIME-Version: 1.0 References: <20230531151918.105223-1-nick.hawkins@hpe.com> <20230531151918.105223-3-nick.hawkins@hpe.com> In-Reply-To: <20230531151918.105223-3-nick.hawkins@hpe.com> From: Linus Walleij Date: Thu, 1 Jun 2023 13:39:37 +0200 Message-ID: Subject: Re: [PATCH v2 2/5] gpio: gxp: Add HPE GXP GPIO To: nick.hawkins@hpe.com Cc: verdun@hpe.com, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jdelvare@suse.com, linux@roeck-us.net, andy.shevchenko@gmail.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nick, thanks for your patch! On Wed, May 31, 2023 at 5:23=E2=80=AFPM 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 =3D "gpio-fan"; gpios =3D <&gpio1 6 GPIO_ACTIVE_HIGH>; gpio-fan,speed-map =3D <0 0>, <10000 1>; #cooling-cells =3D <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