public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "SanBuenaventura, Jose" <Jose.SanBuenaventura@analog.com>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	Jean Delvare <jdelvare@suse.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Subject: Re: [PATCH 2/2] hwmon: pmbus: adm1275: add adm1281 support
Date: Thu, 18 Apr 2024 04:55:00 -0700	[thread overview]
Message-ID: <1221f2fd-758e-4c10-8551-ed571fb1577f@roeck-us.net> (raw)
In-Reply-To: <PH0PR03MB66070CAE5E8D99158003D58FEC0E2@PH0PR03MB6607.namprd03.prod.outlook.com>

On Thu, Apr 18, 2024 at 08:31:42AM +0000, SanBuenaventura, Jose wrote:
> 
> The lines mentioned were added initially because the STATUS_CML read capability
> seems to be only available in the adm1281 and so reading the said register with
> another device shouldn't be permitted.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Why ? Sure, doing so causes the CML bit to be set, but the PMBus core uses
that method throughout to determine if a command/register is supported.
There are exceptions - some chips react badly if an attempt is made to read
unsupported registers. That is not the case for chips in this series, at
least not for the ones where I have evaluation boards. In such cases,
the chip driver should do nothing and let the PMBus core do its job.

> It seems though that the functionality is redundant and is already handled by 
> the PMBus core and maybe these lines can be removed and CML related errors
> can be checked using the status0 and status0_cml debugfs entries.

This has nothing to do with status0 and status0_cml debugfs entries. The
PMBUs core reads STATUS_CML if the CML status bit is set in the status
byte/word to determine if a command is supported or not. This is as
intended. There is nothing special to be done by a chip driver.

Thanks,
Guenter

  reply	other threads:[~2024-04-18 11:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17  0:07 [PATCH 0/2] Add adm1281 support Jose Ramon San Buenaventura
2024-04-17  0:07 ` [PATCH 1/2] dt-bindings: hwmon: adm1275: add adm1281 Jose Ramon San Buenaventura
2024-04-17 15:15   ` Conor Dooley
2024-04-17  0:07 ` [PATCH 2/2] hwmon: pmbus: adm1275: add adm1281 support Jose Ramon San Buenaventura
2024-04-17  0:32   ` Guenter Roeck
2024-04-17 15:24     ` Guenter Roeck
2024-04-18  8:31       ` SanBuenaventura, Jose
2024-04-18 11:55         ` Guenter Roeck [this message]
2024-04-19  2:46           ` SanBuenaventura, Jose
2024-04-19 12:33             ` Guenter Roeck

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=1221f2fd-758e-4c10-8551-ed571fb1577f@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Delphine_CC_Chiu@wiwynn.com \
    --cc=Jose.SanBuenaventura@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox