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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux