All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: lm-sensors@lm-sensors.org
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [lm-sensors] Simple fan question
Date: Thu, 29 Apr 2010 05:21:46 +0000	[thread overview]
Message-ID: <1272518506.24542.163.camel@pasglop> (raw)

Hi folks !

I'm writing some support for d-link dns323 rev C1 NAS. It has a fan that
is controlled by some non-programmable PWM circuit. Basically, all I can
do is tweak to GPIOs that controls the feed into the circuitry for the
fans to be off, slow or fast.

I don't know what the actual PWM values are for "slow" or "fast". I
-might- be able to do some measurements but I can't promise it.

Now I'm trying to do a simple hwmon driver for that in order to easy
userspace support for these guys, and I don't really see a 'nice' way to
expose that which would fit the interfaces documented
Documentation/hwmon/sysfs-interface.

So before I do something horrible, I felt I might poke you guys see if
you have a good idea here :-)

Before I read the above document I was thinking about a sysfs file that
contains "off", "slow" or "fast" but it looks like this won't fit at all
the typical hwmon APIs.

Another comment while at it is when implementing the thermal control for
PowerMacs a while back (windfarm etc...) I had to deal with two
different type of interfaces to fans. RPM controlled and PWM controlled.

The later basically let me program a percentile value (a percent of the
duty cycle).

I looks like the described sysfs interface only does RPM, or at least
doesn't provide a way to expose the units used...

Cheers,
Ben.



_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: lm-sensors@lm-sensors.org
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Simple fan question
Date: Thu, 29 Apr 2010 15:21:46 +1000	[thread overview]
Message-ID: <1272518506.24542.163.camel@pasglop> (raw)

Hi folks !

I'm writing some support for d-link dns323 rev C1 NAS. It has a fan that
is controlled by some non-programmable PWM circuit. Basically, all I can
do is tweak to GPIOs that controls the feed into the circuitry for the
fans to be off, slow or fast.

I don't know what the actual PWM values are for "slow" or "fast". I
-might- be able to do some measurements but I can't promise it.

Now I'm trying to do a simple hwmon driver for that in order to easy
userspace support for these guys, and I don't really see a 'nice' way to
expose that which would fit the interfaces documented
Documentation/hwmon/sysfs-interface.

So before I do something horrible, I felt I might poke you guys see if
you have a good idea here :-)

Before I read the above document I was thinking about a sysfs file that
contains "off", "slow" or "fast" but it looks like this won't fit at all
the typical hwmon APIs.

Another comment while at it is when implementing the thermal control for
PowerMacs a while back (windfarm etc...) I had to deal with two
different type of interfaces to fans. RPM controlled and PWM controlled.

The later basically let me program a percentile value (a percent of the
duty cycle).

I looks like the described sysfs interface only does RPM, or at least
doesn't provide a way to expose the units used...

Cheers,
Ben.



             reply	other threads:[~2010-04-29  5:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-29  5:21 Benjamin Herrenschmidt [this message]
2010-04-29  5:21 ` Simple fan question Benjamin Herrenschmidt
2010-04-29  5:34 ` [lm-sensors] " Dmitry Gromov
2010-04-29  8:57 ` Jean Delvare
2010-04-29  8:57   ` Jean Delvare
2010-04-29 22:56   ` Benjamin Herrenschmidt
2010-04-29 22:56     ` Benjamin Herrenschmidt
2010-05-06 16:40     ` Jean Delvare
2010-05-06 16:40       ` Jean Delvare
2010-05-17  7:46     ` Pavel Machek
2010-05-17  7:46       ` Pavel Machek
2010-05-17  8:14       ` Jean Delvare
2010-05-17  8:14         ` Jean Delvare
2010-05-17  8:30         ` Benjamin Herrenschmidt
2010-05-17  8:30           ` Benjamin Herrenschmidt
2010-05-17 15:59 ` Ray Lee
2010-05-20 11:57   ` Jean Delvare
2010-05-20 11:57     ` Jean Delvare

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=1272518506.24542.163.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.