All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Moritz Fischer <moritz.fischer@ettus.com>
Cc: sre@kernel.org, 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 10:31:12 +0100	[thread overview]
Message-ID: <1426066272.4244.37.camel@x220> (raw)
In-Reply-To: <1426029670-31775-2-git-send-email-moritz.fischer@ettus.com>

On Tue, 2015-03-10 at 16:21 -0700, Moritz Fischer wrote:
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
 
> +config POWER_RESET_SYSCON_POWEROFF
> +	bool "Generic SYSCON regmap poweroff driver"

This adds a bool symbol.

> +	depends on OF
> +	select MFD_SYSCON
> +	help
> +	  Poweroff support for generic SYSCON mapped register poweroff.
> +

> --- a/drivers/power/reset/Makefile
> +++ b/drivers/power/reset/Makefile

> +obj-$(CONFIG_POWER_RESET_SYSCON_POWEROFF) += syscon-poweroff.o

So this objectfile can never be part of a module.

> --- /dev/null
> +++ b/drivers/power/reset/syscon-poweroff.c
> @@ -0,0 +1,97 @@
> +/*
> + * Generic Syscon Poweroff Driver
> + *
> + * Copyright (c) 2015, National Instruments Corp.
> + * Author: Moritz Fischer <moritz.fischer@ettus.com>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */

> +#include <linux/module.h>

Is that include needed?

> +MODULE_DEVICE_TABLE(of, syscon_poweroff_of_match);

This will be preprocessed away.

> +module_platform_driver(syscon_poweroff_driver);

I think the built-in equivalent of this would be adding a wrapper that
only does
    platform_driver_register(&syscon_poweroff_driver);

and have that wrapper be marked with device_initcall(). Apparently
there's no macro that does all that in one line.

> +MODULE_LICENSE("GPL v2");

You probably meant
    MODULE_LICENSE("GPL");

> +MODULE_AUTHOR("Moritz Fischer <moritz.fischer@ettus.com>");
> +MODULE_DESCRIPTION("Generic SYSCON poweroff driver");
> +MODULE_ALIAS("platform:syscon-poweroff");

But these four macros will all be effectively preprocessed away, anyhow.


Paul Bolle

  parent reply	other threads:[~2015-03-11  9:31 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
2015-03-11  9:31     ` Paul Bolle [this message]
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=1426066272.4244.37.camel@x220 \
    --to=pebolle@tiscali.nl \
    --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 \
    --cc=sre@kernel.org \
    /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.