RE: [PATCH v12 4/9] dt-bindings: clock: Add bindings for SP7021 clock driver

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

 



> > diff --git a/include/dt-bindings/clock/sp-sp7021.h b/include/dt-bindings/clock/sp-sp7021.h
> > new file mode 100644
> > index 000000000..45dac6de8
> > --- /dev/null
> > +++ b/include/dt-bindings/clock/sp-sp7021.h
> > @@ -0,0 +1,112 @@
> > +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> > +/*
> > + * Copyright (C) Sunplus Technology Co., Ltd.
> > + *       All rights reserved.
> > + */
> > +#ifndef _DT_BINDINGS_CLOCK_SUNPLUS_SP7021_H
> > +#define _DT_BINDINGS_CLOCK_SUNPLUS_SP7021_H
> > +
> > +#define XTAL			27000000
> > +
> > +/* plls */
> > +#define PLL_A			0
> > +#define PLL_E			1
> > +#define PLL_E_2P5		2
> > +#define PLL_E_25		3
> > +#define PLL_E_112P5		4
> > +#define PLL_F			5
> > +#define PLL_TV			6
> > +#define PLL_TV_A		7
> > +#define PLL_SYS			8
> > +
> > +/* gates: mo_clken0 ~ mo_clken9 */
> > +#define CLK_SYSTEM		0x10
> > +#define CLK_RTC			0x12
> 
> YAML looks ok, but here comment from Arnd also applies. These should be
> regular decimal numbers incremented by one.
> 
> Best regards,
> Krzysztof

Yes, same as reset driver, these defines also mapping the hardware.
But different from reset driver, clk driver also used these defines.
If I removed this defines, I  must write the proper hardware number twice in dt & driver.
It's meaningless & hard to check.








[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