All of lore.kernel.org
 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: [PATCH v3 0/4] pmbus: extend configurability via sysfs
Date: Sun, 14 Apr 2019 21:58:02 +0000	[thread overview]
Message-ID: <cover.1555273192.git.krzysztof.adamski@nokia.com> (raw)

Hi,

This patch series extends pmbus core for two specific use cases we have:
- First three patches allows lm25066 driver to set number of samples for
  average values (by controlling manufacturer specific SAMPLES_FOR_AVG
  register). It is useful to be able to set this register when using any
  of the *_average registers, especially since the default value means
  we are averaging 1 sample which isn't that useful.
- Third patch exports m, b, R coefficients so that they can be adjusted
  by user space. We can't use default coefficients values and in order
  to achieve high accuracy, we calibrate them per unit so using
  device-tree or similar concepts (which are generally shared by all
  board of the same type) to store them is not an option too. Also,
  using device-tree (the only was to influence coeffs now) might not be
  possible on some architectures (like on x86, for example). Thus, we
  export it so that the logic of loading proper coeffs can be
  implemented in user space instead.

v3 changes:
- split ABI docs with the actual implementation
- better error handling in lm25066 implementation
- numeric permissions
- only add samples attributes for page 0

v2 changes:
- PMBUS_VIRT_* registers used instead of custom sysfs groups for
  configuring samples for average
- coeffs are only exported as sysfs attirbutes if the format used is
  "direct"
- fixed memory allocation issue in coeffs patch

Krzysztof Adamski (4):
  pmbus: introduce PMBUS_VIRT_*_SAMPLES registers
  hwmon: Document the samples attributes
  lm25066: support SAMPLES_FOR_AVG register
  pmbus_core: export coefficients via sysfs

 Documentation/hwmon/sysfs-interface |  18 +++
 drivers/hwmon/pmbus/lm25066.c       |  17 ++-
 drivers/hwmon/pmbus/pmbus.h         |  15 ++
 drivers/hwmon/pmbus/pmbus_core.c    | 214 +++++++++++++++++++++++++++-
 4 files changed, 261 insertions(+), 3 deletions(-)

-- 
2.20.1


             reply	other threads:[~2019-04-14 21:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-14 21:58 Adamski, Krzysztof (Nokia - PL/Wroclaw) [this message]
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)
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=cover.1555273192.git.krzysztof.adamski@nokia.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.