lkml.org 
[lkml]   [2018]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 18/41] clk: davinci: New driver for TI DA8XX CFGCHIP clocks
From
Date
On Saturday 20 January 2018 10:43 PM, David Lechner wrote:
> +static const struct clk_ops da8xx_cfgchip_div4p5_clk_ops = {
> + .enable = da8xx_cfgchip_gate_clk_enable,
> + .disable = da8xx_cfgchip_gate_clk_disable,
> + .is_enabled = da8xx_cfgchip_gate_clk_is_enabled,

I assume the reason for not using clk-gate.c is lack of regmap support
there?

> + .recalc_rate = da8xx_cfgchip_div4p5_recalc_rate,
> +};
> +
> +static struct clk * __init
> +da8xx_cfgchip_gate_clk_register(const struct da8xx_cfgchip_gate_clk_info *info,
> + const char *parent_name,
> + struct regmap *regmap)
> +{
> + struct da8xx_cfgchip_gate_clk *gate;
> + struct clk_init_data init;
> +
> + gate = kzalloc(sizeof(*gate), GFP_KERNEL);
> + if (!gate)
> + return ERR_PTR(-ENOMEM);
> +
> + init.name = info->name;
> + if (info->flags & DA8XX_GATE_CLOCK_IS_DIV4P5)
> + init.ops = &da8xx_cfgchip_div4p5_clk_ops;
> + else
> + init.ops = &da8xx_cfgchip_gate_clk_ops;

This will be easier to read using ternary operator, I think. But you
will probably have line breaks.

Thanks,
Sekhar

\
 
 \ /
  Last update: 2018-02-02 14:20    [W:0.281 / U:3.880 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site