From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Fredrik M Olsson <fredrik.m.olsson@axis.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>,
linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@axis.com
Subject: Re: [PATCH v2 3/3] rtc: ds1307: Add driver for Epson RX8901CE
Date: Wed, 24 Jun 2026 23:38:47 +0200 [thread overview]
Message-ID: <20260624213847b0e6c315@mail.local> (raw)
In-Reply-To: <20260520-ds1307-rx8901-add-v2-3-e069ea32e1db@axis.com>
On 20/05/2026 16:48:55+0200, Fredrik M Olsson wrote:
> +static int do_trickle_setup_rx8901(struct ds1307 *ds1307, u32 ohms __always_unused, bool diode)
> +{
> + int ret;
> + unsigned int setup;
> +
> + ret = regmap_read(ds1307->regmap, RX8901_REG_PWSW_CFG, &setup);
> + if (ret) {
> + dev_err(ds1307->dev, "Failed to read PWSW_CFG register\n");
> + return ret;
> + }
> +
> + /* Enable low battery voltage detection */
> + setup |= RX8901_REG_PWSW_CFG_VBATLDETEN;
> +
> + if (diode)
> + setup |= RX8901_REG_PWSW_CFG_CHGEN;
When diode is false, you need to explicitly clear
RX8901_REG_PWSW_CFG_CHGEN so it is possible to actually disable trickle
charging once it has been enabled has the register is battery backed.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-06-24 21:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 14:48 [PATCH v2 0/3] rtc: ds1307: Add support for Epson RX8901CE Fredrik M Olsson
2026-05-20 14:48 ` [PATCH v2 1/3] dt-bindings: rtc: ds1307: Add epson,rx8901 Fredrik M Olsson
2026-05-20 14:48 ` [PATCH v2 2/3] rtc: ds1307: Fix off-by-one issue with wday for rx8130 Fredrik M Olsson
2026-05-20 14:48 ` [PATCH v2 3/3] rtc: ds1307: Add driver for Epson RX8901CE Fredrik M Olsson
2026-06-24 21:38 ` Alexandre Belloni [this message]
2026-06-24 21:42 ` (subset) [PATCH v2 0/3] rtc: ds1307: Add support " Alexandre Belloni
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=20260624213847b0e6c315@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fredrik.m.olsson@axis.com \
--cc=kernel@axis.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=nobuhiro.iwamatsu.x90@mail.toshiba \
--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