All of lore.kernel.org
 help / color / mirror / Atom feed
* Applied "regmap: Keep regmap_write_bits()" to the regmap tree
@ 2016-02-29 14:02 Mark Brown
  2016-02-29 22:00 ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2016-02-29 14:02 UTC (permalink / raw)
  To: Stephen Rothwell, Mark Brown; +Cc: linux-kernel

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree
  2016-02-29 14:02 Applied "regmap: Keep regmap_write_bits()" to the regmap tree Mark Brown
@ 2016-02-29 22:00 ` Stephen Rothwell
  2016-03-01  2:25   ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2016-02-29 22:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree
  2016-02-29 22:00 ` Stephen Rothwell
@ 2016-03-01  2:25   ` Mark Brown
  2016-03-01  7:11     ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2016-03-01  2:25 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree
  2016-03-01  2:25   ` Mark Brown
@ 2016-03-01  7:11     ` Stephen Rothwell
  2016-03-02  3:07       ` Mark Brown
  2016-03-02  4:36       ` Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2016-03-01  7:11 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree
  2016-03-01  7:11     ` Stephen Rothwell
@ 2016-03-02  3:07       ` Mark Brown
  2016-03-02  4:36       ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2016-03-02  3:07 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree
  2016-03-01  7:11     ` Stephen Rothwell
  2016-03-02  3:07       ` Mark Brown
@ 2016-03-02  4:36       ` Mark Brown
  2016-03-02  5:25         ` Stephen Rothwell
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2016-03-02  4:36 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Applied "regmap: Keep regmap_write_bits()" to the regmap tree
  2016-03-02  4:36       ` Mark Brown
@ 2016-03-02  5:25         ` Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2016-03-02  5:25 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-02  5:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 14:02 Applied "regmap: Keep regmap_write_bits()" to the regmap tree Mark Brown
2016-02-29 22:00 ` Stephen Rothwell
2016-03-01  2:25   ` Mark Brown
2016-03-01  7:11     ` Stephen Rothwell
2016-03-02  3:07       ` Mark Brown
2016-03-02  4:36       ` Mark Brown
2016-03-02  5:25         ` Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.