Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1345851 > unrolled thread
| Started by | Mark Brown <broonie@kernel.org> |
|---|---|
| First post | 2016-02-29 15:10 +0100 |
| Last post | 2016-03-02 06:30 +0100 |
| Articles | 7 — 2 participants |
Back to article view | Back to linux.kernel
Applied "regmap: Keep regmap_write_bits()" to the regmap tree Mark Brown <broonie@kernel.org> - 2016-02-29 15:10 +0100
Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-02-29 23:10 +0100
Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree Mark Brown <broonie@kernel.org> - 2016-03-01 04:10 +0100
Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-03-01 08:20 +0100
Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree Mark Brown <broonie@kernel.org> - 2016-03-02 04:10 +0100
Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree Mark Brown <broonie@kernel.org> - 2016-03-02 05:40 +0100
Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-03-02 06:30 +0100
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-02-29 15:10 +0100 |
| Subject | Applied "regmap: Keep regmap_write_bits()" to the regmap tree |
| Message-ID | <r7wGn-44T-19@gated-at.bofh.it> |
The patch
regmap: Keep regmap_write_bits()
has been applied to the regmap tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From e30fccd6771dc486bd0fd0f982ae1d77b0045fd3 Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie@kernel.org>
Date: Mon, 29 Feb 2016 22:58:33 +0900
Subject: [PATCH] regmap: Keep regmap_write_bits()
It turns out we do have a MFD driver using this.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/base/regmap/regmap.c | 23 +++++++++++++++++++++++
include/linux/regmap.h | 9 +++++++++
2 files changed, 32 insertions(+)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 3fb04c36ae5e..c7d4a636778d 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2650,6 +2650,29 @@ int regmap_update_bits_base(struct regmap *map, unsigned int reg,
}
EXPORT_SYMBOL_GPL(regmap_update_bits_base);
+/**
+ * regmap_write_bits: Perform a read/modify/write cycle on the register map
+ *
+ * @map: Register map to update
+ * @reg: Register to update
+ * @mask: Bitmask to change
+ * @val: New value for bitmask
+ *
+ * Returns zero for success, a negative number on error.
+ */
+int regmap_write_bits(struct regmap *map, unsigned int reg,
+ unsigned int mask, unsigned int val)
+{
+ int ret;
+
+ map->lock(map->lock_arg);
+ ret = _regmap_update_bits(map, reg, mask, val, NULL, true);
+ map->unlock(map->lock_arg);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(regmap_write_bits);
+
void regmap_async_complete_cb(struct regmap_async *async, int ret)
{
struct regmap *map = async->map;
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 5315ff0adb85..e0960b3ff290 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -721,6 +721,8 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
int regmap_update_bits_base(struct regmap *map, unsigned int reg,
unsigned int mask, unsigned int val,
bool *change, bool async, bool force);
+int regmap_write_bits(struct regmap *map, unsigned int reg,
+ unsigned int mask, unsigned int val);
int regmap_get_val_bytes(struct regmap *map);
int regmap_get_max_register(struct regmap *map);
int regmap_get_reg_stride(struct regmap *map);
@@ -959,6 +961,13 @@ static inline int regmap_update_bits_base(struct regmap *map, unsigned int reg,
return -EINVAL;
}
+static inline int regmap_write_bits(struct regmap *map, unsigned int reg,
+ unsigned int mask, unsigned int val)
+{
+ WARN_ONCE(1, "regmap API is disabled");
+ return -EINVAL;
+}
+
static inline int regmap_field_update_bits_base(struct regmap_field *field,
unsigned int mask, unsigned int val,
bool *change, bool async, bool force)
--
2.7.0
[toc] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-02-29 23:10 +0100 |
| Message-ID | <r7EaT-q9-7@gated-at.bofh.it> |
| In reply to | #1345851 |
Hi Mark, On Mon, 29 Feb 2016 23:02:23 +0900 Mark Brown <broonie@kernel.org> wrote: > > The patch > > regmap: Keep regmap_write_bits() > > has been applied to the regmap tree at > > git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git This is needed in the sound-asoc tree as well since it merged (part of) the regmap tree. -- Cheers, Stephen Rothwell
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-03-01 04:10 +0100 |
| Message-ID | <r7IRc-3lp-15@gated-at.bofh.it> |
| In reply to | #1346194 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Mar 01, 2016 at 09:00:19AM +1100, Stephen Rothwell wrote: > On Mon, 29 Feb 2016 23:02:23 +0900 Mark Brown <broonie@kernel.org> wrote: > > git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git > This is needed in the sound-asoc tree as well since it merged (part of) > the regmap tree. It'll sort itself out by the time things get merged down into Linus' tree, that's why I did it as a revert rather than just dropping the patch. Linus generally takes regmap before ALSA.
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-03-01 08:20 +0100 |
| Message-ID | <r7ML8-5Vt-5@gated-at.bofh.it> |
| In reply to | #1346335 |
Hi Mark, On Tue, 1 Mar 2016 11:25:44 +0900 Mark Brown <broonie@kernel.org> wrote: > > On Tue, Mar 01, 2016 at 09:00:19AM +1100, Stephen Rothwell wrote: > > On Mon, 29 Feb 2016 23:02:23 +0900 Mark Brown <broonie@kernel.org> wrote: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git > > > This is needed in the sound-asoc tree as well since it merged (part of) > > the regmap tree. > > It'll sort itself out by the time things get merged down into Linus' > tree, that's why I did it as a revert rather than just dropping the > patch. Linus generally takes regmap before ALSA. Well, I have the sound trees before the regmap tree. I also dislike having these sort of dependencies between trees. What happens if Linus does merge the sound tree first? You already merged part of the regmap tree into the sound-asoc tree, why not do that again with the fix? I guess I should rearrange the trees in my list :-( -- Cheers, Stephen Rothwell
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-03-02 04:10 +0100 |
| Message-ID | <r85kJ-1DR-9@gated-at.bofh.it> |
| In reply to | #1346415 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Mar 01, 2016 at 06:11:46PM +1100, Stephen Rothwell wrote: > On Tue, 1 Mar 2016 11:25:44 +0900 Mark Brown <broonie@kernel.org> wrote: > > It'll sort itself out by the time things get merged down into Linus' > > tree, that's why I did it as a revert rather than just dropping the > > patch. Linus generally takes regmap before ALSA. > Well, I have the sound trees before the regmap tree. I also dislike Oh, that's a bit surprising. > having these sort of dependencies between trees. What happens if Linus > does merge the sound tree first? > You already merged part of the regmap tree into the sound-asoc tree, > why not do that again with the fix? I tend to treat things that are real fixes as opposed to things that are test only fixes a bit differently to each other - lots of cross merges get messy, if it's not going to hit someone doing something in a real system I tend to not worry about it too much.
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-03-02 05:40 +0100 |
| Message-ID | <r86JQ-2xU-3@gated-at.bofh.it> |
| In reply to | #1346415 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Mar 01, 2016 at 06:11:46PM +1100, Stephen Rothwell wrote: > You already merged part of the regmap tree into the sound-asoc tree, > why not do that again with the fix? I rebuilt the trees.
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-03-02 06:30 +0100 |
| Message-ID | <r87we-37m-3@gated-at.bofh.it> |
| In reply to | #1347778 |
Hi Mark, On Wed, 2 Mar 2016 13:36:33 +0900 Mark Brown <broonie@kernel.org> wrote: > > On Tue, Mar 01, 2016 at 06:11:46PM +1100, Stephen Rothwell wrote: > > > You already merged part of the regmap tree into the sound-asoc tree, > > why not do that again with the fix? > > I rebuilt the trees. OK, thanks for the heads up. -- Cheers, Stephen Rothwell
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web