Thread (1 message) 1 message, 1 author, 2014-07-24

Re: [PATCH RFC 2/2] regulator: twl: Re-add clk32kg to get wifi working

From: Mark Brown <hidden>
Date: 2014-07-24 17:39:26
Also in: linux-arm-kernel

On Thu, Jul 24, 2014 at 05:03:32PM +0200, Stefan Assmann wrote:
OK, here's a first attempt to add a clock driver for the twl6030. Let
me know if this is going the right direction and I'll post a proper
patchset.
Looks reasonable to me, though I'm not a clock expert.  Few comments...
+static int of_twl6030_clk32kg_remove(struct platform_device *pdev)
+{
+	return 0;
+}
Shouldn't need empty functions.
-	ret = regmap_bulk_write(regmap, twl_priv->twl_map[mod_no].base + reg,
-				value, num_bytes);
-
+	if (num_bytes == 1) {
+		ret = regmap_write(regmap,
+				   twl_priv->twl_map[mod_no].base + reg,
+				   *value);
+	} else {
+		ret = regmap_bulk_write(regmap,
+					twl_priv->twl_map[mod_no].base + reg,
+					value, num_bytes);
+	}
Just always use regmap_raw_write() - for single byte values there is no
difference anyway, bulk_write() only makes a difference if the values
are multi-byte.
-	ret = regmap_bulk_read(regmap, twl_priv->twl_map[mod_no].base + reg,
-			       value, num_bytes);
-
+	if (num_bytes == 1) {
Similarly here.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help