All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Sampaio <sampaio.ime@gmail.com>
To: zbr@ioremap.net
Cc: rikard.falkeborn@gmail.com, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] w1: ds2438: adding support for calibration of current measurements
Date: Mon, 22 Mar 2021 23:40:37 -0300	[thread overview]
Message-ID: <20210323024037.qe6ooze4ncusnh7u@LuizSampaio-PC.localdomain> (raw)

The following patches aim to make a user able to calibrate the current measurement of the ds2438. This chip uses a offset register in page1, which is added to the current register to give the user the current measurement. If this value is wrong, the user will get an offset current value, even if the current is zero, for instance. This patch gives support to read the page1 registers (including the offset register) and to write to the offset register. The ds2438 datasheet shows a calibration routine, and with this patch, the user can to this quickly by write the correct value to the offset register.
This patch was tested on real hardware using a power supply and an electronic load.
Please help to review this series of patches.

Best regards!
Sampaio

Luiz Sampaio (3):
  w1: ds2438: fixed a coding style issues
  w1: ds2438: fixed bug in get_page function
  w1: ds2438: adding support for accessing page1 registers

 drivers/w1/slaves/w1_ds2438.c | 120 +++++++++++++++++++++++++++++-----
 1 file changed, 104 insertions(+), 16 deletions(-)

-- 
2.30.1


             reply	other threads:[~2021-03-23  2:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23  2:40 Luiz Sampaio [this message]
2021-03-23  9:41 ` [PATCH 0/3] w1: ds2438: adding support for calibration of current measurements Greg KH

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=20210323024037.qe6ooze4ncusnh7u@LuizSampaio-PC.localdomain \
    --to=sampaio.ime@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rikard.falkeborn@gmail.com \
    --cc=zbr@ioremap.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.