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.
signature.asc
Description: Digital signature
