From: Guenter Roeck <linux@roeck-us.net>
To: Marius Zachmann <mail@mariuszachmann.de>
Cc: jdelvare@suse.com, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [RFC] drivers/hwmon: Corsair Commander Pro driver
Date: Wed, 10 Jun 2020 06:13:21 -0700 [thread overview]
Message-ID: <f2bd5bd9-d664-61af-86c9-8d3926c53b55@roeck-us.net> (raw)
In-Reply-To: <5812362.fiZtzxMu5m@marius>
On 6/10/20 5:03 AM, Marius Zachmann wrote:
[ ... ]
>>> +Kernel driver corsair-cpro
>>> +==========================
>>> +
>>> +Supported devices:
>>> +
>>> + * Corsair Commander Pro
>>> + * Corsair Commander Pro (1000D)
>>> +
>>> +Author: Marius Zachmann
>>> +
>>> +Description
>>> +-----------
>>> +
>>> +This driver implements the sysfs interface for the Corsair Commander Pro.
>>> +The Corsair Commander Pro is a USB device with 6 fan connectors,
>>> +4 temperature sensor connectors and 2 Corsair LED connectors.
>>> +It can read the voltage levels on the SATA power connector.
>>> +
>>> +Usage Notes
>>> +-----------
>>> +
>>> +Since it is a USB device, hotswapping is possible. The device is autodetected.
>>> +
>>> +Sysfs entries
>>> +-------------
>>> +
>>> +in0_input Voltage on SATA 12v
>>> +in1_input Voltage on SATA 5v
>>> +in2_input Voltage on SATA 3.3v
>>> +
>>> +temp[0-3]_input Connected temperature sensors
>>> +
>> Index starts with 1 for everything except inX.
>>
>>> +fan[0-5]_input Connected fan rpm.
>>> +fan[0-5]_label Shows connection status of the fan as detected by the
>>> + device.
>>> + "fanX nc" no connection
>>> + "fanX 3pin" 3-pin fan detected
>>> + "fanX 4pin" 4-pin fan detected
>>> +fan[0-5]_enable the driver only reports fan speeds when 1
>>> +pwm[0-5] Sets the fan speed. Values from 0-255.
>>> + When reading, it reports the last value, which
>>> + was set by the driver.
Change to:
When reading, it reports the last value if it was set by the driver.
Otherwise returns 0.
[ ... ]
>>> + case hwmon_pwm:
>>> + switch (attr) {
>>> + case hwmon_pwm_input:
>>> + *val = ccp->pwm[channel];
>>
>> This returns 0 if pwm wasn't set. Is this indeed not readable from the
>> device ?
>
> I could not find any possibility, because the official Corsair software does not use it.
> I am not sure, whether it would be better to return an error, if it was not set.
>
Bummer. Then change the documentation as suggested above, and add
a comment here explaining that it is unknown how to read pwm values
from the device.
Thanks,
Guenter
next prev parent reply other threads:[~2020-06-10 13:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 4:01 [RFC] drivers/hwmon: Corsair Commander Pro driver Guenter Roeck
2020-06-10 12:03 ` Marius Zachmann
2020-06-10 13:13 ` Guenter Roeck [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-09 22:26 Marius Zachmann
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=f2bd5bd9-d664-61af-86c9-8d3926c53b55@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@mariuszachmann.de \
/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;
as well as URLs for NNTP newsgroup(s).