Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1487342pxu; Thu, 17 Dec 2020 11:05:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJySLQ5AfjFkORyE95hkOqHieMiphgAftgFGyZsKEaM/TzWWAuB+gdJj7h3OkxLo31spC/Vm X-Received: by 2002:aa7:dc0d:: with SMTP id b13mr856393edu.170.1608231959668; Thu, 17 Dec 2020 11:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608231959; cv=none; d=google.com; s=arc-20160816; b=TOiFBvXsZMwEYTfmvo7BAwOx6exQyJEXHFzpMft1yeQ3Ab7Bq+1m9hBU/0VaqCyN3n YXhby1FBRv2Fm6TMc+kZhWxHqc06mcKRpx7jS/KVL7Dt/QaUT45qzQQ75xfRUNVZw3/o hmNQCGtizU1luKdaqKKL7n7zpnZN7Kw05I3CvaT82ne5j0hJCMt71QMmkRVZWwDPO2HF LOl/0a0HEZ1bohKxmwrSLZyA8Z5EjXhCUZEBLUB9S8amax7QxOKjPM20rnoxRCWOFLvw 9g0xrMqohPSO/Dcl7udOEdkWS1P8m9yH/C9ILrkXjv4f1cfFKY8D6gQJsI5FQ3/F2Oy/ mrJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TpIN8ZujmZBne/W8VVXWhgdTUE6iKXCG0iLPVPoLCvA=; b=dtqNSq9yIxLMmvdNYLIctY/cdnOkA1y6vvtMx3wRFm6Kc+OyR7y7O+toqeu8R4iOZF +4gTBQc2cCgBQWtHbll3XtVoS21tTCRpnV106n0nvKAewd1iAPMsZ9ifxDNCJ+foGxjw hqw0NQlpWAAsXC5bdkQr30hzySiYO66zCcFXZk3Cuxv4Bz9iGMPTkNPAF7TpZ0ivQgiU HUkIM3FF6xfXOnTYWZSZsFD5ltc59F5/7uu7oqTqmsBb51ZzQzhRlfGfuGJiATHnZuPK TdBAacMuue/9EKQMUh5/jq+0CdBlx2YIPlaE556i8eGHZH6Sp2gibNmQY44LVmarfQuy elxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ePoiBG6V; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e21si4782102edv.260.2020.12.17.11.05.36; Thu, 17 Dec 2020 11:05:59 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ePoiBG6V; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729978AbgLQTD2 (ORCPT + 99 others); Thu, 17 Dec 2020 14:03:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:45116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbgLQTD1 (ORCPT ); Thu, 17 Dec 2020 14:03:27 -0500 X-Gm-Message-State: AOAM5330Er0zcEDZSEio7RK8QLxckxDN5K+6kb5j9ojyLtC3D/tpKbgB tupso4K7wP7kx+jqik6BLAbymMi86N2V7JcaXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608231767; bh=TpIN8ZujmZBne/W8VVXWhgdTUE6iKXCG0iLPVPoLCvA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ePoiBG6Vvg+8oR4Ewrug1ffkgjbPsl5vxgStaBSOi0vDpHsTwSRO3MgslfAMt4Hm2 dsju36hhJyIr3qei3kCcJxOvYMmcB7lHzD2Zt8fimLpUa/ven2MouzhxU1LPQXJSkR iiUuyhU+n8uymVBJKxtrikQBUNmt/6Nx57BUXFnxMoJ3pexp5gDfJZBBg6XZBlGH8n nXxHIYzjFsJD/yuT4B1fyf0AL49uTWoV5kFwtSek/jf2nDi3WbZguqM4RV6V6yG02v D3vkHOL5bZ8OIk82sb0qNQvj1ZRiIYLjIjYsDERVSRRUmOBSdgqcmQ7tDoV8KkQIUO acvKVNf1n24pA== X-Received: by 2002:a17:906:6713:: with SMTP id a19mr448322ejp.468.1608231765415; Thu, 17 Dec 2020 11:02:45 -0800 (PST) MIME-Version: 1.0 References: <20201204092752.GE74177@piout.net> <20201211215611.24392-1-rasmus.villemoes@prevas.dk> <20201211215611.24392-2-rasmus.villemoes@prevas.dk> <20201217181209.sibyhlfvlpjaewrv@pengutronix.de> In-Reply-To: <20201217181209.sibyhlfvlpjaewrv@pengutronix.de> From: Rob Herring Date: Thu, 17 Dec 2020 13:02:32 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/3] dt-bindings: rtc: add reset-source property To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Cc: Rasmus Villemoes , "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" , Alexandre Belloni , "linux-kernel@vger.kernel.org" , Qiang Zhao , Bruno Thomsen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 17, 2020 at 12:12 PM Uwe Kleine-K=C3=B6nig wrote: > > On Thu, Dec 17, 2020 at 10:51:08AM -0600, Rob Herring wrote: > > On Fri, Dec 11, 2020 at 5:10 PM Rasmus Villemoes > > wrote: > > > > > > On 11/12/2020 23.30, Rob Herring wrote: > > > > On Fri, Dec 11, 2020 at 3:56 PM Rasmus Villemoes > > > > wrote: > > > >> > > > >> Some RTCs, e.g. the pcf2127, can be used as a hardware watchdog. B= ut > > > >> if the reset pin is not actually wired up, the driver exposes a > > > >> watchdog device that doesn't actually work. > > > >> > > > >> Provide a standard binding that can be used to indicate that a giv= en > > > >> RTC can perform a reset of the machine, similar to wakeup-source. > > > > > > > > Why not use the watchdog 'timeout-sec' property? > > > > > > Wouldn't that be overloading that property? AFAIU, that is used to as= k > > > the kernel to program an initial timeout value into the watchdog devi= ce. > > > But what if one doesn't want to start the watchdog device at kernel > > > boot, but just indicate that the RTC has that capability? > > > > Yeah, I guess you're right. > > I agree, too. The initial suggestion looks fine. > > > > It's quite possible that if it can act as a watchdog device (and > > > has-watchdog was also suggested), one would also want timeout-sec and > > > other watchdog bindings to apply. But that can be added later, by tho= se > > > who actually want that. > > > > > > For now, I'd really like to get my board booting again (or rather, no= t > > > get reset by the real watchdog just because the pcf2127 driver now > > > exposes something as /dev/wathdog0, pushing the real one to > > > /dev/wathcdog1 which doesn't get pinged from userspace). > > > > I'm wondering how you solve which wdog to ping when there are multiple > > without relying on numbering. I guess 'reset-source' will solve that > > even if that's not your current fix. So I guess I'm fine with this. > > I guess you'd need some udev magic that ensures that the right watchdog > always gets the same number. Why involve udev and keep the magic numbering important? Provide enough details on watchdogs' features so an intelligent decision can be made. It's the same thing every time folks try to number things in DT. Rob