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

Mark Brown broonie at kernel.org
Thu Jul 24 10:39:26 PDT 2014


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140724/628077f5/attachment.sig>


More information about the linux-arm-kernel mailing list