linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zev Weiss <zev@bewilderbeest.net>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
	openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] hwmon: (pmbus) Add Delta AHE-50DC fan control module driver
Date: Tue, 7 Dec 2021 16:41:02 -0800	[thread overview]
Message-ID: <Ya//HhC8a1DmQQAx@hatter.bewilderbeest.net> (raw)
In-Reply-To: <abc2e3bc-3806-dbd3-840c-e19154bc0587@roeck-us.net>

On Tue, Dec 07, 2021 at 03:15:18PM PST, Guenter Roeck wrote:
>On 12/7/21 1:53 PM, Zev Weiss wrote:
>>On Tue, Dec 07, 2021 at 11:44:01AM PST, Guenter Roeck wrote:
>>>On 12/7/21 11:22 AM, Zev Weiss wrote:
>>>>On Tue, Dec 07, 2021 at 09:50:15AM PST, Guenter Roeck wrote:
>>>>>On Mon, Dec 06, 2021 at 11:15:20PM -0800, Zev Weiss wrote:
>>>>>>This device is an integrated module of the Delta AHE-50DC Open19 power
>>>>>>shelf.  For lack of proper documentation, this driver has been developed
>>>>>>referencing an existing (GPL) driver that was included in a code release
>>>>>>from LinkedIn [1].  It provides four fan speeds, four temperatures, and
>>>>>>one voltage reading, as well as a handful of warning and fault
>>>>>>indicators.
>>>>>>
>>>>>>[1] https://github.com/linkedin/o19-bmc-firmware/blob/master/meta-openbmc/meta-linkedin/meta-deltapower/recipes-kernel/fancontrol-mod/files/fancontrol.c
>>>>>>
>>>>>
>>>>>Hmm, that reference isn't really accurate anymore. I think it would be
>>>>>better to just say that the device was found to be PMBus compliant.
>>>>
>>>>Sure, will do.
>>>>
>>>
>>>Makes me wonder: How do you know that the referenced driver is for Delta AHE-50DC ?
>>
>>We'd been waiting for the source code for the software it ships with for a while, and were finally provided with that repo; everything I've observed from the factory software is consistent with the code in that driver.  A sampling:
>>
>
>I assume you mean "Delta AHE-50DC" when you refer to "it".
>

Yes.

>[ ... ]
>>>Can you check this with real hardware, by any chance ?
>>>
>>
>>If you mean running that code on it, yes -- here's the userspace utility that invokes that library routine:
>>
>>     root@bmc-oob:~# fan-util.sh
>>     fan1 speed: 7860 RPM
>>     fan2 speed: 7860 RPM
>>     fan3 speed: 7620 RPM
>>     fan4 speed: 7560 RPM
>>     temperature1: 29.20 C
>>     temperature2: 27.80 C
>>     temperature3: 28.50 C
>>     temperature4: 30.20 C
>>     vin_undervolt_fault: no
>>     overtemperature_warning: no
>>     fan_fault: no
>>     fan_warning: no
>>     fan_status: ok
>>
>
>That doesn't really tell me anything in the context of the driver you submitted.
>Would it be possible to install your driver and provide the output from the
>"sensors" command ? It should match the information from the proprietary
>driver/tool.
>

Thanks, in doing so I realized I'd neglected to prevent reads from 
unsupported registers in the read_word_data function, which was leading 
to the driver producing sysfs files for meaningless sensor limits that 
the device doesn't actually support.  With that fix (which I'll include 
in v4):

     root@ahe-50dc:~# /tmp/sensors 'ahe50dc_fan-*'
     ahe50dc_fan-i2c-28-30
     Adapter: i2c-8-mux (chan_id 0)
     vin:          12.29 V  
     fan1:        7680 RPM
     fan2:        7860 RPM
     fan3:        7680 RPM
     fan4:        7380 RPM
     temp1:        +27.8 C  
     temp2:        +23.4 C  
     temp3:        +25.3 C  
     temp4:        +24.5 C  



Zev


  reply	other threads:[~2021-12-08  0:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  7:15 [PATCH v3 0/2] hwmon: (pmbus) Add Delta AHE-50DC fan control module driver Zev Weiss
2021-12-07  7:15 ` [PATCH v3 1/2] " Zev Weiss
2021-12-07 17:50   ` Guenter Roeck
2021-12-07 19:22     ` Zev Weiss
2021-12-07 19:44       ` Guenter Roeck
2021-12-07 21:53         ` Zev Weiss
2021-12-07 22:39           ` Zev Weiss
2021-12-07 23:15           ` Guenter Roeck
2021-12-08  0:41             ` Zev Weiss [this message]
2021-12-08  0:54               ` Guenter Roeck
2021-12-07 19:53       ` Guenter Roeck
2021-12-07  7:15 ` [PATCH v3 2/2] dt-bindings: add Delta AHE-50DC fan control module Zev Weiss
2021-12-07  7:58   ` Krzysztof Kozlowski
2021-12-07  8:48     ` Zev Weiss

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=Ya//HhC8a1DmQQAx@hatter.bewilderbeest.net \
    --to=zev@bewilderbeest.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=openbmc@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).