Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2417686rdb; Mon, 20 Nov 2023 10:09:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLputisqJXaG0seFKcizWQWgYtTG4l0GDqomBb65lKS4s/BwlT0J6aJlU6w8qZQaVQUJSh X-Received: by 2002:a05:6a21:1492:b0:188:d19:3fd4 with SMTP id od18-20020a056a21149200b001880d193fd4mr4823199pzb.18.1700503749726; Mon, 20 Nov 2023 10:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700503749; cv=none; d=google.com; s=arc-20160816; b=RE27IkrktTDZrUtGgh6ZBBIHtKoXmRcLqvVTRF6y2Duc6fQJj4MqMRNk68AqAkavtI N86yVpsyfSfYTYE9gIyVifDuOU0na4nH9RfLhY7GZgHAzSStDZPZ6aQdweNgG+1soDxn QOfWWEDSDgTcD1JM8a04LlIy1kErmg6XXSUyPI3eUxd4xD/QzfoHPJuGrHs2rXTwuOnV kzMJ29pivN2uo7XI7WJ5ajHfZWue3mk1AYTM8b8o56F71mPyrnRXcloHNMFxIUyCATAD Nw71QAFWc5UGSgfs8w2DDr3BlktUwxjdcg9HWktqruKKrmq3lwaV9kCyIYE1vMZxEq1E mHZA== 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:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:sender:dkim-signature; bh=3FSK6hIQJd016Vc2pUsye+fL2zqDQZTr43hPQ56brR4=; fh=q/YUuDGMySlhg8Pdvk3yEq1ek8MJqPM3J0kZmUnQWBI=; b=AG4x5rFOINECMb3WGzU+aEgNaqc7Fq0tLsovRif1Bthkbz759cY/84RMXw2E/YrCPh YifqrH7W7YIUcByjGCrQaFwBf9yxxCYRLD6X/DT6zJ8BC42bS9wtLf2HhOB/7/KHhtDv RGZFi7gHSGztHqoyZSLtUol2faN3Ewyp7C+gQHstCfnnB3MwTshFZmXrrYZIcU7PloD/ LUlXxYj0MzDaA92tMCHEFgcJijAiyExIfrqBkKT4O7uMNny17/BFvs5MHZNDStItU1cz m98bGfiScJQ7wU+vHgQksW/+5aQ66s8fEHZ6GLNORzzxXCy7D73ZzdMPOoyq7RIRJoVG kszA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gtWVzSa5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id cm13-20020a056a020a0d00b005ab92870413si9920957pgb.498.2023.11.20.10.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 10:09:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gtWVzSa5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7A460808E669; Mon, 20 Nov 2023 10:06:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233821AbjKTSGN (ORCPT + 99 others); Mon, 20 Nov 2023 13:06:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234174AbjKTSGK (ORCPT ); Mon, 20 Nov 2023 13:06:10 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 422EFA4; Mon, 20 Nov 2023 10:06:06 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6c320a821c4so3897725b3a.2; Mon, 20 Nov 2023 10:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700503566; x=1701108366; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=3FSK6hIQJd016Vc2pUsye+fL2zqDQZTr43hPQ56brR4=; b=gtWVzSa5fYde4z0a7P+JZcFPeB2bApW/jn91MPp2FilIIMsjV98eEGjuNV4yBObFGs kcoBMTblDdrLXb8IHy8KzXzXlVe16bAmxHTFVgVlI1B9qtOmmncY1MwzeipjBm5YFKmY 2HKaVlXA6+v9OKf1vl8uHXJ68jPlZhRaky6Yb43q+N2OhaEpeusAMA6IGKDb9phy4hEG T/tY0rVPY7olCRdsbPMSX1MpPWPt00iHqmk05+txr8/bWtX90S85nc6m3XsMvl7FxhI/ bIrsNrDqMUnqQ4NMvSqLR3/vKMPQlM++eIEXQMOd9GFTDsDoSp5oILrrKvhkTnrt2DA1 9+eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700503566; x=1701108366; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3FSK6hIQJd016Vc2pUsye+fL2zqDQZTr43hPQ56brR4=; b=SBd1HF1xbRGSxoFAw0yVenSdsECRwggumpNwgPUkRy8/XHViPl/EcIOmw+RArhlOQw q+t8irDIM0NdcLvPGCfIF1v6QbKGkCcA58kCxa0cikRY5eQ+ywVpqR4KoK8iJMNzm29r x01dIcS8qnStaoD6Jk8bGCMIZRxEASF9Q8MnceXXEiFhf2SaeQtVCWNyQ3EZOJmNKdez pzfnoIkglNZdsWRNvzwF9nOyOoG8hzIuwGkHKzmMEthhUpT8JZnm8nDhybg2ObnCpPTl yTXEUy4kCd5ixO5N0EuGfsGRU5sC6dkRFMexQPjGYxr/KYPzz3Bed04565a3e3JhBhV3 1NUQ== X-Gm-Message-State: AOJu0Ywy8gAGTLSwltmdvznQkuLT5NE1sFRvyUsbXI5NmGrdA5pzP69J yyc14OERb9yAGGIjyC0Y6s8= X-Received: by 2002:a05:6a20:9f8b:b0:187:27d3:1592 with SMTP id mm11-20020a056a209f8b00b0018727d31592mr7033765pzb.37.1700503565687; Mon, 20 Nov 2023 10:06:05 -0800 (PST) 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 o73-20020a62cd4c000000b006930db1e6cfsm6679891pfg.62.2023.11.20.10.06.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 10:06:04 -0800 (PST) Sender: Guenter Roeck Message-ID: <3a9d2d26-87c5-47b2-b03d-81b398a54abf@roeck-us.net> Date: Mon, 20 Nov 2023 10:06:03 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/2] watchdog: mediatek: mt7988: add wdt support Content-Language: en-US To: Daniel Golle Cc: Wim Van Sebroeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <4d7db8786dce35273db516f3d41228bc27a08fe9.1699980962.git.daniel@makrotopia.org> <3f5ed9656ea66637d259e9771ed852511369ba9b.1699980962.git.daniel@makrotopia.org> From: Guen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Btiw7GchKKri2gDhRb2QNNDyBnQn5mRFw7CyuFclAksOdV/sdpQnYlYcRQWOUGY HhQ5eqTRZjm9z+qQe/T0HQpmiPTqQcIaG/edgKVTUjITfA7AJMKLQHgp04Vylb+G6jocnQQX JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAlVcpi8FCRmg08MACgkQyx8mb86fmYHNRQ/+ J0OZsBYP4leJvQF8lx9zif+v4ZY/6C9tTcUv/KNAE5leyrD4IKbnV4PnbrVhjq861it/zRQW cFpWQszZyWRwNPWUUz7ejmm9lAwPbr8xWT4qMSA43VKQ7ZCeTQJ4TC8kjqtcbw41SjkjrcTG wF52zFO4bOWyovVAPncvV9eGA/vtnd3xEZXQiSt91kBSqK28yjxAqK/c3G6i7IX2rg6pzgqh hiH3/1qM2M/LSuqAv0Rwrt/k+pZXE+B4Ud42hwmMr0TfhNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= 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, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 10:06:16 -0800 (PST) On 11/20/23 09:33, Daniel Golle wrote: > On Mon, Nov 20, 2023 at 09:19:46AM -0800, Guenter Roeck wrote: >> On 11/14/23 09:04, Daniel Golle wrote: >>> [...] >>> @@ -89,6 +93,11 @@ static const struct mtk_wdt_data mt7986_data = { >>> .toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM, >>> }; >>> +static const struct mtk_wdt_data mt7988_data = { >>> + .toprgu_sw_rst_num = 24, >> >> Kind of odd to have this defined locally, while the others are in include files, >> but not worth arguing about. > >>From I have just learned from Krzysztof Kozlowski those headers shouldn't > even exist in first place, as the listed IDs are not actually referenced > anywhere in the driver, hence they aren't actually bindings [1]. > > Quote from that thread: > | >>> Where is the driver change using these IDs? > | >> It isn't needed as the driver doesn't list the IDs. [...] > | > Then it is not a binding. > --- > > Now that they do exist it's too late to change that for everything > already existing, I suppose. However, it also doesn't seem like adding > such a header for MT7988 as well is going to be acknowledged, hence we > will have to live with the inconsistency in the driver in which older > SoCs will obtain the number of resets from a macro in their respective > dt-bindings header while newer SoCs won't have such header and hence > it will have to be defined in the driver itself (as that's also the > only place where that number is being used). > As I said, not worth arguing about. However, it seems to me that "too late to change that for everything" isn't really correct. If MTxxxx_TOPRGU_RST_NUM isn't supposed to be in devicetree include files, all those defines could be removed from the from there and be added to the watchdog driver. I don't know about the other defines in include/dt-bindings/reset/mediatek,mtXXXX-resets.h - many of those _are_ used in dtsi files, but many others are not. In summary, while I don't really know/understand what is supposed to be defined in include/dt-bindings/, whatever is known to _not_ to be there (such as the total number of reset pins on a SoC) could be moved into the driver(s) using it. Of course, it might well be that there is a rule saying that anything in include/dt-bindings/ must not be removed from it even if it is not supposed to be there. In that case, my apologies for the noise. Thanks, Guenter