* linux-next: build failure after merge of the mfd tree
@ 2016-02-29 3:51 Stephen Rothwell
2016-03-01 1:19 ` Kuninori Morimoto
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2016-02-29 3:51 UTC (permalink / raw)
To: Lee Jones, Mark Brown, Liam Girdwood
Cc: linux-next, linux-kernel, Kuninori Morimoto
Hi Lee,
After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
failed like this:
drivers/regulator/tps65086-regulator.c:194:9: error: implicit declaration of function 'regmap_write_bits' [-Werror=implicit-function-declaration]
ret = regmap_write_bits(config->regmap,
^
Caused by commit
23b92e4cf5fd ("regmap: remove regmap_write_bits()")
from the sound-asoc & regmap trees.
I am not sure why this is suddenly exposed by the mfd tree, but grep
would have been useful when the regmap tree patch was applied.
I have reverted that regmap commit for today.
--
Cheers,
Stephen Rothwell
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: build failure after merge of the mfd tree
2016-02-29 3:51 linux-next: build failure after merge of the mfd tree Stephen Rothwell
@ 2016-03-01 1:19 ` Kuninori Morimoto
2016-03-01 1:35 ` Kuninori Morimoto
0 siblings, 1 reply; 5+ messages in thread
From: Kuninori Morimoto @ 2016-03-01 1:19 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Lee Jones, Mark Brown, Liam Girdwood, linux-next, linux-kernel
Hi Stephen, Lee
> After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> drivers/regulator/tps65086-regulator.c:194:9: error: implicit declaration of function 'regmap_write_bits' [-Werror=implicit-function-declaration]
> ret = regmap_write_bits(config->regmap,
> ^
>
> Caused by commit
>
> 23b92e4cf5fd ("regmap: remove regmap_write_bits()")
>
> from the sound-asoc & regmap trees.
>
> I am not sure why this is suddenly exposed by the mfd tree, but grep
> would have been useful when the regmap tree patch was applied.
>
> I have reverted that regmap commit for today.
Oops, it is my fault. Can you check/test this patch ?
----------------
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Tue, 1 Mar 2016 10:12:20 +0900
Subject: [PATCH] regmap: add regmap_force_update_bits()
commit 23b92e4c ("regmap: remove regmap_write_bits()")
removed regmap_write_bits(), we can use regmap_force_update_bits()
instead of it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/regulator/tps65086-regulator.c | 2 +-
include/linux/regmap.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/tps65086-regulator.c b/drivers/regulator/tps65086-regulator.c
index 33f389d..e78b688 100644
--- a/drivers/regulator/tps65086-regulator.c
+++ b/drivers/regulator/tps65086-regulator.c
@@ -191,7 +191,7 @@ static int tps65086_of_parse_cb(struct device_node *dev,
/* Check for decay mode */
if (desc->id <= BUCK6 && of_property_read_bool(config->of_node, "ti,regulator-decay")) {
- ret = regmap_write_bits(config->regmap,
+ ret = regmap_force_update_bits(config->regmap,
regulators[desc->id].decay_reg,
regulators[desc->id].decay_mask,
regulators[desc->id].decay_mask);
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 7449792..d6cde49 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -67,6 +67,8 @@ struct reg_sequence {
#define regmap_update_bits(map, reg, mask, val) \
regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
+#define regmap_force_update_bits(map, reg, mask, val) \
+ regmap_update_bits_base(map, reg, mask, val, NULL, false, true)
#define regmap_update_bits_async(map, reg, mask, val)\
regmap_update_bits_base(map, reg, mask, val, NULL, true, false)
#define regmap_update_bits_check(map, reg, mask, val, change)\
--
----------------
Best regards
---
Kuninori Morimoto
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: linux-next: build failure after merge of the mfd tree
2016-03-01 1:19 ` Kuninori Morimoto
@ 2016-03-01 1:35 ` Kuninori Morimoto
2016-03-02 4:00 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Kuninori Morimoto @ 2016-03-01 1:35 UTC (permalink / raw)
To: Mark Brown
Cc: Stephen Rothwell, Lee Jones, Liam Girdwood, linux-next, linux-kernel
Hi Mark
I noticed that you reborned regmap_write_bits() on your latest tree.
I think using/adding regmap_force_update_bits() is good idea IMO.
Can I create such patch ?
> Oops, it is my fault. Can you check/test this patch ?
>
> ----------------
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Date: Tue, 1 Mar 2016 10:12:20 +0900
> Subject: [PATCH] regmap: add regmap_force_update_bits()
>
> commit 23b92e4c ("regmap: remove regmap_write_bits()")
> removed regmap_write_bits(), we can use regmap_force_update_bits()
> instead of it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> drivers/regulator/tps65086-regulator.c | 2 +-
> include/linux/regmap.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/tps65086-regulator.c b/drivers/regulator/tps65086-regulator.c
> index 33f389d..e78b688 100644
> --- a/drivers/regulator/tps65086-regulator.c
> +++ b/drivers/regulator/tps65086-regulator.c
> @@ -191,7 +191,7 @@ static int tps65086_of_parse_cb(struct device_node *dev,
>
> /* Check for decay mode */
> if (desc->id <= BUCK6 && of_property_read_bool(config->of_node, "ti,regulator-decay")) {
> - ret = regmap_write_bits(config->regmap,
> + ret = regmap_force_update_bits(config->regmap,
> regulators[desc->id].decay_reg,
> regulators[desc->id].decay_mask,
> regulators[desc->id].decay_mask);
> diff --git a/include/linux/regmap.h b/include/linux/regmap.h
> index 7449792..d6cde49 100644
> --- a/include/linux/regmap.h
> +++ b/include/linux/regmap.h
> @@ -67,6 +67,8 @@ struct reg_sequence {
>
> #define regmap_update_bits(map, reg, mask, val) \
> regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
> +#define regmap_force_update_bits(map, reg, mask, val) \
> + regmap_update_bits_base(map, reg, mask, val, NULL, false, true)
> #define regmap_update_bits_async(map, reg, mask, val)\
> regmap_update_bits_base(map, reg, mask, val, NULL, true, false)
> #define regmap_update_bits_check(map, reg, mask, val, change)\
> --
> ----------------
>
>
> Best regards
> ---
> Kuninori Morimoto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: build failure after merge of the mfd tree
2016-03-01 1:35 ` Kuninori Morimoto
@ 2016-03-02 4:00 ` Mark Brown
2016-03-03 0:48 ` [PATCH] regmap: replace regmap_write_bits() Kuninori Morimoto
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2016-03-02 4:00 UTC (permalink / raw)
To: Kuninori Morimoto
Cc: Stephen Rothwell, Lee Jones, Liam Girdwood, linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
On Tue, Mar 01, 2016 at 01:35:58AM +0000, Kuninori Morimoto wrote:
> I noticed that you reborned regmap_write_bits() on your latest tree.
> I think using/adding regmap_force_update_bits() is good idea IMO.
> Can I create such patch ?
It might make more sense to rename _force_update_bits() to
_write_bits().
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] regmap: replace regmap_write_bits()
2016-03-02 4:00 ` Mark Brown
@ 2016-03-03 0:48 ` Kuninori Morimoto
0 siblings, 0 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2016-03-03 0:48 UTC (permalink / raw)
To: Mark Brown
Cc: Stephen Rothwell, Lee Jones, Liam Girdwood, linux-next, linux-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
commit 23b92e4cf5fd ("regmap: remove regmap_write_bits()")
removed regmap_write_bits(), but MFD driver was using it.
So, commit e30fccd6771d ("regmap: Keep regmap_write_bits()")
turns out it, but it is using original style.
This patch uses regmap_update_bits_base() for regmap_write_bits()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/base/regmap/regmap.c | 23 -----------------------
include/linux/regmap.h | 12 +++---------
2 files changed, 3 insertions(+), 32 deletions(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index c7d4a63..3fb04c3 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2650,29 +2650,6 @@ 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 e0960b3..0744c9f 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -74,6 +74,9 @@ struct reg_sequence {
#define regmap_update_bits_check_async(map, reg, mask, val, change)\
regmap_update_bits_base(map, reg, mask, val, change, true, false)
+#define regmap_write_bits(map, reg, mask, val) \
+ regmap_update_bits_base(map, reg, mask, val, NULL, false, true)
+
#define regmap_field_write(field, val) \
regmap_field_update_bits_base(field, ~0, val, NULL, false, false)
#define regmap_field_force_write(field, val) \
@@ -721,8 +724,6 @@ 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);
@@ -961,13 +962,6 @@ 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)
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-03 0:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 3:51 linux-next: build failure after merge of the mfd tree Stephen Rothwell
2016-03-01 1:19 ` Kuninori Morimoto
2016-03-01 1:35 ` Kuninori Morimoto
2016-03-02 4:00 ` Mark Brown
2016-03-03 0:48 ` [PATCH] regmap: replace regmap_write_bits() Kuninori Morimoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).