Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1352518pxb; Fri, 26 Feb 2021 08:39:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeGKociOOnXxweOKDRFvIE5r76JBtf6kLQkzq3LAUNGpgihV77vr4pc1y0rpS391vtB1Z5 X-Received: by 2002:aa7:c6d5:: with SMTP id b21mr4290496eds.180.1614357562051; Fri, 26 Feb 2021 08:39:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614357562; cv=none; d=google.com; s=arc-20160816; b=CvOf1cb4/6XONmHYv0qF8xGY93zXgDjunC18mOl3FPsSUof2igkFaAm83L+x7q+REU LTPkATYKgXZQVq/KpqjMFVJ14n3u/xqUWPvNB7LwofgkguafcQjBb5T+Y/HMM3JZ19D6 chodigy1QEkqPGDXIpLqQycMO3oAbOZ/oCmFVSp0bXgf9gkbausFZdu+3n3MrgGZS18M gRVvlhcjdpSOugNONL9u6SBurYTyS2jTfu/Ss4rkeu4CBnw6D8r+xpcZpo/vKZ8oW9LI HR6Cf9vWdClk4TEMXWerVTqU0z1tY3ICSwTnFMgaEzmN1iLfNuVIWrecQv4sETrlAVeX kcVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=cOneb72+9BMDKFMeXHoHtH5MZRyiWygS1afzq3OOa+o=; b=A4vrDo2Ezar1K9sZejiPoeAw/XRH17KPL+5UXQ0xAGEgz70zyi6qZANl3EePXn5GvQ jmPlxvOUm6UYdEIIrK4sUO8AAhed+4LaBOHR4vqv0CfUIJVCsHiDtX+hKNjLJw/HO2zL JvjIGoXLmSm5nAdlXmyKLhu1FIcArwEN0t4yRib9Tmnpku9ZzPQ2WCAR9n69kCDrHXgq X5zNAfb8PZ4t1jS+sgC2g++Icp6daqxmY68RwwwV2ry7zWPoA4EojGaWg87S36kxOKC0 rErehqCmXkgMuYwGU3mJRKAmr6cGLQazaLqJVJtnK8mAYcrXCtVpQezt2cWoHwZgMU9i T7CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="E4DbkXF/"; 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 d10si5948557edo.152.2021.02.26.08.38.58; Fri, 26 Feb 2021 08:39:22 -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=@rasmusvillemoes.dk header.s=google header.b="E4DbkXF/"; 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 S229967AbhBZQgL (ORCPT + 99 others); Fri, 26 Feb 2021 11:36:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbhBZQgG (ORCPT ); Fri, 26 Feb 2021 11:36:06 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDFF3C061756 for ; Fri, 26 Feb 2021 08:35:22 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id c23so5291541edr.13 for ; Fri, 26 Feb 2021 08:35:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cOneb72+9BMDKFMeXHoHtH5MZRyiWygS1afzq3OOa+o=; b=E4DbkXF/qcHn1t53N2ZY0ECGTpmXtZVoY6SFeeKj+vTG082gR2f+HYW/wmeBaK7HBp 4Snk/JOoGLiyEYKKMyvH6jjpQfHqHq2hdqW5M+sUcVlgLtybZXDdfYUr+SZDNtkfkvSb JAK9hzKINrmqy5B8aGnMd6jvnlQo1FETWwF6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cOneb72+9BMDKFMeXHoHtH5MZRyiWygS1afzq3OOa+o=; b=sv/xDsToy0cIgB+9PfgOZ4mpA53rz9YbrfYpLegUcy3B1uoeQFOPOGYdUSWpAJrN0/ w9FTTLXK0msGErWJn0zFXYCM/cxdDi59ebTilgWzLqGpmvOtqnmU0pJ0HMGert9E/l8G s5J4m9s3B0CZ6X9jpDlLZN72xdj8201a4we/bUUMVItoO3mdZygEWemjvDCWMwq4Ivd6 9rVB5TNoV0aYth6Ay4gKPOFoLX6iJVoS1fRYmt4eG5SsUYfjwI19WD8Qu7fGFBVu6Hrn ZBQwXIXfJvOmZ0K8VElDB819WMgD1bfUE0Xvy6BRF3eOImM9LUnxporlMTy2l7w0gJMj MZHA== X-Gm-Message-State: AOAM5305/XgenuWbXWg2VGUPpNgQ65juk0BVvHUB+NFwB9HjRzyD0k5j 6iQZkKrPUQmzQqKaFlcdG3WAwg== X-Received: by 2002:aa7:c386:: with SMTP id k6mr1400939edq.224.1614357321498; Fri, 26 Feb 2021 08:35:21 -0800 (PST) Received: from [192.168.1.149] ([80.208.71.141]) by smtp.gmail.com with ESMTPSA id u18sm5589671ejc.76.2021.02.26.08.35.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Feb 2021 08:35:21 -0800 (PST) Subject: Re: [PATCH 0/2] add ripple counter dt binding and driver To: Arnd Bergmann Cc: Greg Kroah-Hartman , Rob Herring , DTML , "linux-kernel@vger.kernel.org" , Arnd Bergmann , linux-clk , Guenter Roeck , Wim Van Sebroeck , "linux-watchdog@vger.kernel.org" References: <20210226141411.2517368-1-linux@rasmusvillemoes.dk> From: Rasmus Villemoes Message-ID: Date: Fri, 26 Feb 2021 17:35:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/02/2021 15.35, Arnd Bergmann wrote: > On Fri, Feb 26, 2021 at 3:14 PM Rasmus Villemoes > wrote: > >> >> So I'm thinking that the proper way to handle this is to be able to >> represent that ripple counter as a clock consumer in DT and have a >> driver do the clk_prepare_enable(), even if that driver doesn't and >> can't do anything else. But I'm certainly open to other suggestions. > > How about adding support for the optional clock to the gpio_wdt driver, > would that work? I think it would _work_ (all I need is some piece of code doing the clock_prepare_enable(), and until now we've just stashed that in some otherwise unrelated out-of-tree driver, but we're trying to get rid of that one), but the watchdog chip isn't really the consumer of the clock signal, so in-so-far as DT is supposed to describe the hardware, I don't think it's appropriate. OTOH, one could argue that the watchdog chip and the ripple counter together constitute the watchdog circuit. Cc += watchdog maintainers. Context: I have a gpio-wdt which can unfortunately effectively be disabled by disabling a clock output, and that happens automatically unless the clock has a consumer in DT. But the actual consumer is not the gpio-wdt. Please see https://lore.kernel.org/lkml/20210226141411.2517368-1-linux@rasmusvillemoes.dk/ for the original thread. Rasmus