Linux Power Management development
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Simon <horms@verge.net.au>, Magnus <magnus.damm@gmail.com>,
	linux-pm@vger.kernel.org,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Subject: Re: [PATCH 7/7] thermal: rcar: add Device Tree support
Date: Wed, 06 Feb 2013 13:37:27 +0800	[thread overview]
Message-ID: <1360129047.2982.28.camel@rzhang1-mobl4> (raw)
In-Reply-To: <87obg5pvsd.wl%kuninori.morimoto.gx@renesas.com>

On Thu, 2013-01-31 at 01:05 -0800, Kuninori Morimoto wrote:
> Support for loading the Renesas R-Car thermal module via devicetree.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../devicetree/bindings/thermal/rcar-thermal.txt   |   29 ++++++++++++++++++++
>  drivers/thermal/rcar_thermal.c                     |    7 +++++
>  2 files changed, 36 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/thermal/rcar-thermal.txt
> 
> diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
> new file mode 100644
> index 0000000..28ef498
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
> @@ -0,0 +1,29 @@
> +* Renesas R-Car Thermal
> +
> +Required properties:
> +- compatible		: "renesas,rcar-thermal"
> +- reg			: Address range of the thermal registers.
> +			  The 1st reg will be recognized as common register
> +			  if it has "interrupts".
> +
> +Option properties:
> +
> +- interrupts		: use interrupt
> +
> +Example (non interrupt support):
> +
> +thermal@e61f0100 {
> +	compatible = "renesas,rcar-thermal";
> +	reg = <0xe61f0100 0x38>;
> +};
> +
> +Example (interrupt support):
> +
> +thermal@e61f0000 {
> +	compatible = "renesas,rcar-thermal";
> +	reg = <0xe61f0000 0x14
> +		0xe61f0100 0x38
> +		0xe61f0200 0x38
> +		0xe61f0300 0x38>;
> +	interrupts = <0 69 4>;
> +};
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index 80aae3c..3bd8918 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -477,9 +477,16 @@ static int rcar_thermal_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static const struct of_device_id rcar_thermal_dt_ids[] __devinitconst = {
> +	{ .compatible = "renesas,rcar-thermal", },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, rcar_thermal_dt_ids);
> +
you do not need 
#ifdef CONFIG_OF
here?

thanks,
rui
>  static struct platform_driver rcar_thermal_driver = {
>  	.driver	= {
>  		.name	= "rcar_thermal",
> +		.of_match_table = rcar_thermal_dt_ids,
>  	},
>  	.probe		= rcar_thermal_probe,
>  	.remove		= rcar_thermal_remove,



  reply	other threads:[~2013-02-06  5:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  9:02 [PATCH 0/7] thermal: rcar: add interrupt and DT support Kuninori Morimoto
2013-01-31  9:02 ` [PATCH 1/7] thermal: rcar: use parenthesis on macro Kuninori Morimoto
2013-01-31  9:03 ` [PATCH 2/7] thermal: rcar: enable CPCTL to use hardware TSC deciding Kuninori Morimoto
2013-01-31  9:03 ` [PATCH 3/7] thermal: rcar: use mutex lock instead of spin lock Kuninori Morimoto
2013-01-31  9:03 ` [PATCH 4/7] thermal: rcar: multi channel support Kuninori Morimoto
2013-01-31  9:03 ` [PATCH 5/7] thermal: rcar: add read/write functions for common/priv data Kuninori Morimoto
2013-01-31  9:04 ` [PATCH 6/7] thermal: rcar: add interrupt support Kuninori Morimoto
2013-01-31  9:05 ` [PATCH 7/7] thermal: rcar: add Device Tree support Kuninori Morimoto
2013-02-06  5:37   ` Zhang Rui [this message]
2013-02-06  8:30     ` Kuninori Morimoto
2013-02-06  8:36       ` Zhang Rui
2013-02-06  8:37         ` Kuninori Morimoto
2013-01-31  9:26 ` [PATCH 8/7] thermal: rcar: remove machine_power_off() from rcar_thermal_notify() Kuninori Morimoto
2013-02-06  5:48 ` [PATCH 0/7] thermal: rcar: add interrupt and DT support Zhang Rui

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=1360129047.2982.28.camel@rzhang1-mobl4 \
    --to=rui.zhang@intel.com \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=magnus.damm@gmail.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