From patchwork Sun Jan 22 12:19:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92150 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp803804qgi; Sun, 22 Jan 2017 04:21:47 -0800 (PST) X-Received: by 10.55.8.12 with SMTP id 12mr21220286qki.74.1485087707179; Sun, 22 Jan 2017 04:21:47 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id z19si8707202qkg.204.2017.01.22.04.21.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 04:21:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cVH9V-0002WQ-Lt; Sun, 22 Jan 2017 12:21:45 +0000 Received: from mail-lf0-f47.google.com ([209.85.215.47]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cVH95-0002Rg-GS for linux-arm-kernel@lists.infradead.org; Sun, 22 Jan 2017 12:21:21 +0000 Received: by mail-lf0-f47.google.com with SMTP id z134so80630062lff.3 for ; Sun, 22 Jan 2017 04:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=JZnVYV1yKmo5kafJkb0ds1+idqsZ+x7JGQf93zPQVZA=; b=bG9wHIK0+zOswYRug5hW6oWM2hJgCnQisbacKSyweaAN3vx+b3YhHnnRgeRGnD8fZ6 8sTnS4H0Q26faEHe8QmYWWHqEpGCwiAbJlRADVTvkc8+iqaqrYTiCvTPSRzpdcF4kxxh 6NQIcFSdGfDMHScULU/eXenlN7HidtIYKbpew= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JZnVYV1yKmo5kafJkb0ds1+idqsZ+x7JGQf93zPQVZA=; b=LMtjgOGRPrp9bBS+TY4w98WovknglDciPJK7vme6At7l8JOT77cPj0qWQd0/tDUcne UpHH8NDb5L3ZF3LFAZVOX58fJdy2VuKjtY9bXYyhq+BlEAOzJybY/Kf22MllW3NJc/fM Uid624IWZz+GA3zjRJ8ynac0Hx9xVQCowGLpg8VNDt5qAMrt12CSCSzVdIIfYYWgiwom Ik8VO/cuSPbFpP0JFbGkCldSFNE/CkSxgBRoWxAOO5yzprxl8m6Sn6sFDX809Xwj3oYs JIzX8ynVMpgiJUqcstYaPwyejMwZPDmXE5rayngUruf/Wxx8i8+6bYXvmdPhjCTRwYxY Jb/g== X-Gm-Message-State: AIkVDXKgzaMQeWQwmLZf+w0JC6gHB5QekbFvRg4Dt+35VFkryIJxrqZ3E5KQR6yP9igDzGsE X-Received: by 10.46.69.139 with SMTP id s133mr10203929lja.56.1485087597477; Sun, 22 Jan 2017 04:19:57 -0800 (PST) Received: from localhost.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id 3sm5358427ljw.23.2017.01.22.04.19.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 04:19:56 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , Alessandro Zummo , Alexandre Belloni Subject: [PATCH 08/22] rtc: Add device tree probing to the Gemini driver Date: Sun, 22 Jan 2017 13:19:50 +0100 Message-Id: <20170122121950.10449-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170122_042119_745982_9CFC3AFC X-CRM114-Status: GOOD ( 16.45 ) X-Spam-Score: -1.5 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.47 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.47 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openwrt-devel@openwrt.org, devicetree@vger.kernel.org, Arnd Bergmann , rtc-linux@googlegroups.com, Linus Walleij , linux-kernel@vger.kernel.org, Janos Laube , Paulius Zaleckas MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This adds bindings and simple probing for the Cortina Systems Gemini SoC RTC. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- RTC maintainers: please just apply this to the RTC tree when you are pleased with it. It is functionally orthogonal to the rest of the series and just in a series for context. --- Documentation/devicetree/bindings/rtc/cortina,gemini.txt | 14 ++++++++++++++ drivers/rtc/rtc-gemini.c | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/cortina,gemini.txt -- 2.9.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Acked-by: Rob Herring diff --git a/Documentation/devicetree/bindings/rtc/cortina,gemini.txt b/Documentation/devicetree/bindings/rtc/cortina,gemini.txt new file mode 100644 index 000000000000..4ce4e794ddbb --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/cortina,gemini.txt @@ -0,0 +1,14 @@ +* Cortina Systems Gemini RTC + +Gemini SoC real-time clock. + +Required properties: +- compatible : Should be "cortina,gemini-rtc" + +Examples: + +rtc@45000000 { + compatible = "cortina,gemini-rtc"; + reg = <0x45000000 0x100>; + interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; +}; diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c index 688debc14348..ccf0dbadb62d 100644 --- a/drivers/rtc/rtc-gemini.c +++ b/drivers/rtc/rtc-gemini.c @@ -159,9 +159,16 @@ static int gemini_rtc_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id gemini_rtc_dt_match[] = { + { .compatible = "cortina,gemini-rtc" }, + { } +}; +MODULE_DEVICE_TABLE(of, gemini_rtc_dt_match); + static struct platform_driver gemini_rtc_driver = { .driver = { .name = DRV_NAME, + .of_match_table = gemini_rtc_dt_match, }, .probe = gemini_rtc_probe, .remove = gemini_rtc_remove,