From: Sebastian Reichel <sre@kernel.org>
To: Moritz Fischer <moritz.fischer@ettus.com>
Cc: dbaryshkov@gmail.com, dwmw2@infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] power: reset: Add generic SYSCON register mapped poweroff.
Date: Wed, 11 Mar 2015 02:39:31 +0100 [thread overview]
Message-ID: <20150311013931.GA1017@earth> (raw)
In-Reply-To: <1426029670-31775-2-git-send-email-moritz.fischer@ettus.com>
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
Hi,
On Tue, Mar 10, 2015 at 04:21:09PM -0700, Moritz Fischer wrote:
> Add a generic SYSCON register mapped poweroff mechanism.
Driver looks mostly fine.
> [...]
> +#ifdef CONFIG_OF
> +static const struct of_device_id syscon_poweroff_of_match[] = {
> + { .compatible = "syscon-poweroff" },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, syscon_poweroff_of_match);
> +#endif
You can remove the #ifdef, since the driver depends on OF.
> +static struct platform_driver syscon_poweroff_driver = {
> + .probe = syscon_poweroff_probe,
You should set pm_power_off = NULL in .remove
> + .driver = {
> + .name = "syscon-poweroff",
> + .of_match_table = syscon_poweroff_of_match,
This would fail for !CONFIG_OF. If the driver has optional OF
support you should use of_match_ptr(syscon_poweroff_of_match),
which is a preprocessor macro returning NULL for !CONFIG_OF.
> + },
> +};
> +module_platform_driver(syscon_poweroff_driver);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Moritz Fischer <moritz.fischer@ettus.com>");
> +MODULE_DESCRIPTION("Generic SYSCON poweroff driver");
> +MODULE_ALIAS("platform:syscon-poweroff");
> --
> 1.9.3
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-11 1:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 23:21 [PATCH 0/2] Add support for generic register mapped poweroff Moritz Fischer
[not found] ` <1426029670-31775-1-git-send-email-moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
2015-03-10 23:21 ` [PATCH 1/2] power: reset: Add generic SYSCON " Moritz Fischer
2015-03-10 23:21 ` Moritz Fischer
2015-03-11 1:39 ` Sebastian Reichel [this message]
2015-03-11 9:31 ` Paul Bolle
2015-03-11 22:00 ` Moritz Fischer
2015-03-11 23:18 ` Paul Bolle
2015-03-12 0:52 ` Moritz Fischer
2015-03-10 23:21 ` [PATCH 2/2] dt: power: Add docs for generic SYSCON poweroff driver Moritz Fischer
2015-03-10 23:23 ` Moritz Fischer
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=20150311013931.GA1017@earth \
--to=sre@kernel.org \
--cc=dbaryshkov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=moritz.fischer@ettus.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.