All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] regmap: slimbus: minor fixes.
@ 2018-05-25 13:50 Srinivas Kandagatla
  2018-05-25 13:50 ` [PATCH 1/2] regmap: add missing prototype for devm_init_slimbus Srinivas Kandagatla
  2018-05-25 13:50 ` [PATCH 2/2] regmap: slimbus: allow register offsets up to 16 bits Srinivas Kandagatla
  0 siblings, 2 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2018-05-25 13:50 UTC (permalink / raw)
  To: Mark Brown; +Cc: Greg Kroah-Hartman, linux-kernel, Srinivas Kandagatla

Here are 2 minor fixes for regmap slimbus.

Thanks,
srini

Srinivas Kandagatla (2):
  regmap: add missing prototype for devm_init_slimbus
  regmap: slimbus: allow register offsets up to 16 bits

 drivers/base/regmap/regmap-slimbus.c |  2 +-
 include/linux/regmap.h               | 18 +++++++++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

-- 
2.16.2

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

* [PATCH 1/2] regmap: add missing prototype for devm_init_slimbus
  2018-05-25 13:50 [PATCH 0/2] regmap: slimbus: minor fixes Srinivas Kandagatla
@ 2018-05-25 13:50 ` Srinivas Kandagatla
  2018-05-25 17:36   ` Applied "regmap: add missing prototype for devm_init_slimbus" to the regmap tree Mark Brown
  2018-05-25 13:50 ` [PATCH 2/2] regmap: slimbus: allow register offsets up to 16 bits Srinivas Kandagatla
  1 sibling, 1 reply; 5+ messages in thread
From: Srinivas Kandagatla @ 2018-05-25 13:50 UTC (permalink / raw)
  To: Mark Brown; +Cc: Greg Kroah-Hartman, linux-kernel, Srinivas Kandagatla

For some reason the devm variant of slimbus init is not added
into the header eventhough this __devm_regmap_init_slimbus()
is an exported function.

This patch adds this. This also fixes below warning in regmap-slimbus.c
regmap-slimbus.c:65:15: warning: symbol '__devm_regmap_init_slimbus'
 was not declared. Should it be static?
regmap-slimbus.c:65:16: warning: no previous prototype for
 '__devm_regmap_init_slimbus' [-Wmissing-prototypes]

Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 include/linux/regmap.h | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index b6865f070464..4f38068ffb71 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -588,7 +588,10 @@ struct regmap *__devm_regmap_init_sdw(struct sdw_slave *sdw,
 				 const struct regmap_config *config,
 				 struct lock_class_key *lock_key,
 				 const char *lock_name);
-
+struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
+				 const struct regmap_config *config,
+				 struct lock_class_key *lock_key,
+				 const char *lock_name);
 /*
  * Wrapper for regmap_init macros to include a unique lockdep key and name
  * for each call. No-op if CONFIG_LOCKDEP is not set.
@@ -907,6 +910,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
 	__regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config,	\
 				sdw, config)
 
+/**
+ * devm_regmap_init_slimbus() - Initialise managed register map
+ *
+ * @slimbus: Device that will be interacted with
+ * @config: Configuration for register map
+ *
+ * The return value will be an ERR_PTR() on error or a valid pointer
+ * to a struct regmap. The regmap will be automatically freed by the
+ * device management code.
+ */
+#define devm_regmap_init_slimbus(slimbus, config)			\
+	__regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config,	\
+				slimbus, config)
 int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk);
 void regmap_mmio_detach_clk(struct regmap *map);
 void regmap_exit(struct regmap *map);
-- 
2.16.2

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

* [PATCH 2/2] regmap: slimbus: allow register offsets up to 16 bits
  2018-05-25 13:50 [PATCH 0/2] regmap: slimbus: minor fixes Srinivas Kandagatla
  2018-05-25 13:50 ` [PATCH 1/2] regmap: add missing prototype for devm_init_slimbus Srinivas Kandagatla
@ 2018-05-25 13:50 ` Srinivas Kandagatla
  2018-05-25 17:36   ` Applied "regmap: slimbus: allow register offsets up to 16 bits" to the regmap tree Mark Brown
  1 sibling, 1 reply; 5+ messages in thread
From: Srinivas Kandagatla @ 2018-05-25 13:50 UTC (permalink / raw)
  To: Mark Brown; +Cc: Greg Kroah-Hartman, linux-kernel, Srinivas Kandagatla

As per SLIMBus specs Value Elements and Information Elements
address map ranges from 0x000 - 0xFFF.

