From: Matti Vaittinen <matti.vaittinen@linux.dev>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Matti Vaittinen <matti.vaittinen@linux.dev>
Cc: "Andreas Kemnade" <andreas@kemnade.info>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
"Sebastian Reichel" <sre@kernel.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
"Kalle Niemi" <kaleposti@gmail.com>,
"Topi Sonkajärvi" <sonkajarvi@hotmail.com>,
"Mikko Mutanen" <mikko.mutanen@fi.rohmeurope.com>,
"Markus Laine" <markus.laine@fi.rohmeurope.com>
Subject: [PATCH 5/5] power: supply: bd99954: Drop bad register fields
Date: Mon, 10 Aug 2026 13:10:03 +0300 [thread overview]
Message-ID: <758fd430d02286a6f18603a8aecfe443f5ddeb8e.1786356145.git.mazziesaccount@gmail.com> (raw)
In-Reply-To: <cover.1786356145.git.mazziesaccount@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2851 bytes --]
From: Matti Vaittinen <mazziesaccount@gmail.com>
The bd99954 driver creates regmap fields for all the registers. All the
fields for VBUS_UCD_FCTRL_SET (extended command 0x33) are accidentally
created for VCC_UCD_FCTRL_SET (extended command 0x2b), causing all
reads/writes for the fields to access wrong register. Luckily the fields
for VBUS_UCD_FCTRL_SET are unused.
Taking a look at the data-sheet:
https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/battery_management/bd99954xxx-e.pdf
all the fields in the VBUS_UCD_FCTRL_SET are marked as:
"In normal operation, please don’t set these registers" with not much of
additional documentation. As the fields are wrong and because there seems
to be no users of the fields - it is better to just drop them. This will
also decrease the memory footprint.
Drop incorrect VBUS_UCD_FCTRL_SET fields.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Fixes: 0902f8366491 ("power: supply: Support ROHM bd99954 charger")
---
drivers/power/supply/bd99954-charger.h | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/drivers/power/supply/bd99954-charger.h b/drivers/power/supply/bd99954-charger.h
index f58897925383..d053ac901274 100644
--- a/drivers/power/supply/bd99954-charger.h
+++ b/drivers/power/supply/bd99954-charger.h
@@ -279,17 +279,7 @@ enum bd9995x_fields {
F_VBUS_EXTID,
F_VBUS_IDRDET,
F_VBUS_INDO,
- F_VBUS_UCDSWEN,
- F_VBUS_RREF_EN,
- F_VBUS_DPPU_EN,
- F_VBUS_DPREF_EN,
- F_VBUS_DMREF_EN,
- F_VBUS_DPDET_EN,
- F_VBUS_DMDET_EN,
- F_VBUS_DPSINK_EN,
- F_VBUS_DMSINK_EN,
- F_VBUS_DP_BUFF_EN,
- F_VBUS_DM_BUFF_EN,
+
F_VBUS_EXTCLKENBL,
F_VBUS_PLSTESTEN,
F_VBUS_UCDSWEN_TSTENB,
@@ -626,17 +616,6 @@ static const struct reg_field bd9995x_reg_fields[] = {
[F_VBUS_EXTID] = REG_FIELD(VBUS_IDD_STATUS, 5, 5),
[F_VBUS_IDRDET] = REG_FIELD(VBUS_IDD_STATUS, 4, 4),
[F_VBUS_INDO] = REG_FIELD(VBUS_IDD_STATUS, 0, 3),
- [F_VBUS_UCDSWEN] = REG_FIELD(VCC_UCD_FCTRL_SET, 10, 10),
- [F_VBUS_RREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 9, 9),
- [F_VBUS_DPPU_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 8, 8),
- [F_VBUS_DPREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 7, 7),
- [F_VBUS_DMREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 6, 6),
- [F_VBUS_DPDET_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 5, 5),
- [F_VBUS_DMDET_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 4, 4),
- [F_VBUS_DPSINK_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 3, 3),
- [F_VBUS_DMSINK_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 2, 2),
- [F_VBUS_DP_BUFF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 1, 1),
- [F_VBUS_DM_BUFF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 0, 0),
[F_VBUS_EXTCLKENBL] = REG_FIELD(VBUS_UCD_FCTRL_EN, 15, 15),
[F_VBUS_PLSTESTEN] = REG_FIELD(VBUS_UCD_FCTRL_EN, 14, 14),
--
2.55.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-08-10 10:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 10:08 [PATCH 0/5] ROHM bd71828 power-supply fixes Matti Vaittinen
2026-08-10 10:08 ` [PATCH 1/5] power: supply: bd71815: Fix temperature reading Matti Vaittinen
2026-08-10 10:09 ` [PATCH 2/5] power: supply: bd71828: Fix current direction Matti Vaittinen
2026-08-10 17:18 ` Andy Shevchenko
2026-08-11 8:46 ` Matti Vaittinen
2026-08-11 10:04 ` Andy Shevchenko
2026-08-12 8:10 ` Andreas Kemnade
2026-08-12 8:17 ` Andy Shevchenko
2026-08-12 8:25 ` Andreas Kemnade
2026-08-12 9:30 ` Andy Shevchenko
2026-08-12 9:37 ` Matti Vaittinen
2026-08-12 9:55 ` Andy Shevchenko
2026-08-12 9:40 ` Matti Vaittinen
2026-08-12 11:32 ` Andreas Kemnade
2026-08-10 10:09 ` [PATCH 3/5] power: supply: bd71828: Drop duplicate power-supply property Matti Vaittinen
2026-08-10 18:01 ` Andy Shevchenko
2026-08-10 10:09 ` [PATCH 4/5] power: supply: bd71828: Do not hide errors Matti Vaittinen
2026-08-10 10:10 ` Matti Vaittinen [this message]
2026-08-10 18:03 ` [PATCH 5/5] power: supply: bd99954: Drop bad register fields Andy Shevchenko
2026-08-12 6:59 ` [PATCH 0/5] ROHM bd71828 power-supply fixes Kalle Niemi
2026-08-12 22:23 ` Sebastian Reichel
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=758fd430d02286a6f18603a8aecfe443f5ddeb8e.1786356145.git.mazziesaccount@gmail.com \
--to=matti.vaittinen@linux.dev \
--cc=andreas@kemnade.info \
--cc=andriy.shevchenko@linux.intel.com \
--cc=kaleposti@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=markus.laine@fi.rohmeurope.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=mikko.mutanen@fi.rohmeurope.com \
--cc=sonkajarvi@hotmail.com \
--cc=sre@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
all inboxes | Powered by JetHome®