From: "Andrew Paprocki" <andrew@ishiboo.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 2/4] hwmon: it87 only create pwm1-3 sysfs
Date: Mon, 07 Jul 2008 13:56:02 +0000 [thread overview]
Message-ID: <76366b180807070656r2ecace2fh2c40fe6fb609d046@mail.gmail.com> (raw)
In-Reply-To: <1215427211-6001-2-git-send-email-andrew@ishiboo.com>
On Mon, Jul 7, 2008 at 8:19 AM, Jean Delvare <khali@linux-fr.org> wrote:
> On Mon, 7 Jul 2008 07:36:43 -0400, Andrew Paprocki wrote:
>> Ah ok, for the pwm1_freq. I suppose this can be left out entirely, or
>> should pwm1* always exist?
>
> pwm1* should exist as long as you have no reason to believe that the
> pwm1 pin is used for another function. I can't remember if the IT87xxF
> chips share pwm pins have alternate functions (but some other chips do,
> and our driver don't necessarily pay attention to that as they should.)
> And the same holds for all pwm files.
At least for the 8712, FAN_CTL1 has a dedicated pin, but all the other
FAN_CTL* pins are shared with other functions (such as joystick port,
or GPIO usage). Are the pwm* files actually used by anyone in
userspace for something other than controlling the fans?
> It just seemed wrong to make pwm4/5 show up
>> when needed but not the others.
>
> Not sure what you mean with pwm4/5 but please keep in mind that it is
> perfectly possible to have pwm4 without fan4 or fan4 without pwm4, and
> same for pwm5 and fan5. Inputs and outputs don't have to be related in
> the way the numbers suggest. Quite often the chip internals assume that
> they do, but motherboard makers can be very dump in the way they wire
> the fans.
So in this particular case, FAN_CTL4 shares a pin with JSBB2 (Joystick
button 2) and GPIO27. Similarly, FAN_CTL5 shares a pin with JSBB1 and
GPIO26. Should pwm4* and pwm5* files always exist for the IT871[268]
just because the pins exist, even if the chip configuration reports
there is no fan4/fan5 connected?
In a related question, I saw this comment in the driver:
/* automatic pwm - not yet implemented, but
* leave the settings made by the BIOS alone
* until a change is requested via the sysfs
* interface */
What needs to be implemented for automatic mode? As far as I can tell
in the datasheet, automatic mode changes the meaning of bits0-6 in the
CTL register to be a selection of temp1/temp2/temp3 instead of a
128-step PWM control value. I could take a stab at implementing
something for this if you know what you want it to look like. I assume
the sysfs pwm inputs would change meaning in automatic mode to only be
a 2 bit value indicating which temp to select? Is there anything more
complicated needed?
-Andrew
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2008-07-07 13:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 10:40 [lm-sensors] [PATCH 2/4] hwmon: it87 only create pwm1-3 sysfs files Andrew Paprocki
2008-07-07 11:25 ` [lm-sensors] [PATCH 2/4] hwmon: it87 only create pwm1-3 sysfs Jean Delvare
2008-07-07 11:36 ` Andrew Paprocki
2008-07-07 12:19 ` Jean Delvare
2008-07-07 13:56 ` Andrew Paprocki [this message]
2008-07-11 13:38 ` 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=76366b180807070656r2ecace2fh2c40fe6fb609d046@mail.gmail.com \
--to=andrew@ishiboo.com \
--cc=lm-sensors@vger.kernel.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.