From patchwork Tue Jun 26 08:35:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 167338 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ob0-f184.google.com (mail-ob0-f184.google.com [209.85.214.184]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 48EFA1007DA for ; Tue, 26 Jun 2012 18:35:49 +1000 (EST) Received: by obbwc20 with SMTP id wc20sf4774575obb.11 for ; Tue, 26 Jun 2012 01:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:x-forefront-antispam-report:x-spamscore :x-bigfish:x-fb-domain-ip-match:from:to:cc:subject:date:message-id :x-mailer:mime-version:x-originatororg:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=h6rcwThz+A4etvhrUN4YhkAZpEzgcr3ceksDdRk623U=; b=FBMV2Fx83F0YVe2QVoGK9S55MjUVS3mc+RwC2j/J1s3cjvsgDCNgY8lPh0Slkroda9 kGKsTpLid9iY/E+STEoDzxn6f6UkTkfkZxCcrQz3ThBRLPR+zGIJC7p5ej3xWoiUM6b0 wn6Tpw0jNi6m6IZt8zU79OguEiriw9lbho2gc= Received: by 10.50.242.7 with SMTP id wm7mr941465igc.3.1340699747044; Tue, 26 Jun 2012 01:35:47 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.155.201 with SMTP id vy9ls2937225igb.4.gmail; Tue, 26 Jun 2012 01:35:46 -0700 (PDT) Received: by 10.42.172.65 with SMTP id m1mr9932932icz.6.1340699746556; Tue, 26 Jun 2012 01:35:46 -0700 (PDT) Received: by 10.42.172.65 with SMTP id m1mr9932931icz.6.1340699746546; Tue, 26 Jun 2012 01:35:46 -0700 (PDT) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe005.messaging.microsoft.com. [216.32.181.185]) by gmr-mx.google.com with ESMTPS id k13si595098igc.1.2012.06.26.01.35.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jun 2012 01:35:46 -0700 (PDT) Received-SPF: neutral (google.com: 216.32.181.185 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=216.32.181.185; Received: from mail179-ch1-R.bigfish.com (10.43.68.253) by CH1EHSOBE007.bigfish.com (10.43.70.57) with Microsoft SMTP Server id 14.1.225.23; Tue, 26 Jun 2012 08:34:05 +0000 Received: from mail179-ch1 (localhost [127.0.0.1]) by mail179-ch1-R.bigfish.com (Postfix) with ESMTP id 4699422022D; Tue, 26 Jun 2012 08:34:05 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 3 X-BigFish: VS3(zcb8kzzz1202hzz8275bh8275dhz2dh87h2a8h668h839hd24he5bhe96hf0ah) X-FB-DOMAIN-IP-MATCH: fail Received: from mail179-ch1 (localhost.localdomain [127.0.0.1]) by mail179-ch1 (MessageSwitch) id 134069964337266_14455; Tue, 26 Jun 2012 08:34:03 +0000 (UTC) Received: from CH1EHSMHS004.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.240]) by mail179-ch1.bigfish.com (Postfix) with ESMTP id F084E40048; Tue, 26 Jun 2012 08:34:02 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS004.bigfish.com (10.43.70.4) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 26 Jun 2012 08:34:03 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.298.5; Tue, 26 Jun 2012 03:35:42 -0500 Received: from S2101-09.ap.freescale.net ([10.192.185.20]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q5Q8ZZSn009775; Tue, 26 Jun 2012 01:35:36 -0700 From: Shawn Guo To: CC: Marek Vasut , Alessandro Zummo , , Grant Likely , , Shawn Guo Subject: [rtc-linux] [PATCH v3] rtc: stmp3xxx: Add simple binding for the stmp3xxx-rtc Date: Tue, 26 Jun 2012 16:35:26 +0800 Message-ID: <1340699726-7852-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com X-Original-Sender: shawn.guo@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 216.32.181.185 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , From: Marek Vasut Signed-off-by: Marek Vasut Cc: Alessandro Zummo Cc: devicetree-discuss@lists.ozlabs.org Cc: Grant Likely Cc: rtc-linux@googlegroups.com Acked-by: Rob Herring Signed-off-by: Shawn Guo --- Changes since v2: * Back out the dts changes from the patch, so that it could be merged through rtc tree if that's the case. * The first interrupt has to be rtc alarm interrupt, and that's the only one that driver tries to get. Fix binding document for that. .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 16 ++++++++++++++++ drivers/rtc/rtc-stmp3xxx.c | 8 ++++++++ 2 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file mode 100644 index 0000000..b800070 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt @@ -0,0 +1,16 @@ +* STMP3xxx/i.MX28 Time Clock controller + +Required properties: +- compatible: should be one of the following. + * "fsl,stmp3xxx-rtc" +- reg: physical base address of the controller and length of memory mapped + region. +- interrupts: rtc alarm interrupt + +Example: + +rtc@80056000 { + compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; + reg = <0x80056000 2000>; + interrupts = <29>; +}; diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c index 1028786..739ef556 100644 --- a/drivers/rtc/rtc-stmp3xxx.c +++ b/drivers/rtc/rtc-stmp3xxx.c @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -265,6 +266,12 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev) #define stmp3xxx_rtc_resume NULL #endif +static const struct of_device_id rtc_dt_ids[] = { + { .compatible = "fsl,stmp3xxx-rtc", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, rtc_dt_ids); + static struct platform_driver stmp3xxx_rtcdrv = { .probe = stmp3xxx_rtc_probe, .remove = stmp3xxx_rtc_remove, @@ -273,6 +280,7 @@ static struct platform_driver stmp3xxx_rtcdrv = { .driver = { .name = "stmp3xxx-rtc", .owner = THIS_MODULE, + .of_match_table = rtc_dt_ids, }, };