devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeny Boger <boger@wirenboard.com>
To: linux-iio@vger.kernel.org
Cc: Evgeny Boger <boger@wirenboard.com>,
	devicetree@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Quentin Schulz <foss@0leil.net>,
	linux-sunxi@lists.linux.dev
Subject: [PATCH 0/2] iio: adc: axp20x: add support for NTC thermistor
Date: Thu, 18 Nov 2021 17:12:31 +0300	[thread overview]
Message-ID: <20211118141233.247907-1-boger@wirenboard.com> (raw)

Most AXPxxx-based reference designs place a 10k NTC thermistor on a
TS pin. When appropriately configured, AXP PMICs will inject fixed
current (80uA by default) into TS pin and measure the voltage across a
thermistor. The PMIC itself will by default compare this voltage with
predefined thresholds  and disable battery charging whenever
the battery is too hot or too cold.

Alternatively, the TS pin can be configured as general-purpose
ADC input. This mode is not supported by the driver.
    
This patch series allows reading the voltage on the TS pin. The voltage
can be then either processed by userspace or used by kernel consumer like
hwmon ntc thermistor driver.


Evgeny Boger (2):
  iio:adc:axp20x: add support for NTC thermistor
  dt-bindings: iio: adc: document TS voltage in AXP PMICs

 .../bindings/iio/adc/x-powers,axp209-adc.yaml |  3 ++
 drivers/iio/adc/axp20x_adc.c                  | 45 ++++++++++++++++---
 2 files changed, 42 insertions(+), 6 deletions(-)

-- 
2.25.1


             reply	other threads:[~2021-11-18 14:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 14:12 Evgeny Boger [this message]
2021-11-18 14:12 ` [PATCH 1/2] iio:adc:axp20x: add support for NTC thermistor Evgeny Boger
2021-11-22 10:48   ` Maxime Ripard
2021-12-01 10:11   ` Quentin Schulz
2021-12-01 10:42   ` Quentin Schulz
2021-11-18 14:12 ` [PATCH 2/2] dt-bindings: iio: adc: document TS voltage in AXP PMICs Evgeny Boger
2021-11-22 10:49   ` Maxime Ripard
2021-11-22 11:17     ` Evgeny Boger
2021-11-22 11:35       ` Samuel Holland
2021-11-22 11:51         ` Evgeny Boger
2021-11-29 23:58         ` Evgeny Boger
2021-12-01 10:03           ` Quentin Schulz
2021-12-01 11:02           ` Quentin Schulz
2021-12-01 15:45             ` Evgeny Boger
2021-12-03 20:47               ` Sebastian Reichel
2021-12-04 15:26                 ` Jonathan Cameron
2021-12-05  1:02                   ` Linus Walleij
2021-12-05 10:50                     ` Evgeny Boger
2021-12-05 19:46                       ` Linus Walleij
2021-11-29 23:10   ` Rob Herring
2021-12-04 15:28     ` Jonathan Cameron

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=20211118141233.247907-1-boger@wirenboard.com \
    --to=boger@wirenboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=foss@0leil.net \
    --cc=jernej.skrabec@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=maxime@cerno.tech \
    --cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).