Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1421233rwi; Thu, 20 Oct 2022 12:14:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM78F7mIhjDR/SPHZrnX7NTevzhdTOBGBatFdOjYDV5Lufj5UWBh/4tfgKh9IHfxk4mXucR7 X-Received: by 2002:a05:6402:22ed:b0:458:bcd1:69cf with SMTP id dn13-20020a05640222ed00b00458bcd169cfmr13819364edb.260.1666293269332; Thu, 20 Oct 2022 12:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666293269; cv=none; d=google.com; s=arc-20160816; b=LiuRZyuBSK31NoRSUyyfGe291X55mM63ETlSvq7gys4VgFdrK5T8uyjh980uDDbYZD cvzOqwUIrsQ7LbORix4QeL+Ht5XDt/ejENC5R7FGr/+gxEWUVBgJz1iog+otCmYoyO/y wibd/l4F+HGs01yYGTbLQodmpe2UyH+G/AdvYSFoFFjVWxc4VUJLOYftCGjOuwfsU889 icWPN0jE4T+YXisfu6bZ6BIhTGryUyANru7QbBbYeV3Po1VE/kWf2DkyJuSQ52FPk5vm MyHt7UGbFf2zkKJf2AEA/OdR7YxB0U/L1OzJD4yvbA3V43xEAKvA0g49PrzwrCkj7dmm jaXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:sender:dkim-signature; bh=1mcRseKjTDv1dnCkTp74lsoW6tE2eVMgrAQoJL5kJyc=; b=odPckbtQYg0RukBuzgnBn415AeFkJI+frgrXVXDeC1oKtbaiMQWLcqKbtPJvnb5kAt H0DbIg8vYYW7BjzDs0HdOGjn+85U8EGxJX++T993hSZiQwnix7hqppRfsIlyG1gitX9h IdLz726y6Mw8cMUzPoS56zw9lDnBxhKHLCy/pje2yFNy8zkbdzAuZcVvXV3NvIUZXjxL n26oO0AoIYUnqz6NloH64KRgwQUudC2cIDqecK196VbNRb0KAvUM16Q4KZVgisuY2AGd gasj4BXkOESV8K1F6kws01dXSMuTpHQYO7UQs9ZSpMT6x9ZOCuJfpp6DUWIOoACh7Mxx tZZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="iG5AeI0/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a17090699c300b0078e254ae43fsi19211455ejn.787.2022.10.20.12.13.59; Thu, 20 Oct 2022 12:14:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="iG5AeI0/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230184AbiJTS5m (ORCPT + 99 others); Thu, 20 Oct 2022 14:57:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229897AbiJTS5h (ORCPT ); Thu, 20 Oct 2022 14:57:37 -0400 Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E7D16A4DB; Thu, 20 Oct 2022 11:57:34 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1364357a691so696687fac.7; Thu, 20 Oct 2022 11:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=1mcRseKjTDv1dnCkTp74lsoW6tE2eVMgrAQoJL5kJyc=; b=iG5AeI0/6LPqVn/bxFYgGKQkry7Ay9XE/eaONqFI/mo9j/HJzjIgsqQWjrVzX1KPY5 nhQEIA/n+LseZ/34DnuQUZ2jNxlStZec6mw4ErMnB/ogzF2OOGNdnfsMVdlbc+UbI4/v a1T/DzEAyyD5zPkokF6Dl8HPYckT8JGnDakXqUrezAt7fO75IFdhcBQ0dahfJRfZW2+T mB4sI67g5K5uPgo/3yo6f0AW0hjXCy4SE1PtQzsWblE4HdvLqQqlwZqz2TtBsVvj1Drm Pghy1wllNqcwN22+e/Q6lPVYa91kFmS8qKyQY1Rt/pNKyK4vLyEbcSKqq60DWSxi1LVx Wvzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1mcRseKjTDv1dnCkTp74lsoW6tE2eVMgrAQoJL5kJyc=; b=N1/AkeV9CysaMGBnJPbYAq4+Z0u1jTeOk51AHkPr9WEKh8TwWkbiUah1t3stTbvJ/f 8m8HAA5hL9qz/el5Yjf1/Q7vENpMjiNEsIWyjtAJNVrZuzNCfYNpcN9aB0NbbzPfyhI5 R0rIwyQRwJP0ZuXlv0AdKOv0c6WMhL1NgcaOlcAFYzllMA1+lgNZRJvFtpM6yMjRB900 s1w9fkFvs0ZbEID2Rw1GPCXR6n0RyaFsKmAiQtwT9jP/syJsno1WODYXk1zvGdfU+ZY6 k2efCu1aFQJwdpoBN/r5Tn31HykaQdiR6MfPGLjJjchaVh753vO8IqzmIv5xDWIV7WF5 o7eA== X-Gm-Message-State: ACrzQf1FxnTqzRaHWA80aNrvaSH+xDvp4LQuhCgx0xP7V5wPwzrILrsu KwAkGAYdQWnDex3XhO3p7oE= X-Received: by 2002:a05:6870:b68d:b0:12d:484a:2643 with SMTP id cy13-20020a056870b68d00b0012d484a2643mr26753310oab.105.1666292253132; Thu, 20 Oct 2022 11:57:33 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id c8-20020a9d4808000000b00661ac688285sm269710otf.0.2022.10.20.11.57.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Oct 2022 11:57:32 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Thu, 20 Oct 2022 11:57:28 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US To: "Tilki, Ibrahim" , "a.zummo@towertech.it" , "alexandre.belloni@bootlin.com" , "jdelvare@suse.com" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" Cc: "linux-rtc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hwmon@vger.kernel.org" , "devicetree@vger.kernel.org" , "Arslanbenzer, Zeynep" References: <20221019133910.282-1-Ibrahim.Tilki@analog.com> <409d7e93-f911-11b6-ed54-8ae8c94a8af0@roeck-us.net> From: Guenter Roeck Subject: Re: [PATCH 1/2] drivers: rtc: add max313xx series rtc driver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/20/22 07:47, Tilki, Ibrahim wrote: > ... > >>> + >>> +static int max313xx_wdt_ping(struct watchdog_device *wdd) >>> +{ >>> + int ret; >>> + >>> + ret = max313xx_wdt_stop(wdd); >>> + if (ret) >>> + return ret; >>> + >>> + return max313xx_wdt_start(wdd); >> >> Having to stop a watchdog just to ping it is unusual. Is this really >> necessary ? >> > > Unfortunately RTCs do not have any other way of resetting timer counter > other than restarting the timer. > That is a bit too generic. I sampled a couple of rtc drivers implementing watchdog support, and they all support pinging the watchdog without stopping it (or, in other words, they have explicit watchdog support). Looking at one of the chip datasheets, I would argue that the timers on that chip series are not really suitable (nor intended) to support watchdog functionality. They are real time alarm timers. They don't generate an alarm N seconds in the future, but at specific times/dates. That means that updating the time would interfere with watchdog functionality. That is way too fragile to be usable as watchdog timer. I would suggest to drop watchdog support from this driver. Thanks, Guenter