Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6749438imu; Mon, 21 Jan 2019 15:12:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN5OSOZiMKG3ztIIIyvAhli4W26VgShKH4cOqwoFJrryIPQgW7OVwwa8BN79elAfHzftBMza X-Received: by 2002:a17:902:108a:: with SMTP id c10mr32244222pla.131.1548112352292; Mon, 21 Jan 2019 15:12:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548112352; cv=none; d=google.com; s=arc-20160816; b=ayMx4r89jE8l7ojQ+gq1IEyKG5j4b8O7IlnEra3NE4YtanExgAz7jK/QTsGSzK0f0s 2+sqTOEyKmj2aI7pUk1yesWabpHYqbzmmX0/n5MWTpljV/KVNx/3Pgo7eL5WJc+m0y7Y qn11WeoZT/RFx9tjRO/mAwHV9JEAzC8M9UDO4UqwOvC7q0KKfY0vnv839oaMj1fLd59A oDw/7TKi1Rm8Q9eUkdWR3TFYb+ZY0pdUfvZegFiECC6gJe1M5HqJPqZza1Qjuu+Xh+PI ocsUHjpMFVndO6j1wUI2twoLk0ePN5p01FRIjfNpUNRHty75vcMpoRiwW6KDRyPQ5D2u BtMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=NwNeLn0NpBVarhMV52VLX7e0pWYxS9hGh57kuH7rECo=; b=Y5eMHbf3tmghIN5nVWCj2dv+ki4tVXMa6IjcPCdFCGEqEcyEE8U8Jbi7/6dEJ88Xn6 Ch6yrf2CDhCHKM+tuSRgHKbEn5tdsGyQaB3KjqNR1lDG2qZhWcQRO1ppTenAKy6RnFJu 1KGsSEyZRAWCAtj0xpCruPZbpTIuxtpZU9skrD77I69yUeEAbEmgZX4YemQwyX+z7diB 0ZagBZfOIbO8X3HkOUg0r1avWzJCCoj2HD+yCPaoZo+uc6mg/FuAPjznPFjkBtreMxRi GprwSdAnctfnxbgGukYEF2XlY26R7bKVERWweBDi8CxxwKBDCMo/VwzNalqZgWV6Uf10 fSVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si13506387plt.111.2019.01.21.15.12.16; Mon, 21 Jan 2019 15:12:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727869AbfAUXLJ (ORCPT + 99 others); Mon, 21 Jan 2019 18:11:09 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:40758 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727153AbfAUXLI (ORCPT ); Mon, 21 Jan 2019 18:11:08 -0500 Received: by mail-oi1-f195.google.com with SMTP id t204so15880695oie.7; Mon, 21 Jan 2019 15:11:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=NwNeLn0NpBVarhMV52VLX7e0pWYxS9hGh57kuH7rECo=; b=dfpxx+zB2XrTQiAJIV4InP7GDgek68mJUWjQVxvrOHtpFZXbWnVoLVmHwC7rr/loh3 641jtQRBzOMooXyh5xl24onN4gJMuncbUba5uPiRvmCBGAZ5TxCJwnMl8d69e0sP1zwM 48JFBsanxIGK7GACfKg6j6rg7b7quFVE772Be8KhCFkDRIeOiCb8Gb8X1v/n3OKcmytY uKllrcI8LHbs0bQHXa0HWMNCg9vTRmDm9lSZKgW7EEMg9mywfYX+CkjX6T0T3AvtEbMZ ICQcpQuMIZFR3wOECin4gejlwDhrQ6rx8NDn51jPTQwZbUCgrnPvK5+ouzUh+HCux9ik 5DhQ== X-Gm-Message-State: AJcUukel2lAzvvQzLxcMtjpH+ouMOHO5bcYM1c1wTsvzWmBGZR8imdqt l3w4kkWWbI0TWKnHHr25atPCVvgZmA== X-Received: by 2002:aca:abcd:: with SMTP id u196mr7058419oie.29.1548112267236; Mon, 21 Jan 2019 15:11:07 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id 30sm6047743ots.52.2019.01.21.15.11.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 15:11:06 -0800 (PST) Date: Mon, 21 Jan 2019 17:11:05 -0600 From: Rob Herring To: Scott Branden Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Sheetal Tigadoli , Thierry Reding , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Praveen Kumar B Subject: Re: [PATCH 1/3] dt-bindings: pwm: kona: Add new compatible for new version pwm-kona Message-ID: <20190121231105.GA928@bogus> References: <1547184076-20521-1-git-send-email-sheetal.tigadoli@broadcom.com> <1547184076-20521-2-git-send-email-sheetal.tigadoli@broadcom.com> <20190111204801.2ytdeblcai7lg3on@pengutronix.de> <20190112150515.i7mwq7rtd62wlifh@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 15, 2019 at 04:14:21PM -0800, Scott Branden wrote: > Hi Uwe, > > On 2019-01-12 7:05 a.m., Uwe Kleine-K?nig wrote: > > Hello Scott, > > > > On Fri, Jan 11, 2019 at 01:28:45PM -0800, Scott Branden wrote: > > > On 2019-01-11 12:48 p.m., Uwe Kleine-K?nig wrote: > > > > On Fri, Jan 11, 2019 at 10:51:14AM +0530, Sheetal Tigadoli wrote: > > > > > From: Praveen Kumar B > > > > > > > > > > Add new compatible string for new version of pwm-kona > > > > > > > > > > Signed-off-by: Praveen Kumar B > > > > > Reviewed-by: Ray Jui > > > > > Reviewed-by: Scott Branden > > > > > Signed-off-by: Sheetal Tigadoli > > > > > --- > > > > > Documentation/devicetree/bindings/pwm/brcm,kona-pwm.txt | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/pwm/brcm,kona-pwm.txt b/Documentation/devicetree/bindings/pwm/brcm,kona-pwm.txt > > > > > index 8eae9fe..d37f697 100644 > > > > > --- a/Documentation/devicetree/bindings/pwm/brcm,kona-pwm.txt > > > > > +++ b/Documentation/devicetree/bindings/pwm/brcm,kona-pwm.txt > > > > > @@ -3,7 +3,7 @@ Broadcom Kona PWM controller device tree bindings > > > > > This controller has 6 channels. > > > > > Required Properties : > > > > > -- compatible: should contain "brcm,kona-pwm" > > > > > +- compatible: should contain "brcm,kona-pwm" or "brcm,kona-pwm-v2" > > > > Is v2 used on a newer generation of kona SoCs? On i.MX these variants > > > > are usually named after the first SoC that came with the new variant. Is > > > > this sensible here, too? > > > It doesn't make as much sense here as different revs of the IP block are > > > picked up based on various decisions. > > > > > > A new SoC could decide to use an old version. > > IMHO this is no reason to not use the name of the oldest SoC with this > > variant. I don't know how the SoC names are in the broadcom family, but > > if they were (in order of age, oldest first): > > > > ant > > bear > > crocodile > > > > and ant and crocodile use the same IP block we would have > > > > a) with v1, v2: > > > > ant: > > compatible = "brcm,kona-pwm-v1"; > > bear: > > compatible = "brcm,kona-pwm-v2"; > > crocodile: > > compatible = "brcm,kona-pwm-v1"; Version numbers can be fine, but generally only as fallbacks as even the same IP version can be integrated into an SoC differently. The other issue with versions is they should be meanful such as corresponding to version tags in IP repos. Often, I'd guess anything with a 'v1' is just what some s/w person made up. Of course, we only can really know that for opensource IP or programmable logic IP. If you do use versions, document what the versioning scheme is. > > > > ; and > > > > b) with the SoC naming: > > > > ant: > > compatible = "brcm,kona-ant-pwm"; > > bear: > > compatible = "brcm,kona-bear-pwm"; > > crocodile: > > compatible = "brcm,kona-crocodile-pwm", "brcm,kona-ant-pwm"; This is the recommended practice. > > > > (If you want, drop "brcm,kona-crocodile-pwm", but keeping it is more > > defensive.) Generally, you should have "brcm,kona-crocodile-pwm" in case there's some difference found later. Then you can support the bug or feature without a DT change. > > > > I like b) (with "...-crocodile-...") better than a). crocodile using > > "...-ant-..." is not more ugly than crocodile using "...-v1". This is > > also a tad more robust because if broadcom releases kona-dolphin and > > someone finds a minor difference between the IPs used on ant and > > crocodile it depends on the order of these events who gets v3, while > > with the SoC naming the result is clear. > > > > (OK, and given that "brcm,kona-pwm" is already fixed, both approaches > > need slight adaption, but I guess you still get what I meant.) > > Thanks for your thoughts and explanation. > > It is unfortunate devicetree has no proper guidelines or documentation on > > binding naming.? In the interest of getting this upstream we can name it Surely we've captured that somewhere... > > "brcm, omega-pwm".? We can drop kona from the binding name as that > architecture > > is really no more - only IP derived from it is - hence the name kona-v2 > previously. > > > > > Best regards > > Uwe > > > > > Cheers, > Scott