All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Additional PWM driver support for w83792d
Date: Sun, 10 May 2015 16:01:25 +0000	[thread overview]
Message-ID: <554F80D5.60005@roeck-us.net> (raw)
In-Reply-To: <003901d08a57$bc46f8a0$34d4e9e0$@hiddenengine.co.uk>

On 05/10/2015 06:42 AM, vt8231@hiddenengine.co.uk wrote:
[ ... ]
>>>
>>> Last note: registers 0xA3-0xA6 have extra configuration bits "Sync
>>> T1/2/3". Maybe the driver should handle them but I am not sure how. It
>>> could be that the extra outputs should only be exposed to user-space if
>>> these bits are 0 (stand alone.) Guenter, any idea/opinion on this?
>>>
>>
>> Hi Jean,
>>
>> Good point.
>>
>> How about using pwm[4567]_enable ? If I understand correctly, the possible
>> modes would be manual or sync(x). In this case we could have 1 (manual),
>> 2 (sync with fan1), 3 (sync with fan2), and 4 (sync with fan3), with the
>> caveat that the sync settings only make sense if the matching pwmX_enable
>> is set to thermal cruise mode.
>>
>> Does this make sense ?
>
> I don't think you have that level of control over PWM 4-7.  From what I can see
> in the datasheet (section 8.21 of the W83792G manual), you only have Thermal and
> Smart FAN modes for PWM 1 - 3.  This is why the existing driver does a limit
> check when setting the mode so that it only allows PWM[1-3] to be controlled.
>
> If I am reading the datasheet correctly, you have a simple enable/disable for PWM7
> (aka FAN7 Enable) and PWM6 (aka FAN6) in register 0x4B (Bank 0) "Pin Control
> Register", see section 8.13.  Likewise, you have a simple enable/disable for
> PWM5 (aka FAN_OUT5) and PWM4 (aka FAN_OUT4) via bits 6 and 5 of register 0x1A
> (CR1A_GPIO Enable).  FAN_OUT4 shares with GPIOA0 and FAN_OUT5 shares with GPIOA2.
>
> I would be nervous of changing these in Linux, however.  These relate to the HW
> configuration of the board so I would expect the BIOS to set these up correctly
> to ensure that the HW monitoring was correct from power-on.  My preference would
> be to *read* these values and only offer the /hwmonX/device/pwm[4-7] virtual
> files if the registers had *already* been set to enable this mode.  I don't like
> the idea that you could accidentally turn a GPIO input into a PWM output if you
> misconfigured the pwm[4-7]_enable signals (which you could do when probing, for
> example).
>
> My preference is *not* to provide pwm[4-7]_enable controls but just check the
> existing chip config and make pwm[4-7] and pwm[4-7]_mode available if (and only
> if) the chip has already been configured to enable them.
>

Roger,

Jean specifically suggested adding support for 'registers 0xA3-0xA6 have extra
configuration bits "Sync T1/2/3"'. I suggested to support those through pwmX_enable,
nothing else. You are right, you don't want to change the configuration bits
you referred to. But that is not what I suggested.

Thanks,
Guenter


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

  parent reply	other threads:[~2015-05-10 16:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-09 12:57 [lm-sensors] Additional PWM driver support for w83792d vt8231
2015-05-09 15:30 ` Jean Delvare
2015-05-09 15:55 ` Guenter Roeck
2015-05-09 16:10 ` Guenter Roeck
2015-05-10 16:01 ` Guenter Roeck [this message]
2015-05-10 21:44 ` Guenter Roeck
2015-05-11 10:45 ` Jean Delvare
2015-05-11 10:50 ` Jean Delvare
2015-05-11 13:12 ` Guenter Roeck
2015-05-11 20:15 ` vt8231
2015-05-12 14:19 ` Jean Delvare
2015-05-12 16:21 ` Guenter Roeck
2015-05-14 12:36 ` [lm-sensors] Additional PWM driver support for w83792d - PATCH [1/1] 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=554F80D5.60005@roeck-us.net \
    --to=linux@roeck-us.net \
    --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.