From patchwork Fri Jun 17 10:22:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9183301 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 C3D9C6075F for ; Fri, 17 Jun 2016 10:23:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2A571FF60 for ; Fri, 17 Jun 2016 10:23:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A766A28399; Fri, 17 Jun 2016 10:23:21 +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=ham 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 8F39F28386 for ; Fri, 17 Jun 2016 10:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755412AbcFQKXB (ORCPT ); Fri, 17 Jun 2016 06:23:01 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36677 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755247AbcFQKWS (ORCPT ); Fri, 17 Jun 2016 06:22:18 -0400 Received: by mail-wm0-f44.google.com with SMTP id f126so83074974wma.1 for ; Fri, 17 Jun 2016 03:22: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=N3CvZZ+h/tpLfXMJrqU9I+TwjQe+B+rHFjzg5mFxgss=; b=yjQdJ11Ho/LhmticfuQZjP7KHvMIbue3n9Z7g18x7Yan2dh3rjsRz/TVFVn2XrRgJ2 Uk4fYZKTA4/AFLwhJ0pM1nvad/7yJ4YCuZ0tbY/hPUHuiUSCbv8c0cMgCx4oulSA5Mm+ mfJIBnyKQvFF21YodIFjhEQ+dpkSEEJ+RuDVkJ6WPTD8YUgXw3SXYUfPac0v+8bm96Uu v0dfFP4AHnkyDCm/V7+Vt7wsRgc9tomJyFAPGL2axWvOjf/MAV1kvxchBrR+gYCVrHm6 Gt6G50gFsZ9fbKMuZcyFPZsHWmCrFyRSo48fUfa3OCcT070bNVlyICtH71WMdqtMZFqz isVg== 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=N3CvZZ+h/tpLfXMJrqU9I+TwjQe+B+rHFjzg5mFxgss=; b=l0FhcDiq2X0rH2rMyWkrFHb6Wcyw/CyZGuaOrtGmCI+7gLw1Ng5biZuivDFs9H6KfR 0S84t64HRaKdMBx9BI0fdYCHt5zhPWs3DdBz8RU1n/nD0ZqNyEgJ3Z4CFcKHpyS1Upm3 /U1UDgBtn5sTHYQrQomxf3lo1qSaV1tpx9dhj2FaqGPB6uevs90Xodt55EtCBrYCULE7 wqf/xiLuNMa19CO0ID41JsrzucxK9W8vSgxP/agc8SYfSO/+2sRMsyV9KuTYq3sBoLLD v115tRMBKYCdKMu2k9u+4Cgq2LFP1UmvU07ji0GVwnbjuArOvdbEvlCH2ZcOmjlFs35j Bnaw== X-Gm-Message-State: ALyK8tJ82bodLJ+HbNsrdU7gnIflrrisoGBnVtnQx8CYyOpsST1Ju8s7d5m0DScvJB6Qvvel X-Received: by 10.194.22.169 with SMTP id e9mr1535767wjf.128.1466158936942; Fri, 17 Jun 2016 03:22:16 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id ej9sm14306819wjd.7.2016.06.17.03.22.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Jun 2016 03:22:16 -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 3/5] rtc: rtc-pm8xxx: Add support for pm8018 rtc Date: Fri, 17 Jun 2016 12:22:07 +0200 Message-Id: <1466158929-19524-4-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466158929-19524-1-git-send-email-narmstrong@baylibre.com> References: <1466158929-19524-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. Signed-off-by: Neil Armstrong Acked-by: Alexandre Belloni Reviewed-by: Bjorn Andersson --- 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 }, { },