From: "Hawkins, Nick" <nick.hawkins@hpe.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "Verdun, Jean-Marie" <verdun@hpe.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"brgl@bgdev.pl" <brgl@bgdev.pl>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"jdelvare@suse.com" <jdelvare@suse.com>,
"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: RE: [PATCH v2 4/5] hwmon: (gxp_fan_ctrl) Provide fan info via gpio
Date: Thu, 1 Jun 2023 15:47:52 +0000 [thread overview]
Message-ID: <DM4PR84MB19273A008BB11589CEEF697188499@DM4PR84MB1927.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <b1d8f851-4e87-333c-229c-b9dc37ea3c40@roeck-us.net>
> If the host wants to own the fan status from gpio pins, it has to live up to
> it and own it entirely. The kernel hwmon driver does not have access in that
> case.
> In a more "normal" world, the hwmon driver would "own" the gpio pin(s)
> and user space would listen to associated hwmon attribute events (presumably
> fan_enable and fan_fault), either by listening for sysfs attribute events
> or via udev or both. Again, if you don't want to do that, and want user space
> to have access to the raw gpio pins, you'll have to live with the consequences.
> I don't see the need to bypass existing mechanisms just because user space
> programmers want direct access to gpio pins.
Greetings Guenter,
Thank you for your valuable feedback with the solutions you have provided.
Before I proceed though I have a quick query about the fan driver.
If I were to let the user space "own" gpio pins, would it be permissible for
the userspace to feed a kernel driver data via sysfs?
Ex:
GPIO Driver -> (OpenBMC) -> Fandriver (sysfs).
Here the GPIO driver would provide fan presence information to OpenBMC
and then OpenBMC would provide fan presence info to the fan driver.
If it were permissible to provide data to the driver via this method I could
apply it to the PSU driver as well. the PSU driver which requires presence
info to verify a PSU is inserted / removed.
Thanks,
-Nick Hawkins
next prev parent reply other threads:[~2023-06-01 15:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 15:19 [PATCH v2 0/5] ARM: Add GPIO support nick.hawkins
2023-05-31 15:19 ` [PATCH v2 1/5] dt-bindings: gpio: Add HPE GXP GPIO nick.hawkins
2023-06-01 6:52 ` Krzysztof Kozlowski
2023-05-31 15:19 ` [PATCH v2 2/5] gpio: gxp: " nick.hawkins
2023-06-01 8:11 ` Bartosz Golaszewski
2023-06-01 11:39 ` Linus Walleij
2023-05-31 15:19 ` [PATCH v2 3/5] dt-bindings: hwmon: hpe,gxp-fanctrl: remove fn2 and pl regs nick.hawkins
2023-06-01 6:53 ` Krzysztof Kozlowski
2023-06-05 16:52 ` Hawkins, Nick
2023-06-06 6:22 ` Krzysztof Kozlowski
2023-05-31 15:19 ` [PATCH v2 4/5] hwmon: (gxp_fan_ctrl) Provide fan info via gpio nick.hawkins
2023-05-31 16:42 ` Guenter Roeck
[not found] ` <DM4PR84MB19274F575858CBCB2FA5C23E88489@DM4PR84MB1927.NAMPRD84.PROD.OUTLOOK.COM>
[not found] ` <b1d8f851-4e87-333c-229c-b9dc37ea3c40@roeck-us.net>
2023-06-01 15:47 ` Hawkins, Nick [this message]
2023-06-01 17:11 ` Linus Walleij
2023-06-01 17:45 ` Guenter Roeck
2023-06-02 15:02 ` Hawkins, Nick
2023-05-31 15:19 ` [PATCH v2 5/5] MAINTAINERS: hpe: Add GPIO nick.hawkins
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=DM4PR84MB19273A008BB11589CEEF697188499@DM4PR84MB1927.NAMPRD84.PROD.OUTLOOK.COM \
--to=nick.hawkins@hpe.com \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh+dt@kernel.org \
--cc=verdun@hpe.com \
/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
all inboxes | Powered by JetHome®