On Mon, Jan 22, 2024 at 4:29 PM Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote: > > On 22/01/2024 09:06, Jingbao Qiu wrote: > > Implement the RTC driver for CV1800, which able to provide time alarm > > and calibrate functionality. > > > > Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@xxxxxxxxx> > > --- > > > > Depends on https://lore.kernel.org/all/IA1PR20MB4953C774D41EDF1EADB6EC18BB6D2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ > > > > Why? > > How could a RTC driver depend on clock driver or clock bindings? This > looks wrong and it prevents your driver being merged via easy path. Thanks,I will fix it. > > > diff --git a/drivers/rtc/rtc-cv1800.c b/drivers/rtc/rtc-cv1800.c > > new file mode 100644 > > index 000000000000..fbf2e575ea94 > > --- /dev/null > > +++ b/drivers/rtc/rtc-cv1800.c > > @@ -0,0 +1,406 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +/* > > + * rtc-cv1800.c: RTC driver for Sophgo cv1800 RTC > > + * > > + * Author: Jingbao Qiu <qiujingbao.dlmu@xxxxxxxxx> > > + */ > > +#include <linux/kernel.h> > > +#include <linux/clk.h> > > +#include <linux/module.h> > > +#include <linux/irq.h> > > +#include <linux/delay.h> > > +#include <linux/rtc.h> > > +#include <linux/platform_device.h> > > +#include <linux/mfd/syscon.h> > > Drop Thanks, I will do that. > > > +#include <linux/regmap.h> > > +#include <linux/of.h> > > Keep the includes sorted, prefferably alphabetically. Thank you for your suggestion.I will do that. > > ... > > > + > > +static int cv1800_rtc_probe(struct platform_device *pdev) > > +{ > > + struct cv1800_rtc_priv *rtc; > > + uint32_t ctrl_val; > > + void __iomem *base; > > + int ret; > > + > > + rtc = devm_kzalloc(&pdev->dev, sizeof(struct cv1800_rtc_priv), > > sizeof(*) I will do that. > > > + GFP_KERNEL); > > + if (!rtc) > > + return -ENOMEM; > > + > > + base = devm_platform_ioremap_resource(pdev, 0); > > + if (IS_ERR(base)) > > + return PTR_ERR(base); > > + > > + rtc->rtc_map = > > Unneeded blank line. Don't wrap at =. Thanks, I will do that. Best regards, Jingbao QIu