Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: "Adamski, Krzysztof (Nokia - PL/Wroclaw)"  <krzysztof.adamski@nokia.com>
To: Guenter Roeck <linux@roeck-us.net>, Jean Delvare <jdelvare@suse.com>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"Sverdlin,
	Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@nokia.com>
Subject: Re: [PATCH v3 4/4] pmbus_core: export coefficients via sysfs
Date: Sun, 14 Apr 2019 22:37:33 +0000	[thread overview]
Message-ID: <20190414223728.GB18461@localhost.localdomain> (raw)
In-Reply-To: <4887ef85022d7ceb26905997c19a874d7d89087f.1555273192.git.krzysztof.adamski@nokia.com>

On Sun, Apr 14, 2019 at 11:59:38PM +0200, Krzysztof Adamski wrote:
>PMBUS devices report values in real-world units. Those using direct
>format require conversion using standarised coefficients and formula.
>This operation is already done by pmbus_core and the default values for
>coefficients are configured by chip drivers.
>
>However those default values are not allways suitable as they depend on
>the value of sense register and environment used. For that reason, in
>order to get values that make sense or just to get best accuracy, in it
>may be required to tweak coefficient values. The proper values may be
>measured during device production (to get best accuracy, they might be
>callibrated for each individual unit) and stored as calibration values
>in some place (like EEPROM or even a file).
>
>To support wide range of possible use cases, lets export those to user
>space via sysfs attributes so that it can implement its own policies
>about them. All those attributes are put into separate attribute_group
>struct so that we can set its name to group all of them in a
>"coefficients" subdirectory in sysfs.
>
>Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
>---
>drivers/hwmon/pmbus/pmbus_core.c | 104 ++++++++++++++++++++++++++++++-
>1 file changed, 102 insertions(+), 2 deletions(-)
>

[...]

>+	pmbus_dev_attr_init(&ext_attr->attr, name, (S_IWUSR | S_IRUGO),

I screwed up and did not fix this also, sorry for that. I'm not sending
an updated version (yet) as I didn't get your approval for the concept
itself (though I still hope you will reconsider taking into account my
latest arguments).

[...]
>

Krzysztof

  reply	other threads:[~2019-04-14 22:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-14 21:58 [PATCH v3 0/4] pmbus: extend configurability via sysfs Adamski, Krzysztof (Nokia - PL/Wroclaw)
2019-04-14 21:58 ` [PATCH v3 1/4] pmbus: introduce PMBUS_VIRT_*_SAMPLES registers Adamski, Krzysztof (Nokia - PL/Wroclaw)
2019-04-15 20:13   ` Guenter Roeck
2019-04-14 21:58 ` [PATCH v3 2/4] hwmon: Document the samples attributes Adamski, Krzysztof (Nokia - PL/Wroclaw)
2019-04-15 20:14   ` Guenter Roeck
2019-04-14 21:59 ` [PATCH v3 3/4] lm25066: support SAMPLES_FOR_AVG register Adamski, Krzysztof (Nokia - PL/Wroclaw)
2019-04-15 20:16   ` Guenter Roeck
2019-04-14 21:59 ` [PATCH v3 4/4] pmbus_core: export coefficients via sysfs Adamski, Krzysztof (Nokia - PL/Wroclaw)
2019-04-14 22:37   ` Adamski, Krzysztof (Nokia - PL/Wroclaw) [this message]
2019-04-15  2:38     ` Guenter Roeck
2019-04-15  8:34       ` Adamski, Krzysztof (Nokia - PL/Wroclaw)
2019-04-15 16:33         ` Guenter Roeck
2019-04-15 20:26           ` Adamski, Krzysztof (Nokia - PL/Wroclaw)

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=20190414223728.GB18461@localhost.localdomain \
    --to=krzysztof.adamski@nokia.com \
    --cc=alexander.sverdlin@nokia.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.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