[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0bbd842-2262-8979-d8f8-ec611310c44f@roeck-us.net>
Date: Fri, 28 Apr 2023 06:32:39 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: "Hawkins, Nick" <nick.hawkins@....com>,
"Verdun, Jean-Marie" <verdun@....com>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"brgl@...ev.pl" <brgl@...ev.pl>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>,
"jdelvare@...e.com" <jdelvare@...e.com>,
"linux@...linux.org.uk" <linux@...linux.org.uk>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v1 1/9] gpio: gxp: Add HPE GXP GPIO
On 4/27/23 07:53, Hawkins, Nick wrote:
>
>
>
>> This is not information which should be reported through a gpio driver.
>> Besides, the functions don't exist at this point in the series,
>> and there should be no extern declarations in source files.
>
>> If you want to model fan or psu information through gpio, drop
>> the hwmon drivers and implement reading the status here, then use
>> the existing gpio-fan hwmon driver to report it in the hwmon subsystem.
>
> Thank you for the feedback Guenter,
>
> I see how it is possible to use gpio-fan for the fan. As for the gxp-psu
> Hwmon driver can I model the gpio-fan driver to get the necessary
> gpio information for power supplies?
>
Sorry, I don't understand. Looking into the code again, the major problem
I see is that you want to model fan install status and fan fault
status as gpio pins. The same is true for psu information (installed,
ac, dc flags).
If you want to do this, fine, but then get the status from the gpio
driver and don't export anything to the gpio driver. The kernel supports
means to do that (look at gpiod_get and similar functions). It makes the
code more complex, but I assume you know what you are doing.
Guenter
Powered by blists - more mailing lists