mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Zev Weiss <zev@bewilderbeest.net>, linux-hwmon@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.com>,
	openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] hwmon: add Delta AHE-50DC fan control module driver
Date: Mon, 6 Dec 2021 15:02:49 -0800	[thread overview]
Message-ID: <28719505-ace1-bb04-bbc2-043c56b0db7d@roeck-us.net> (raw)
In-Reply-To: <20211206224419.15736-2-zev@bewilderbeest.net>

On 12/6/21 2:44 PM, 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
> 
> Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
> ---

[ ... ]

> +
> +static const u8 AHE50DC_FAN_TEMP_REGS[] = { 0x8d, 0x8e, 0x8f, 0xd0 };
> +static const u8 AHE50DC_FAN_SPEED_REGS[] = { 0x90, 0x91, 0x92, 0x93 };
> +static const u8 AHE50DC_FAN_FAN_STATUS_REGS[] = { 0x81, 0x82 };
> +#define AHE50DC_FAN_VIN_REG 0x88
> +#define AHE50DC_FAN_CHIP_STATUS_REG 0x79

PMBus registers:

	PMBUS_STATUS_WORD               = 0x79,

	PMBUS_STATUS_FAN_12             = 0x81,
	PMBUS_STATUS_FAN_34             = 0x82,

	PMBUS_READ_VIN                  = 0x88,

         PMBUS_READ_TEMPERATURE_1        = 0x8D,
         PMBUS_READ_TEMPERATURE_2        = 0x8E,
         PMBUS_READ_TEMPERATURE_3        = 0x8F,
         PMBUS_READ_FAN_SPEED_1          = 0x90,
         PMBUS_READ_FAN_SPEED_2          = 0x91,
         PMBUS_READ_FAN_SPEED_3          = 0x92,
         PMBUS_READ_FAN_SPEED_4          = 0x93,

This is quite obviously a PMBus device. Why not use the PMBus driver ?

Guenter

  reply	other threads:[~2021-12-06 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 22:44 [PATCH 0/2] hwmon: Add driver for Delta AHE-50DC fan control module Zev Weiss
2021-12-06 22:44 ` [PATCH 1/2] hwmon: add Delta AHE-50DC fan control module driver Zev Weiss
2021-12-06 23:02   ` Guenter Roeck [this message]
2021-12-06 23:05     ` Zev Weiss
2021-12-06 22:44 ` [PATCH 2/2] dt-bindings: add Delta AHE-50DC fan control module 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=28719505-ace1-bb04-bbc2-043c56b0db7d@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=zev@bewilderbeest.net \
    /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

all inboxes | Powered by JetHome®