From patchwork Fri Jun 24 09:18:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9197123 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ACE5B60754 for ; Fri, 24 Jun 2016 09:22:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C9D520649 for ; Fri, 24 Jun 2016 09:22:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 917BB2849B; Fri, 24 Jun 2016 09:22:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F2D020649 for ; Fri, 24 Jun 2016 09:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751624AbcFXJVl (ORCPT ); Fri, 24 Jun 2016 05:21:41 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:35754 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751537AbcFXJSR (ORCPT ); Fri, 24 Jun 2016 05:18:17 -0400 Received: by mail-wm0-f50.google.com with SMTP id v199so14782102wmv.0 for ; Fri, 24 Jun 2016 02:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+t6SiX3Q7QC6x3l0ZiZvuSdsDjTooQrhI3oP79fbW6w=; b=sQEQYcvam9R29sEHAB4q6bPS4Fjx28wWNcom2ZXeOUv1V2t8HoF04GJweAj7+k8vpt U6twutRj4pBNDAiDuUQd3ogfeNe+fBNdEXFO9y5SSGct5nebWNC3Pht/xdyaHrpkXgEh 91MC1GJrcwQG3NOxFvYVXct5Lc2eetBM36w+fZwmd163bTKUgufUKXkH00/RtXXFVtzM 7hiO8sJA35Jq53pgmJTtTf8uKhukMf1SszP5mjqkYcyn3xfW1LK7WAqnI+0y9/Pfb36J pZtlKNGx3prnx0VTqB9+XdNgtkN66n1m40Oed/ubIVXg9KA9kb/y0PKnMXTimjfsSe/J Qj3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+t6SiX3Q7QC6x3l0ZiZvuSdsDjTooQrhI3oP79fbW6w=; b=eDYpAHHg7ke6VzDmACTX58GNvCNOqgux1AXeNODaSIf7iCPh0qTMmTlm/9haZBY+jo ZLg/CtgAm2ksI3JSCUy5tPYZa2yWHNMTe+ciylGrjsDLCY+scDAvjP0rmqJ9KapLGnRt gg8iTcT12RZVtpga3Lk47oVCUkZ3xKeaNKZnLmTJ+9JGZ/bg5ApfZjTHubBBNIsrSLdG bj+ktjI5wsiMpYp5hI0clfIfRZvcqkfE8owbn8zHTeRpYhIXBhULtviL9tgWoY+bPTXC fmIAsSbPCiiTYCCSLq1qiespu+pIJx6zqx5YYM2vIrOR9zfgMyLMoCb2aLOOLAim+ct6 fVPA== X-Gm-Message-State: ALyK8tIiIxCPEWiqJpneeyi6PNz22YwIWmtgU14+pYrITY0HL8g4SHO2aXRJc66br4p/VpTt X-Received: by 10.28.209.13 with SMTP id i13mr18421248wmg.93.1466759896234; Fri, 24 Jun 2016 02:18:16 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id i74sm2145466wmg.21.2016.06.24.02.18.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jun 2016 02:18:15 -0700 (PDT) From: Neil Armstrong To: dmitry.torokhov@gmail.com, andy.gross@linaro.org, david.brown@linaro.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com Cc: Neil Armstrong , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rtc-linux@googlegroups.com Subject: [PATCH v2 3/5] rtc: rtc-pm8xxx: Add support for pm8018 rtc Date: Fri, 24 Jun 2016 11:18:05 +0200 Message-Id: <1466759887-25394-4-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466759887-25394-1-git-send-email-narmstrong@baylibre.com> References: <1466759887-25394-1-git-send-email-narmstrong@baylibre.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to support RTC on Qualcomm MDM9615 SoC, add support for the pm8018 rtc in rtc-pm8xxx driver. Reviewed-by: Bjorn Andersson Acked-by: Alexandre Belloni Signed-off-by: Neil Armstrong --- Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt | 1 + drivers/rtc/rtc-pm8xxx.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt index f24f334..37a088f 100644 --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt @@ -62,6 +62,7 @@ The below bindings specify the set of valid subnodes. "qcom,pm8058-rtc" "qcom,pm8921-rtc" "qcom,pm8941-rtc" + "qcom,pm8018-rtc" - reg: Usage: required diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index 795fcbd..976f5f6 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -393,6 +393,16 @@ static int pm8xxx_rtc_enable(struct pm8xxx_rtc *rtc_dd) return 0; } +static const struct pm8xxx_rtc_regs pm8018_regs = { + .ctrl = 0x11d, + .write = 0x11f, + .read = 0x123, + .alarm_rw = 0x127, + .alarm_ctrl = 0x11d, + .alarm_ctrl2 = 0x11e, + .alarm_en = BIT(1), +}; + static const struct pm8xxx_rtc_regs pm8921_regs = { .ctrl = 0x11d, .write = 0x11f, @@ -428,6 +438,7 @@ static const struct pm8xxx_rtc_regs pm8941_regs = { */ static const struct of_device_id pm8xxx_id_table[] = { { .compatible = "qcom,pm8921-rtc", .data = &pm8921_regs }, + { .compatible = "qcom,pm8018-rtc", .data = &pm8018_regs }, { .compatible = "qcom,pm8058-rtc", .data = &pm8058_regs }, { .compatible = "qcom,pm8941-rtc", .data = &pm8941_regs }, { },