From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 1/2] ARM: babbage: Make PMIC initialization shareable
Date: Tue, 19 Jun 2018 09:55:02 -0700 [thread overview]
Message-ID: <CAHQ1cqHsVi8pftSbWB8dGQm_ZnxUt+ua2CDqiGUF0q3_AGGn2w@mail.gmail.com> (raw)
In-Reply-To: <1529398268.7211.9.camel@pengutronix.de>
On Tue, Jun 19, 2018 at 1:51 AM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> Am Montag, den 18.06.2018, 22:43 -0700 schrieb Andrey Smirnov:
> > Some board designs copy i.MX51 Babbadge board's PMIC design and so
> > require exactly the same initialization. Move correspoding code into a
> > separate file, add new compatiblity string and make appropriate
> > Kconfig change to allow other boards to share that code.
> >
> > > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > ---
>
> [...]
>
> > +static int imx51_babbage_power_init(void)
> > +{
> > > + if (!of_machine_is_compatible("fsl,imx51-babbage") &&
> > > + !of_machine_is_compatible("fsl,imx51-babbage-power"))
> > > + return 0;
> > +
> > > + mc13xxx_register_init_callback(babbage_power_init);
>
> I think it would be better for the board code to explicitly call this
> setup function. Gating this by DT compatible is a bit too much magic.
>
Where do you see magic here? There's nothing unusual in gating board
initialization code on "compatible", it's used all over the place. And
having multiple level of compatibility one of the intended use-cases
of "compatible" property.
Thanks,
Andrey Smirnov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-06-19 16:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 5:43 Andrey Smirnov
2018-06-19 5:43 ` [PATCH 2/2] ARM: i.MX: Add support for ZII RDU1 board Andrey Smirnov
2018-06-19 8:51 ` Lucas Stach
2018-06-19 11:34 ` Nikita Yushchenko
2018-06-19 12:42 ` Lucas Stach
2018-06-19 16:24 ` Andrey Smirnov
2018-06-19 8:51 ` [PATCH 1/2] ARM: babbage: Make PMIC initialization shareable Lucas Stach
2018-06-19 16:55 ` Andrey Smirnov [this message]
2018-06-20 7:16 ` Sascha Hauer
2018-06-20 18:13 ` Andrey Smirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHQ1cqHsVi8pftSbWB8dGQm_ZnxUt+ua2CDqiGUF0q3_AGGn2w@mail.gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=l.stach@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox