From: "André Draszik" <andre.draszik@linaro.org>
To: Thomas Antoine <t.antoine@uclouvain.be>,
Sebastian Reichel <sre@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Dimitri Fedrau <dima.fedrau@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Peter Griffin <peter.griffin@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH 1/4] power: supply: add support for max77759 fuel gauge
Date: Tue, 03 Dec 2024 11:06:14 +0000 [thread overview]
Message-ID: <d1bade77b5281c1de6b2ddcb4dbbd033e455a116.camel@linaro.org> (raw)
In-Reply-To: <61a54367-2406-4106-bf8b-9fda4f2d11a6@uclouvain.be>
On Tue, 2024-12-03 at 11:30 +0100, Thomas Antoine wrote:
>
> Should I explicitly deny their use in the code for the max77759 or is it
> just for information?
I'd probably do something like this, which will indeed deny their reading
and/or writing, both via debugfs, and also normal driver access via
readmap_read()/write() etc:
static const struct regmap_range max77759_registers[] = {
regmap_reg_range(0x00, 0x4f),
regmap_reg_range(0xb0, 0xbf),
regmap_reg_range(0xd0, 0xd0),
regmap_reg_range(0xdc, 0xdf),
regmap_reg_range(0xfb, 0xfb),
regmap_reg_range(0xff, 0xff),
};
static const struct regmap_range max77759_ro_registers[] = {
regmap_reg_range(0x3d, 0x3d),
regmap_reg_range(0xfb, 0xfb),
regmap_reg_range(0xff, 0xff),
};
static const struct regmap_access_table max77759_write_table = {
.yes_ranges = max77759_registers,
.n_yes_ranges = ARRAY_SIZE(max77759_registers),
.no_ranges = max77759_ro_registers,
.n_no_ranges = ARRAY_SIZE(max77759_ro_registers),
};
static const struct regmap_access_table max77759_rd_table = {
.yes_ranges = max77759_registers,
.n_yes_ranges = ARRAY_SIZE(max77759_registers),
};
static const struct regmap_config max77759_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0xff,
.wr_table = &max77759_write_table,
.rd_table = &max77759_rd_table,
.cache_type = REGCACHE_NONE,
};
And maybe without cache for now. Most are probably not cacheable anyway.
Cheers,
Andre'
next prev parent reply other threads:[~2024-12-03 11:06 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 13:07 [PATCH 0/4] Google Pixel 6 (oriole): max77759 fuel gauge enablement and driver support Thomas Antoine via B4 Relay
2024-12-02 13:07 ` [PATCH 1/4] power: supply: add support for max77759 fuel gauge Thomas Antoine via B4 Relay
2024-12-03 6:47 ` André Draszik
2024-12-03 7:23 ` André Draszik
2024-12-03 9:45 ` André Draszik
2024-12-03 10:30 ` Thomas Antoine
2024-12-03 11:06 ` André Draszik [this message]
2024-12-04 8:49 ` Thomas Antoine
2024-12-03 9:08 ` Thomas Antoine
2024-12-03 9:31 ` André Draszik
2024-12-03 10:11 ` Thomas Antoine
2024-12-03 10:50 ` Peter Griffin
2024-12-03 11:02 ` André Draszik
2024-12-04 8:53 ` Thomas Antoine
2024-12-03 7:35 ` Dimitri Fedrau
2024-12-03 9:25 ` Thomas Antoine
2024-12-02 13:07 ` [PATCH 2/4] dt-bindings: power: supply: add max77759-fg flavor and don't require nvme address Thomas Antoine via B4 Relay
2024-12-02 13:39 ` Krzysztof Kozlowski
2024-12-02 14:42 ` Thomas Antoine
2024-12-03 6:57 ` André Draszik
2024-12-03 9:32 ` Thomas Antoine
2024-12-03 10:07 ` André Draszik
2024-12-03 7:12 ` André Draszik
2024-12-03 10:23 ` Thomas Antoine
2024-12-03 10:40 ` André Draszik
2024-12-04 13:13 ` Thomas Antoine
2024-12-05 6:22 ` André Draszik
2024-12-02 13:07 ` [PATCH 3/4] arm64: defconfig: enable Maxim max1720x driver Thomas Antoine via B4 Relay
2024-12-02 13:40 ` Krzysztof Kozlowski
2024-12-02 14:54 ` Thomas Antoine
2024-12-02 13:07 ` [PATCH 4/4] arm64: dts: exynos: gs101-oriole: enable Maxim max77759 fuel gauge Thomas Antoine via B4 Relay
2024-12-02 13:41 ` Krzysztof Kozlowski
2024-12-02 15:03 ` Thomas Antoine
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=d1bade77b5281c1de6b2ddcb4dbbd033e455a116.camel@linaro.org \
--to=andre.draszik@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dima.fedrau@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
--cc=t.antoine@uclouvain.be \
--cc=will@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