From patchwork Mon Jan 21 00:46:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 2008941 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4894C3FD1A for ; Mon, 21 Jan 2013 00:47:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752585Ab3AUAq5 (ORCPT ); Sun, 20 Jan 2013 19:46:57 -0500 Received: from mail-da0-f54.google.com ([209.85.210.54]:63826 "EHLO mail-da0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752495Ab3AUAq4 (ORCPT ); Sun, 20 Jan 2013 19:46:56 -0500 Received: by mail-da0-f54.google.com with SMTP id n2so2453130dad.41 for ; Sun, 20 Jan 2013 16:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:sender:message-id:to:cc:from:subject:mime-version :content-type; bh=Y/WH8JLTlAvg7b3B4DWAJo72gdN/2fJH7ZSKX8dKZpI=; b=u0nB1PgnqtuvFfFbtFgpCulW5bmIvf4bg3jVhFSnjzWBE8aMyEfEivIF8oFZJ3uUd2 5P3qbZ4is3AgLabMjs7XBRzcFNBesXOXuBGzsACyzA/YBJRNaw7ADlzQA/5QABoTcCK0 wST6SeAh7hwLZ91nIvDNSmBlYBXpvh9qvMxhPMUgNWRYy8wNn2yGNaLz1QQnyishoW+r 6QJUHwL5yI6V164HYq44RwBZetqVnjlF5Gw39WOA4cx4yfeE/VkexJFcecaBNe7nKYPn 8dJtci8bBPMS6DshB/EjzJGQaBFz1SsRQ7SPJ7X3czOpBYg7UHIFk5K9Zvnw2UeltHyG o08Q== X-Received: by 10.68.130.161 with SMTP id of1mr45091736pbb.32.1358729215795; Sun, 20 Jan 2013 16:46:55 -0800 (PST) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPS id ix9sm7565230pbc.7.2013.01.20.16.46.53 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 20 Jan 2013 16:46:55 -0800 (PST) Date: Sun, 20 Jan 2013 16:46:55 -0800 (PST) Message-ID: <87a9s3pdl1.wl%kuninori.morimoto.gx@renesas.com> To: Zhang Rui Cc: Simon , Magnus , linux-pm@vger.kernel.org, Kuninori Morimoto From: Kuninori Morimoto Subject: [PATCH] thermal: rcar: add Device Tree support MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Support for loading the Renesas R-Car thermal module via devicetree. Signed-off-by: Kuninori Morimoto --- .../devicetree/bindings/thermal/rcar-thermal.txt | 12 ++++++++++++ drivers/thermal/rcar_thermal.c | 7 +++++++ 2 files changed, 19 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..7e0cbf6 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt @@ -0,0 +1,12 @@ +* Renesas R-Car Thermal + +Required properties: +- compatible : "renesas,rcar-thermal" +- reg : Address range of the thermal registers + +Example: + +thermal@e61f0100 { + compatible = "renesas,rcar-thermal"; + reg = <0xe61f0100 0x38>; +}; diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 90db951..cb03aaf 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -235,9 +235,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); + 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,