From: guenter.roeck@ericsson.com (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [lm-sensors] [PATCH 4/5] hwmon: DNS323 rev C1 fan support
Date: Wed, 13 Oct 2010 09:34:10 -0700 [thread overview]
Message-ID: <1286987650.9690.175.camel@groeck-laptop> (raw)
In-Reply-To: <20101013115951.GA5649@kw.sim.vm.gnt>
On Wed, 2010-10-13 at 07:59 -0400, Simon Guinot wrote:
> Hi Benjamin,
>
> What is the status for the DNS323 fan support ?
> Have this patch been merged yet ?
>
The most recent version I found on the web (dated June 13) has problems
with error detection and reporting, and fails to remove sysfs files in
some error conditions. So I would be surprised if it was merged, unless
there is a more recent version which I missed.
On a side note, there are several versions of the patch on the web, none
indicating what has changed between versions. Would be great to have
such data attached to the various patch versions.
> I am currently looking to add hwmon support for the GPIO fan found
> on Network Space Max v2 boards. Obviously, some attributes are shared
> with the DNS323 fan. Maybe there is some room for a generic GPIO fan
> driver ?
>
> Platform data could provide the board specific GPIO pinout and a speed
> conversion array (rpm from/to GPIO value). Here is a proposal for this
> platform data interface:
>
> struct gpio_fan {
> const char *name;
> unsigned gpio;
> unsigned active_low;
> };
>
> struct gpio_fan_speed {
> int value;
> int rpm;
> };
>
> struct gpio_fan_platform_data {
> struct gpio_fan *alarm; /* fan alarm GPIO. */
> struct gpio_fan *ctrl; /* fan control GPIOs. */
> int num_ctrl;
> /*
> * Speed conversion array: rpm from/to GPIO bit field.
> * This array _must_ be sorted in ascending rpm order.
> */
> struct gpio_fan_speed *speed;
> int num_speed;
> };
>
> Based on this informations the GPIO fan driver could perform the
> speed conversions (pwm, rpm, GPIO value) and then provide a hwmon
> interface.
>
Sounds like a good idea to me.
Couple of comments.
Personally, I prefer to see num_XXX variables before the actual objects,
but maybe that is just a personal preference.
I am not sure what one would do with "active_low". Would that be used
for the alarm ?
Adding a "fault" object might make sense.
It seems that bit write order is missing. Since it is not always the
same, as the proposed dns323 driver indicates, that might be a tricky
problem to solve. You would have to come up with an at least somewhat
generic solution for that.
Guenter
next prev parent reply other threads:[~2010-10-13 16:34 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-22 10:54 [PATCH 4/5] hwmon: DNS323 rev C1 fan support Benjamin Herrenschmidt
2010-05-22 11:00 ` Benjamin Herrenschmidt
2010-10-13 11:59 ` Simon Guinot
2010-10-13 16:34 ` Guenter Roeck [this message]
2010-10-17 15:40 ` [lm-sensors] " Simon Guinot
2010-10-17 15:50 ` [PATCH 1/2] hwmon: add generic GPIO fan driver Simon Guinot
2010-10-17 15:50 ` [PATCH 2/2] [ARM] Kirkwood: add fan support for Network Space Max v2 Simon Guinot
2010-10-22 1:53 ` Guenter Roeck
2010-10-22 2:08 ` Nicolas Pitre
2010-10-22 4:30 ` Guenter Roeck
2010-10-22 9:29 ` [PATCH] " Simon Guinot
2010-10-22 9:59 ` Guenter Roeck
2010-10-22 8:27 ` [PATCH 2/2] " Simon Guinot
2010-10-22 9:58 ` Guenter Roeck
2010-10-22 18:39 ` Guenter Roeck
2010-10-22 18:50 ` Nicolas Pitre
2010-10-18 16:08 ` [PATCH 1/2] hwmon: add generic GPIO fan driver Guenter Roeck
2010-10-18 18:00 ` Chris Moore
2010-10-18 18:35 ` Guenter Roeck
2010-10-18 20:36 ` Simon Guinot
2010-10-18 20:50 ` Guenter Roeck
2010-10-19 11:46 ` Simon Guinot
2010-10-19 14:52 ` Guenter Roeck
2010-10-19 6:52 ` Guenter Roeck
2010-10-19 8:36 ` Simon Guinot
2010-10-19 15:15 ` Guenter Roeck
2010-10-19 19:30 ` Simon Guinot
2010-10-21 20:07 ` Simon Guinot
2010-10-21 20:26 ` Guenter Roeck
2010-10-19 22:03 ` Guenter Roeck
2010-10-20 0:19 ` Simon Guinot
2010-10-20 0:50 ` Guenter Roeck
2010-10-20 7:59 ` Simon Guinot
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=1286987650.9690.175.camel@groeck-laptop \
--to=guenter.roeck@ericsson.com \
--cc=linux-arm-kernel@lists.infradead.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