From patchwork Tue Jul 19 13:51:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9237505 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 993306075D for ; Tue, 19 Jul 2016 13:52:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89D1C20246 for ; Tue, 19 Jul 2016 13:52:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E70A27165; Tue, 19 Jul 2016 13:52:18 +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 09586271FD for ; Tue, 19 Jul 2016 13:52:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754048AbcGSNvr (ORCPT ); Tue, 19 Jul 2016 09:51:47 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35550 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753929AbcGSNvj (ORCPT ); Tue, 19 Jul 2016 09:51:39 -0400 Received: by mail-wm0-f52.google.com with SMTP id f65so139716223wmi.0 for ; Tue, 19 Jul 2016 06:51:39 -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=XOO+7Rj1pKv/J7y4QCReXLGIqud5tOAQQdFatEsODJlYpK0CQqvXYH7Z/w1qqqCrYw wjOgImJbyBW7YLbr9Qpm51hXx2hhPs9RQKj7NarFgDlObGliSfrmWAcGxlnitTzhm7LE 3Uw7SFuKOQsYamUiU/qYwrNLZ2IESi3fgN13HHIfiMMWpdgBZylmxr7MN/QRA3A0ENhD vmL46BpcKXC0NpYd7U+nJ6B0q0OjwUMEkR7RLoWV2VePsY+OuxA766xWn/DgfX7A0Gpd qFYWH2tINHqT/oBH5kIi00foojy7WBiTWaeu8lfFxWD3yQWO8un/QTNOFyDkrZHF3FlK vGBg== 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=lfsjLg6+rtqnEk/d9g70CinyUjXnFen/230tarAjZOCC+DQyYmGvTRIKjhOlVjmM6C Vx3B7bAUej7EPkJrlp0iIWn3EqOFInWcfrKOlVpAE1Mkk3TxFlcSwqNQlum1wdoHRl67 QSBSrahElQnFqXF/vXG2vlAQ1A11K2AXzbTj+83ZTEIBkLwU25mZKV3Kvya+/HYkKfOK DOp6kRUfc1Q8gVcbtA+8p2OP0hNRjfnVBLqgezr7lvujgv/u22K/3hwuYajHwShhbvDq 5UkoqI0mQkCEvfzPxuAp44v2oGuYnTT5ZDzr0O2v+4HAr4kDSv/tAM625qfR8nKyEDVn krxg== X-Gm-Message-State: ALyK8tIcvR9isqyvwNLJBpyM43LVa6vyoYA1H2Vd+yr9iq0uXC6xQFK3QcW2ZO/qxT0kcjS0 X-Received: by 10.28.47.7 with SMTP id v7mr4453979wmv.38.1468936298267; Tue, 19 Jul 2016 06:51:38 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 17sm2971949wmf.6.2016.07.19.06.51.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jul 2016 06:51:37 -0700 (PDT) From: Neil Armstrong To: 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 v3 2/4] rtc: rtc-pm8xxx: Add support for pm8018 rtc Date: Tue, 19 Jul 2016 15:51:24 +0200 Message-Id: <1468936286-2710-3-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468936286-2710-1-git-send-email-narmstrong@baylibre.com> References: <1468936286-2710-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 }, { },