Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp545648rdb; Mon, 15 Jan 2024 05:59:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8a02gVv/1hgHKC5u5WTuTONlQHWuZ4ERlNl5XEWuMZtUS/2oLYwFIkB6xRjq6Rrmvi1zC X-Received: by 2002:a17:906:39c4:b0:a26:8a1f:7f9a with SMTP id i4-20020a17090639c400b00a268a1f7f9amr2502751eje.133.1705327178249; Mon, 15 Jan 2024 05:59:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705327178; cv=none; d=google.com; s=arc-20160816; b=L+bTHVsnXb5lweuAemRVod9mDifQ5v1DwnAVAdhWViNWHzi5kSXsuq5nKFdo1jyXiq lkheu90pmE1YU5e9ly2JOSpdZht6setgyUsofrCUO/VXO0mmjKpMlOAmPPPhHJeeVP6+ gcd98X6X2SQmj/16ELO7pRiiCcpTknurhccGOcbDRd5MJMfRFOoCr9gnVnVUZoVkElfa PjLmV3AOaRwab42EJ8vAvc663xE+B30EOb1CSUGXpVMw+JwkK99v96Xh++ruoy+YxRsN Uitb2B5uhWj0CLpJbgN4GaamyVTe09WH1lvcbmkgke3qcKDukcX6o667vZ5m3DHgbpIk a9Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=v9zubsnxgeJRAGptwPfne63ZFN0gFgFDdU8Ty40J5kk=; fh=cPQRwfwyEfIXQuV9MzQz7Shpbdo83D1rpBN3keMz1LU=; b=R3k97KximuyZdwT9qjT1FXCVtUuBDccGy3l6/3nCmOEn+Jd7p9uItiKOCiYHMuIDma tAbqBWE9G747ZV2wbxHVk5Fyj07FuzWH4SbZcBmp7KrqWY6PRdZI2EMMLR8ySmPzmmV+ 4Gu8UV5Bo/rQV+I276homVSgWv+ipynHH2Q7/MaXOyIO7C2bnd190hsml/iBqPUqRufi QjVKQT1erGKb6CVkxZsVTDwNRRmyYSEzTiaonwzuy0Dq+RgIWAInrDojhoFykfMxJRnY ZVSzmIq87aeHgp/Ok0nINewK5VHTKJv0/j8b6+KncrmsQe8yAYnM0Nq/zFAs0tSwuTwQ eOTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-26065-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26065-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o5-20020a17090637c500b00a2c4a3ffc83si3783071ejc.675.2024.01.15.05.59.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 05:59:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26065-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-26065-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26065-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CEEC51F21CDB for ; Mon, 15 Jan 2024 13:59:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5632617590; Mon, 15 Jan 2024 13:59:25 +0000 (UTC) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE90C17584; Mon, 15 Jan 2024 13:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-dbedb1ee3e4so7115395276.3; Mon, 15 Jan 2024 05:59:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705327161; x=1705931961; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nCoI6wmXQhas4p+QHjRACvDabiOp6RlTb///RFp+bYk=; b=tiSTZFK9+adD4pS2CiBp3H8TjNvhxoFkiEeyDJM3qLno8Xx43Uvjdy/whJLepRGP40 f/JUNxXcbwBC1NiMKrPQ5O6mjxsEMayOZw+l7hP+OGkvJ0cIlp9/xrESL6ud2rc14k5c +g4LU/CdOIf1P42IpSu7NCDGmFEWWr8a34O/gElzv6KrM0MO5K/Qxo1/E4zAPazwrvcz iAzMy4H6DJ4l8hwdexcGGRgmLQxnHtYDmYYfHnlNJC6S723bxAXTI6frA3GfAEDGGtJ0 idx+3WYRQKDVqknRh6cJB2Lh44m1MIyWNgsSDwT+H0KWkJS4ugZ3/y4ecfpbQ2cOsGwi VyKw== X-Gm-Message-State: AOJu0Yw+ysJ8APvGt4ir1qpo8FTztilyNSmmUF09L5UA6NgCR2jYtVdT g/D3hUPw+w1FiPxLKxUmpTfNug4I8TlWKw== X-Received: by 2002:a05:6902:2687:b0:db5:c77d:1fae with SMTP id dx7-20020a056902268700b00db5c77d1faemr2834232ybb.29.1705327161525; Mon, 15 Jan 2024 05:59:21 -0800 (PST) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com. [209.85.219.180]) by smtp.gmail.com with ESMTPSA id c6-20020a25a2c6000000b00d9caecd5c86sm3481218ybn.62.2024.01.15.05.59.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jan 2024 05:59:20 -0800 (PST) Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-dbed5d2ad18so7074363276.0; Mon, 15 Jan 2024 05:59:20 -0800 (PST) X-Received: by 2002:a25:ad8b:0:b0:dbe:e4d3:bbb7 with SMTP id z11-20020a25ad8b000000b00dbee4d3bbb7mr2479427ybi.99.1705327159968; Mon, 15 Jan 2024 05:59:19 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <183bc01316cab97a7ae96df525a5a450c477210d.1704788539.git.ysato@users.sourceforge.jp> In-Reply-To: <183bc01316cab97a7ae96df525a5a450c477210d.1704788539.git.ysato@users.sourceforge.jp> From: Geert Uytterhoeven Date: Mon, 15 Jan 2024 14:59:08 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [DO NOT MERGE v6 09/37] dt-bindings: timer: renesas,tmu: add renesas,tmu-sh7750 To: Yoshinori Sato Cc: linux-sh@vger.kernel.org, Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Thomas Gleixner , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Greg Kroah-Hartman , Jiri Slaby , Magnus Damm , Daniel Lezcano , Rich Felker , John Paul Adrian Glaubitz , Lee Jones , Helge Deller , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Yang Xiwen , Sebastian Reichel , Linus Walleij , Randy Dunlap , Arnd Bergmann , Vlastimil Babka , Hyeonggon Yoo <42.hyeyoo@gmail.com>, David Rientjes , Baoquan He , Andrew Morton , Guenter Roeck , Stephen Rothwell , Azeem Shaikh , Javier Martinez Canillas , Max Filippov , Palmer Dabbelt , Bin Meng , Jonathan Corbet , Jacky Huang , Lukas Bulwahn , Biju Das , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Sam Ravnborg , Sergey Shtylyov , Michael Karcher , Laurent Pinchart , linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-fbdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Sato-san, On Tue, Jan 9, 2024 at 9:23=E2=80=AFAM Yoshinori Sato wrote: > Add SH7750 TMU entry. > > I wanted to replace interrupts and interrupt-names in the if compatible i= s > "renesas,tmu-7750", but it seems that I can't rewrite it as expected. > This resulted in a redundant conditional statement. > > Signed-off-by: Yoshinori Sato Thanks for your patch! > --- a/Documentation/devicetree/bindings/timer/renesas,tmu.yaml > +++ b/Documentation/devicetree/bindings/timer/renesas,tmu.yaml > @@ -39,14 +39,15 @@ properties: > - renesas,tmu-r8a779a0 # R-Car V3U > - renesas,tmu-r8a779f0 # R-Car S4-8 > - renesas,tmu-r8a779g0 # R-Car V4H > + - renesas,tmu-sh7750 # SH7750 OK > - const: renesas,tmu > > reg: > maxItems: 1 > > - interrupts: > - minItems: 2 > - maxItems: 3 > + interrupts: true > + > + interrupt-names: true I would drop this change (see below). > > clocks: > maxItems: 1 > @@ -75,21 +76,55 @@ required: > - clock-names > - power-domains > > -if: > - not: > - properties: > - compatible: > - contains: > - enum: > - - renesas,tmu-r8a7740 > - - renesas,tmu-r8a7778 > - - renesas,tmu-r8a7779 > -then: > - required: > - - resets > - > additionalProperties: false > > +allOf: > + - if: > + not: > + properties: > + compatible: > + contains: > + enum: > + - renesas,tmu-r8a7740 > + - renesas,tmu-r8a7778 > + - renesas,tmu-r8a7779 > + - renesas,tmu-sh7750 Adding renesas,tmu-sh7750 to this list is OK. > + > + then: > + required: > + - resets > + > + - if: > + not: > + properties: > + compatible: > + contains: > + enum: > + - renesas,tmu-sh7750 > + > + then: > + properties: > + interrupts: > + minItems: 2 > + maxItems: 3 > + interrupt-names: > + items: > + - const: tuni0 > + - const: tuni1 > + - const: tuni2 > + > + else: > + properties: > + interrupts: > + minItems: 2 > + maxItems: 4 > + interrupt-names: > + items: > + - const: tuni0 > + - const: tuni1 > + - const: tuni2 > + - const: ticpi2 > + > examples: > - | > #include The new interrupt logic is not really correct: several TMU instances on other SoCs do support the fourth interrupt. It just was not documented before, or supported by the driver. I have sent a patch to document the fourth interrupt[1]. Once that patch has been applied, adding support for sh7751 involves adding just two new lines. [1] "PATCH] dt-bindings: timer: renesas,tmu: Document input capture interrupt" https://lore.kernel.org/r/fb1e38c93e62221f94304edd980a2fb79c1f2995.1705= 325608.git.geert+renesas@glider.be Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds