Re: [PATCH 2/2] clk: add 74aup1g157gw 2-input multiplexer as clock driver
From: Kuninori Morimoto
Date: Thu Oct 11 2018 - 20:37:43 EST
Hi Stephen
Thank you for your feedback
> > diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> > index 292056b..9cfeb0e 100644
> > --- a/drivers/clk/Kconfig
> > +++ b/drivers/clk/Kconfig
> > @@ -299,5 +299,6 @@ source "drivers/clk/sunxi-ng/Kconfig"
> > source "drivers/clk/tegra/Kconfig"
> > source "drivers/clk/ti/Kconfig"
> > source "drivers/clk/uniphier/Kconfig"
> > +source "drivers/clk/nxp/Kconfig"
>
> Please sort this alphabetically.
Will do
> > obj-$(CONFIG_ARCH_MXS) += mxs/
> > -obj-$(CONFIG_COMMON_CLK_NXP) += nxp/
> > +obj-y += nxp/
>
> There's the CONFIG_COMMON_CLK_NXP config symbol that could go into the
> drivers/clk/nxp/Kconfig file then and also wrap the Makefile contents in
> the nxp subdirectory too? We don't want to lose that config option and
> start enabling this driver all the time.
OK, will do
> Nitpick: This macro is just obfuscating, there isn't any container_of()
> usage going on so please remove it.
(snip)
> Nitpick: This macros isn't making things any shorter, so please remove
> it.
will fix
> > +static const struct clk_ops clk74_ops = {
> > + .set_rate = clk74_set_rate,
> > + .round_rate = clk74_round_rate,
> > + .recalc_rate = clk74_recalc_rate,
> > + .get_parent = clk74_get_parent,
> > +};
>
> Can this all be handled by the 'gpio-mux-clock' compatible/driver? I
> suppose it may need an update to add the rounding policy that you want
> via some sort of DT property, but otherwise it would be fine?
Hmm.. not sure.
If we can add new feature (= .round_rate ?) on gpio-mux-clock,
I can consider it.
> You mean -ENOMEM?
(snip)
> Please return actual error code instead of overriding and returning
> probe defer.
(snip)
> Please return the actual error.
(snip)
> Please remove noise like this.
(snip)
> Nitpick: I'd prefer to not have the macro.
will fix
Best regards
---
Kuninori Morimoto