From patchwork Wed Nov 14 07:16:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 1739411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 6627EDF264 for ; Wed, 14 Nov 2012 07:25:39 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYXJ9-0003dL-Qq; Wed, 14 Nov 2012 07:22:48 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TYXGZ-0002HU-2z for linux-arm-kernel@merlin.infradead.org; Wed, 14 Nov 2012 07:20:07 +0000 Received: from newsmtp5.atmel.com ([204.2.163.5] helo=sjogate2.atmel.com) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYXGW-0006kw-9a for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2012 07:20:05 +0000 Received: from penbh01.corp.atmel.com ([10.168.5.31]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id qAE7EZqY008488; Tue, 13 Nov 2012 23:14:44 -0800 (PST) Received: from penmb01.corp.atmel.com ([10.168.5.33]) by penbh01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 14 Nov 2012 15:19:42 +0800 Received: from shaarm01.corp.atmel.com ([10.217.6.34]) by penmb01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 14 Nov 2012 15:19:42 +0800 From: Wenyou Yang To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/11] watchdog/at91sam9_wdt: add support to device tree Date: Wed, 14 Nov 2012 15:16:07 +0800 Message-Id: <1352877369-19740-10-git-send-email-wenyou.yang@atmel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1352877369-19740-1-git-send-email-wenyou.yang@atmel.com> References: <1352877369-19740-1-git-send-email-wenyou.yang@atmel.com> X-OriginalArrivalTime: 14 Nov 2012 07:19:42.0322 (UTC) FILETIME=[6A6EDD20:01CDC238] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121114_072004_814317_2927CE09 X-CRM114-Status: GOOD ( 11.08 ) X-Spam-Score: 0.5 (/) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (0.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-watchdog@vger.kernel.org, JM.Lin@atmel.com, nicolas.ferre@atmel.com, linux-kernel@vger.kernel.org, rob.herring@calxeda.com, wenyou.yang@atmel.com, grant.likely@secretlab.ca, wim@iguana.be, plagnioj@jcrosoft.com, devicetree-discuss@lists.ozlabs.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Signed-off-by: Wenyou Yang Cc: grant.likely@secretlab.ca Cc: rob.herring@calxeda.com Cc: devicetree-discuss@lists.ozlabs.org --- drivers/watchdog/at91sam9_wdt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index e7ce9ea..cba5c5d 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "at91sam9_wdt.h" @@ -251,12 +252,21 @@ static int __exit at91wdt_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id at91wdt_match[] = { + { .compatible = "atmel,at91sam-wdt" }, + {}, +}; +MODULE_DEVICE_TABLE(of, at91wdt_match); +#endif + static struct platform_driver at91wdt_driver = { .probe = at91wdt_probe, .remove = __exit_p(at91wdt_remove), .driver = { .name = "at91_wdt", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(at91wdt_match), }, };