Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1210321 > unrolled thread

[PATCH v2 5/5] regmap: No multi_write support if bus->write does not exist

Started byMarkus Pargmann <mpa@pengutronix.de>
First post2015-08-20 11:20 +0200
Last post2015-08-20 20:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 5/5] regmap: No multi_write support if bus->write does not exist Markus Pargmann <mpa@pengutronix.de> - 2015-08-20 11:20 +0200
    Re: [PATCH v2 5/5] regmap: No multi_write support if bus->write does  not exist Mark Brown <broonie@kernel.org> - 2015-08-20 20:40 +0200

#1210321 — [PATCH v2 5/5] regmap: No multi_write support if bus->write does not exist

FromMarkus Pargmann <mpa@pengutronix.de>
Date2015-08-20 11:20 +0200
Subject[PATCH v2 5/5] regmap: No multi_write support if bus->write does not exist
Message-ID<pZuaR-wx-1@gated-at.bofh.it>
There is no multi_write support available if we cannot use raw_write.
This is the case if bus->write is not implemented.

This patch adds a condition that we need bus and bus->write so that
can_multi_write is true.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/base/regmap/regmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 66efe25d64c9..d43723bb3257 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -575,7 +575,7 @@ struct regmap *regmap_init(struct device *dev,
 		map->reg_stride = 1;
 	map->use_single_read = config->use_single_rw || !bus || !bus->read;
 	map->use_single_write = config->use_single_rw || !bus || !bus->write;
-	map->can_multi_write = config->can_multi_write;
+	map->can_multi_write = config->can_multi_write && bus && bus->write;
 	map->dev = dev;
 	map->bus = bus;
 	map->bus_context = bus_context;
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1210672 — Re: [PATCH v2 5/5] regmap: No multi_write support if bus->write does not exist

FromMark Brown <broonie@kernel.org>
Date2015-08-20 20:40 +0200
SubjectRe: [PATCH v2 5/5] regmap: No multi_write support if bus->write does not exist
Message-ID<pZCUN-4Dv-9@gated-at.bofh.it>
In reply to#1210321

[Multipart message — attachments visible in raw view] — view raw

On Thu, Aug 20, 2015 at 11:12:36AM +0200, Markus Pargmann wrote:
> There is no multi_write support available if we cannot use raw_write.
> This is the case if bus->write is not implemented.
> 
> This patch adds a condition that we need bus and bus->write so that
> can_multi_write is true.

This is fine but doesn't apply (I guess it has a depedency on one of the
earlier patches).

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web