Re: [PATCH 10/16] clk: sunxi-ng: Add M-P factor clock support

Maxime Ripard
2016-05-24T21:07:33Z

[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]

Hi,

On Tue, May 24, 2016 at 12:14:09PM +0800, Chen-Yu Tsai wrote:
> >> > +#define SUNXI_CCU_MP_WITH_MUX_GATE(_struct, _name, _parents, _reg, \
> >>
> >> We could merge _struct with _name ...
> >>
> >> > + _mshift, _mwidth, \
> >> > + _pshift, _pwidth, \
> >> > + _muxshift, _muxwidth, \
> >> > + _gate, _flags) \
> >> > + struct ccu_mp _struct = { \
> >>
> >> and have struct ccu_mp _name##_clk = {
> >
> > Unfortunately, that prevents to use dashes as clock names, which is
> > something we've done in the past. Having a separate name allows us to
> > use whatever we want.
>
> We could do some replacement in the register function, but that seems
> hackish

Indeed

> Also I noticed we aren't using clock-output-names from the DT
> anymore?

Yep, there's just too many clocks to be practical, and you have to
have the name in the source code anyway for the parenting
relationships.

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]