Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp212253pxk; Thu, 24 Sep 2020 03:55:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7kJi2RwWRRoFgYlBLsz0PCENvxg6cYTqMU3q1N08XyxzxSfP9vyyhGZUOGEM7VzL+owQ5 X-Received: by 2002:a05:6402:21c5:: with SMTP id bi5mr366549edb.380.1600944928108; Thu, 24 Sep 2020 03:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600944928; cv=none; d=google.com; s=arc-20160816; b=wEZ/EcVoZgczSsgaUoi/adoQL5vI8YfI1tXQZgdNnyAfrpAeAra0WrmXQe49BdgNRS 67Kq6fdIQKlqqIpzLSxf+1BMMOZaOItgB4lLmTRUZYheiUdo4aNOvgk38zXbibDNcQRw citGUYEyruxSGCpCjffumn8lYtCAb66QfdMxwBrsH/k3PMsrnItvYBqtC1CsLK3jrXea FmQBvzU/A2NlabscxkIoMrck4DHErA3JCYDnvrGjxfO/kPC6kiB2A+IG+3DITcOpm8Ol 74zbIPXXFtolvEyjml8YLyyyn9+2gA0R5yag2gaiXgMJAhwRwo0E0z4UdYnWFnN17xR6 OUMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=6HhTEKYCzaZRtyHdPWRwfOvxFfivqEA4JJdC5jS7EK4=; b=O1fqLa3y6QnRCucCikpJc/vA+1am125iknPis4vjOff5O8Yll+ubjNrBiH7ZeDF35X LvnG5H5UGDvq/uEmdw9Uk+yjNhQlpRQukJCON198YtD42umT9PmRpJKNAoSXs/j7yugu sOFe4HaHozKTUNoHnNNU7jq64kCmxTN+BjA0uFlOwS9qCB/WZYDNDS2GXAqba4z8EZRJ tTQnCWahg4dqK/gl5/mLyOgssfdEXong8uSXhko34+s4j9dQd/DZt4BjxNVCAr2q+tkD pshmAvPOancddyR/Hjc3bpAhVhvI8CD8xOShKPSw74dD1uAI0Ynu9JJweXQkwsYWAwWw IssA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si1843829edr.143.2020.09.24.03.55.04; Thu, 24 Sep 2020 03:55:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727388AbgIXKxM (ORCPT + 99 others); Thu, 24 Sep 2020 06:53:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726796AbgIXKxI (ORCPT ); Thu, 24 Sep 2020 06:53:08 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CCE9C0613CE for ; Thu, 24 Sep 2020 03:53:08 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLOs0-00062S-SC; Thu, 24 Sep 2020 12:53:00 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1kLOrz-0005Ch-6e; Thu, 24 Sep 2020 12:52:59 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Alexandre Belloni , Qiang Zhao , Bruno Thomsen Cc: linux-rtc@vger.kernel.org, a.zummo@towertech.it, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, Wim Van Sebroeck , Guenter Roeck Subject: [PATCH 2/2] [RFC] rtc: pcf2127: only use watchdog when explicitly available Date: Thu, 24 Sep 2020 12:52:56 +0200 Message-Id: <20200924105256.18162-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200924105256.18162-1-u.kleine-koenig@pengutronix.de> References: <20200924074715.GT9675@piout.net> <20200924105256.18162-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Most boards using the pcf2127 chip (in my bubble) don't make use of the watchdog functionality and the respective output is not connected. The effect on such a board is that there is a watchdog device provided that doesn't work. So only register the watchdog if the device tree has a "has-watchdog" property. Signed-off-by: Uwe Kleine-König --- drivers/rtc/rtc-pcf2127.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index 5b1f1949b5e5..8bd89d641578 100644 --- a/drivers/rtc/rtc-pcf2127.c +++ b/drivers/rtc/rtc-pcf2127.c @@ -340,7 +340,8 @@ static int pcf2127_watchdog_init(struct device *dev, struct pcf2127 *pcf2127) u32 wdd_timeout; int ret; - if (!IS_ENABLED(CONFIG_WATCHDOG)) + if (!IS_ENABLED(CONFIG_WATCHDOG) || + !device_property_read_bool(dev, "has-watchdog")) return 0; pcf2127->wdd.parent = dev; -- 2.28.0