Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2904018pxk; Sun, 20 Sep 2020 23:05:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVv0U0W8/RMAr3JQfYEHJv0oyKqb9cnDoidfkHGx1pac82FUpP3ErJhyM8Wx2AKcP8YjXt X-Received: by 2002:a05:6402:3050:: with SMTP id bu16mr51442048edb.343.1600668355136; Sun, 20 Sep 2020 23:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600668355; cv=none; d=google.com; s=arc-20160816; b=fF2ytLS2Emt5MaNW++avkBDRrkOsQQbEfYIUX972VEYp/JMISSLRG7AXhn+gQ0ucM7 3NLBn82IyA0xu/vTnw2vv7kmls4e5IxUwMozFcd1h5Q7QVw1V9mmaXYOP73Uv4FCK2I3 0hrFdaQ96L1f8p8+q9PXtEbRvk9VwEXUOg46SEgRqTQfWEHZwoHIwzz13KpKY0z2W4ty ohI62SIYHRSpiBb5iKh7Q9DViQa6QRHbUBKVCEZY5TQV+A6TaS3tTgWZSL1kV9h0YyX3 ofMD6YHzmIJW0KqXuNAfL6+DBOZcxXWOJ/ymY0PbaKsT8o85deW2SR0FnMcWp7/zsAgx +e8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=G4AEy6rZdofMFbNKVcft8gik08QT8AccMT0hhmi3hOQ=; b=gBQNZujRRDtgqfebrM1Ferj1yj0VwPuawkLAmjoCX16/1Bl6C5zOaWmfl+JKQkCy5x fwMHOZFoDSIuxEK9KzDwcCxxBLqPz8knPNkCpMkz99AqEUJLj9CAxpovoL+32aaqft1F 0PzADROBZcIP35QJ3aMwzgPSV+xb99sks4OYMecyzdCU1jLxhBp8FoFpQPwzEjXhKJBr UBwNh4fC4DQqw2kPVJufNZve2rXPGWViyHig7PaYumYFrduc8mn4PmtiiMyPDdCdqjz+ 7BtsrzZsvjJGQpyUyNGHdsLRtUP16OWhI57OIaDcEQ7SHTNcH6+P7efbaMueCNkzvTc4 6JMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 16si5113766edv.551.2020.09.20.23.05.32; Sun, 20 Sep 2020 23:05:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbgIUGEH (ORCPT + 99 others); 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-kernel@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 */ /* -- 2.7.4