linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] regmap: cache: Fall back to register by register read for cache defaults
@ 2016-03-07 12:55 Clemens Gruber
  2016-03-08  2:09 ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Clemens Gruber @ 2016-03-07 12:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, Fabio Estevam

On Mon, Feb 01, 2016 at 21:41:39PM +0000, Mark Brown wrote:
> Competely untested, hopefully it helps fix the issues with the SSI.

Tested-by: Clemens Gruber <clemens.gruber@pqgruber.com>

This patch fixes the SSI issues with the SGTL5000 on my i.MX6Q board,
which appeared in the 4.5 development cycle.

Do you think this one can still go into Linus' tree before the 4.5
release?

Thanks,
Clemens

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 1/2] regmap: Return an error if a caller attempts to do an unsupported raw read
@ 2016-02-02 12:16 Fabio Estevam
  2016-02-02 12:16 ` [PATCH 2/2] regmap: cache: Fall back to register by register read for cache defaults Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2016-02-02 12:16 UTC (permalink / raw)
  To: broonie; +Cc: mail, linux-kernel, Fabio Estevam

From: Mark Brown <broonie@kernel.org>

regmaps without raw I/O access can't implement raw I/O operations,
return an error if someone tries to do that rather than crashing.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 drivers/base/regmap/regmap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 3432634..e2f6880 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2255,6 +2255,9 @@ static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
 
 	WARN_ON(!map->bus);
 
+	if (!map->bus || !map->bus->read)
+		return -EINVAL;
+
 	range = _regmap_range_lookup(map, reg);
 	if (range) {
 		ret = _regmap_select_page(map, &reg, range,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH 1/2] regmap: Return an error if a caller attempts to do an unsupported raw read
@ 2016-02-01 21:38 Mark Brown
  2016-02-01 21:38 ` [PATCH 2/2] regmap: cache: Fall back to register by register read for cache defaults Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2016-02-01 21:38 UTC (permalink / raw)
  To: mail, Fabio Estevam; +Cc: alsa-devel, nicoleotsuka, linux-kernel, Mark Brown

regmaps without raw I/O access can't implement raw I/O operations,
return an error if someone tries to do that rather than crashing.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/base/regmap/regmap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 343263449aff..e2f68807d970 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2255,6 +2255,9 @@ static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
 
 	WARN_ON(!map->bus);
 
+	if (!map->bus || !map->bus->read)
+		return -EINVAL;
+
 	range = _regmap_range_lookup(map, reg);
 	if (range) {
 		ret = _regmap_select_page(map, &reg, range,
-- 
2.7.0.rc3

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

end of thread, other threads:[~2016-03-08  9:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 12:55 [PATCH 2/2] regmap: cache: Fall back to register by register read for cache defaults Clemens Gruber
2016-03-08  2:09 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2016-02-02 12:16 [PATCH 1/2] regmap: Return an error if a caller attempts to do an unsupported raw read Fabio Estevam
2016-02-02 12:16 ` [PATCH 2/2] regmap: cache: Fall back to register by register read for cache defaults Fabio Estevam
2016-02-01 21:38 [PATCH 1/2] regmap: Return an error if a caller attempts to do an unsupported raw read Mark Brown
2016-02-01 21:38 ` [PATCH 2/2] regmap: cache: Fall back to register by register read for cache defaults Mark Brown
2016-02-01 21:41   ` Mark Brown
2016-02-01 21:58     ` Fabio Estevam
2016-02-01 22:13       ` Mark Brown
2016-02-01 22:54         ` Maciej S. Szmigiero
2016-02-01 23:58           ` Fabio Estevam

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).