From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: 施錕鴻 <vincent.sunplus@gmail.com>
Cc: linux-kernel@vger.kernel.org, robh+dt@kernel.org,
devicetree@vger.kernel.org, wells.lu@sunplus.com
Subject: Re: [PATCH v2 1/2] nvmem: Add driver for OCOTP in Sunplus SP7021
Date: Tue, 14 Dec 2021 09:08:11 +0000 [thread overview]
Message-ID: <36d17f8b-2480-6c1d-fe84-d4bd04e4170f@linaro.org> (raw)
In-Reply-To: <CAPvp3RgqQ_M9rXfkWFTC5zOgk7OUGO1=o8wDjxiB+5wMPoS_Rg@mail.gmail.com>
On 10/12/2021 08:50, 施錕鴻 wrote:
>
> > +
> > +static const struct of_device_id sp_ocotp_dt_ids[] = {
> > + { .compatible = "sunplus,sp7021-ocotp", .data = &sp_otp_v0 },
> > + { }
> > +};
> > +MODULE_DEVICE_TABLE(of, sp_ocotp_dt_ids);
> > +
> > +static struct platform_driver sp_otp_driver = {
> > + .probe = sp_ocotp_probe,
> > + .driver = {
> > + .name = "sunplus,sp7021-ocotp",
> > + .of_match_table = sp_ocotp_dt_ids,
> > + }
> > +};
> > +
> > +static int __init sp_otp0_drv_new(void)
> > +{
> > + return platform_driver_register(&sp_otp_driver);
> > +}
> > +subsys_initcall(sp_otp0_drv_new);
>
> Why this needs to be subsys_initcall() why can't it be module_init?
>
> The OTP driver will store the mac address for ethernet driver and usb2
> disconnect voltage
> for usb2 one. Therefore the order of the OTP driver should take higher
> priority over the
> other ones.
drivers that are looking for mac address or other values from nvmem
should get an EPROBE_DEFER if nvmem provider is not ready.
does that not work for you?
--srini
next prev parent reply other threads:[~2021-12-14 9:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 8:53 [PATCH v2 0/2] " Vincent Shih
2021-12-07 8:53 ` [PATCH v2 1/2] nvmem: " Vincent Shih
2021-12-09 15:50 ` Srinivas Kandagatla
2021-12-13 6:45 ` 施錕鴻
[not found] ` <CAPvp3RgqQ_M9rXfkWFTC5zOgk7OUGO1=o8wDjxiB+5wMPoS_Rg@mail.gmail.com>
2021-12-14 9:08 ` Srinivas Kandagatla [this message]
2021-12-15 9:45 ` 施錕鴻
2021-12-07 8:53 ` [PATCH v2 2/2] dt-bindings: nvmem: Add bindings doc for Sunplus OCOTP driver Vincent Shih
2021-12-13 23:17 ` Rob Herring
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=36d17f8b-2480-6c1d-fe84-d4bd04e4170f@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=vincent.sunplus@gmail.com \
--cc=wells.lu@sunplus.com \
/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
all inboxes | Powered by JetHome®