So allow register addresses up to 16 bits

Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/base/regmap/regmap-slimbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-slimbus.c b/drivers/base/regmap/regmap-slimbus.c
index c90bee81d954..91d501eda8a9 100644
--- a/drivers/base/regmap/regmap-slimbus.c
+++ b/drivers/base/regmap/regmap-slimbus.c
@@ -41,7 +41,7 @@ static struct regmap_bus regmap_slimbus_bus = {
 static const struct regmap_bus *regmap_get_slimbus(struct slim_device *slim,
 					const struct regmap_config *config)
 {
-	if (config->val_bits == 8 && config->reg_bits == 8)
+	if (config->val_bits == 8 && config->reg_bits == 16)
 		return &regmap_slimbus_bus;
 
 	return ERR_PTR(-ENOTSUPP);
-- 
2.16.2

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

* Applied "regmap: slimbus: allow register offsets up to 16 bits" to the regmap tree
  2018-05-25 13:50 ` [PATCH 2/2] regmap: slimbus: allow register offsets up to 16 bits Srinivas Kandagatla
@ 2018-05-25 17:36   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2018-05-25 17:36 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Mark Brown, Mark Brown, Greg Kroah-Hartman, linux-kernel, linux-kernel

The patch

   regmap: slimbus: allow register offsets up to 16 bits

has been applied to the regmap tree at

   https://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 cbdd39ca498f6b2b221614d9c1d105f2948f1dbb Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Fri, 25 May 2018 14:50:37 +0100
Subject: [PATCH] regmap: slimbus: allow register offsets up to 16 bits

As per SLIMBus specs Value Elements and Information Elements
address map ranges from 0x000 - 0xFFF.

So allow register addresses up to 16 bits

Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/base/regmap/regmap-slimbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-slimbus.c b/drivers/base/regmap/regmap-slimbus.c
index c90bee81d954..91d501eda8a9 100644
--- a/drivers/base/regmap/regmap-slimbus.c
+++ b/drivers/base/regmap/regmap-slimbus.c
@@ -41,7 +41,7 @@ static struct regmap_bus regmap_slimbus_bus = {
 static const struct regmap_bus *regmap_get_slimbus(struct slim_device *slim,
 					const struct regmap_config *config)
 {
-	if (config->val_bits == 8 && config->reg_bits == 8)
+	if (config->val_bits == 8 && config->reg_bits == 16)
 		return &regmap_slimbus_bus;
 
 	return ERR_PTR(-ENOTSUPP);
-- 
2.17.0

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

* Applied "regmap: add missing prototype for devm_init_slimbus" to the regmap tree
  2018-05-25 13:50 ` [PATCH 1/2] regmap: add missing prototype for devm_init_slimbus Srinivas Kandagatla
@ 2018-05-25 17:36   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2018-05-25 17:36 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Mark Brown, Mark Brown, Greg Kroah-Hartman, linux-kernel, linux-kernel

The patch

   regmap: add missing prototype for devm_init_slimbus

has been applied to the regmap tree at

   https://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 ed24d568bd9190cee046ae64df5890494dea2ca4 Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Fri, 25 May 2018 14:50:36 +0100
Subject: [PATCH] regmap: add missing prototype for devm_init_slimbus

For some reason the devm variant of slimbus init is not added
into the header eventhough this __devm_regmap_init_slimbus()
is an exported function.

This patch adds this. This also fixes below warning in regmap-slimbus.c
regmap-slimbus.c:65:15: warning: symbol '__devm_regmap_init_slimbus'
 was not declared. Should it be static?
regmap-slimbus.c:65:16: warning: no previous prototype for
 '__devm_regmap_init_slimbus' [-Wmissing-prototypes]

Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/linux/regmap.h | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index b6865f070464..4f38068ffb71 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -588,7 +588,10 @@ struct regmap *__devm_regmap_init_sdw(struct sdw_slave *sdw,
 				 const struct regmap_config *config,
 				 struct lock_class_key *lock_key,
 				 const char *lock_name);
-
+struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
+				 const struct regmap_config *config,
+				 struct lock_class_key *lock_key,
+				 const char *lock_name);
 /*
  * Wrapper for regmap_init macros to include a unique lockdep key and name
  * for each call. No-op if CONFIG_LOCKDEP is not set.
@@ -907,6 +910,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
 	__regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config,	\
 				sdw, config)
 
+/**
+ * devm_regmap_init_slimbus() - Initialise managed register map
+ *
+ * @slimbus: Device that will be interacted with
+ * @config: Configuration for register map
+ *
+ * The return value will be an ERR_PTR() on error or a valid pointer
+ * to a struct regmap. The regmap will be automatically freed by the
+ * device management code.
+ */
+#define devm_regmap_init_slimbus(slimbus, config)			\
+	__regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config,	\
+				slimbus, config)
 int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk);
 void regmap_mmio_detach_clk(struct regmap *map);
 void regmap_exit(struct regmap *map);
-- 
2.17.0

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

end of thread, other threads:[~2018-05-25 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25 13:50 [PATCH 0/2] regmap: slimbus: minor fixes Srinivas Kandagatla
2018-05-25 13:50 ` [PATCH 1/2] regmap: add missing prototype for devm_init_slimbus Srinivas Kandagatla
2018-05-25 17:36   ` Applied "regmap: add missing prototype for devm_init_slimbus" to the regmap tree Mark Brown
2018-05-25 13:50 ` [PATCH 2/2] regmap: slimbus: allow register offsets up to 16 bits Srinivas Kandagatla
2018-05-25 17:36   ` Applied "regmap: slimbus: allow register offsets up to 16 bits" to the regmap tree Mark Brown

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.