From patchwork Mon Sep 21 05:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Zhao X-Patchwork-Id: 1368071 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-rtc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Bvv5X6qtPz9sR4 for ; Mon, 21 Sep 2020 16:04:00 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726355AbgIUGD7 (ORCPT ); Mon, 21 Sep 2020 02:03:59 -0400 Received: from inva021.nxp.com ([92.121.34.21]:38266 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbgIUGD7 (ORCPT ); Mon, 21 Sep 2020 02:03:59 -0400 X-Greylist: delayed 435 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Sep 2020 02:03:58 EDT Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 37DE9200621; Mon, 21 Sep 2020 07:56:43 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D16B5200A5A; Mon, 21 Sep 2020 07:56:39 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 5619840309; Mon, 21 Sep 2020 07:56:35 +0200 (CEST) From: Qiang Zhao To: a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Zhao Qiang Subject: [Patch v2 1/3] dt-bindings: rtc: pcf2127: Add bindings for nxp,pcf2127 Date: Mon, 21 Sep 2020 13:48:19 +0800 Message-Id: <20200921054821.26071-1-qiang.zhao@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org From: Zhao Qiang Add bindings for nxp,pcf2127 Signed-off-by: Zhao Qiang --- Changes for v2: - modify the format to yaml - add compitable "nxp,pca2129" .../devicetree/bindings/rtc/nxp,pcf2127.yaml | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml new file mode 100644 index 0000000..226a0b2 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/nxp,pcf2127.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PCF RTCs + +maintainers: + - Qiang Zhao + +allOf: + - $ref: "rtc.yaml#" + +properties: + compatible: + enum: + - nxp,pcf2127 + - nxp,pcf2129 + - nxp,pca2129 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + no-watchdog: + $ref: /schemas/types.yaml#/definitions/flag + description: + With this property, the device will not registered as a watchdog device. + + start-year: true + +required: + - compatible + - reg + +additionalProperties: false + +... From patchwork Mon Sep 21 05:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Zhao X-Patchwork-Id: 1368073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-rtc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Bvv5g43W8z9sTN for ; Mon, 21 Sep 2020 16:04:07 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726328AbgIUGEH (ORCPT ); Mon, 21 Sep 2020 02:04:07 -0400 Received: from inva021.nxp.com ([92.121.34.21]:38278 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgIUGD7 (ORCPT ); Mon, 21 Sep 2020 02:03:59 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 0F0C5200A41; Mon, 21 Sep 2020 07:56:53 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id ACDFD200A5A; Mon, 21 Sep 2020 07:56:49 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 1DF414029F; Mon, 21 Sep 2020 07:56:45 +0200 (CEST) From: Qiang Zhao To: a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Zhao Qiang Subject: [Patch v2 2/3] rtc: pcf2127: add "no-watchdog" property Date: Mon, 21 Sep 2020 13:48:20 +0800 Message-Id: <20200921054821.26071-2-qiang.zhao@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200921054821.26071-1-qiang.zhao@nxp.com> References: <20200921054821.26071-1-qiang.zhao@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org From: Zhao Qiang Commit 0e735eaae165 ("rtc: pcf2127: add watchdog feature support") adds watchdog feature for pcf2127, then it will be registered as a watchdog device even though it is not used as watchdog. Pcf2127 always be registered as watchdog0(default watchdog device), even though it is not used as watchdog, meanwhile there is another real watchdog device registered as watchdog1. So add "no-watchdog" property, if the node has this property, driver will not register it as a watchdog device Signed-off-by: Zhao Qiang --- drivers/rtc/rtc-pcf2127.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index ed63169..b50158a 100644 --- a/drivers/rtc/rtc-pcf2127.c +++ b/drivers/rtc/rtc-pcf2127.c @@ -624,9 +624,11 @@ static int pcf2127_probe(struct device *dev, struct regmap *regmap, set_bit(WDOG_HW_RUNNING, &pcf2127->wdd.status); #ifdef CONFIG_WATCHDOG - ret = devm_watchdog_register_device(dev, &pcf2127->wdd); - if (ret) - return ret; + if (!of_property_read_bool(dev->of_node, "no-watchdog")) { + ret = devm_watchdog_register_device(dev, &pcf2127->wdd); + if (ret) + return ret; + } #endif /* CONFIG_WATCHDOG */ /* From patchwork Mon Sep 21 05:48:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Zhao X-Patchwork-Id: 1368072 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-rtc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Bvv5f40CHz9sTC for ; Mon, 21 Sep 2020 16:04:06 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726367AbgIUGD7 (ORCPT ); Mon, 21 Sep 2020 02:03:59 -0400 Received: from inva021.nxp.com ([92.121.34.21]:38274 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbgIUGD7 (ORCPT ); Mon, 21 Sep 2020 02:03:59 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4687C200A7F; Mon, 21 Sep 2020 07:56:56 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E5352200A7C; Mon, 21 Sep 2020 07:56:52 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 6244B402D9; Mon, 21 Sep 2020 07:56:48 +0200 (CEST) From: Qiang Zhao To: a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Zhao Qiang Subject: [Patch v2 3/3] arm64: dts: lx2160a: Add "no-watchdog" property to pcf2127 Date: Mon, 21 Sep 2020 13:48:21 +0800 Message-Id: <20200921054821.26071-3-qiang.zhao@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200921054821.26071-1-qiang.zhao@nxp.com> References: <20200921054821.26071-1-qiang.zhao@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org From: Zhao Qiang pcf2127 on lx2160a are not used as watchdog. Signed-off-by: Zhao Qiang --- arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts index 54fe8cd..6181371 100644 --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts @@ -153,6 +153,7 @@ reg = <0x51>; // IRQ10_B interrupts = <0 150 0x4>; + no-watchdog; }; };