Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7820832imu; Tue, 22 Jan 2019 12:14:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN5qkwSqDOpKUwpMF/jz9FLqPtLbrLCwCo7wHtsyL2k6MBNcvVlg60MPmVLMsLYowe1sq8zP X-Received: by 2002:a63:f811:: with SMTP id n17mr34108488pgh.23.1548188075358; Tue, 22 Jan 2019 12:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548188075; cv=none; d=google.com; s=arc-20160816; b=J3qDRtf5WRqRmNsJB886SdeMR0w7keknOJPj5oGP4aouv6FWnhrXep+WofeCJnprbT OLmtVrdodObsKOHtn3ucD4RH0m8LXIUpWx0l16C6gVwTk9pArl9VTjhjyXBedXY//TaR dZo/dWsj5lmRAsJUm13I/8ZqKDmXTZ11dcqbhFDbZP4E9OTTpvrpAYtBrG2hsWhCYvW7 KIrOY5JBjA42IHDWqLbQlpJaQ0JLqBZ/GyZpivMA8Fa/J7qwlAZd6v6g/nkPe4pUBH4Z 8PYWyO8K59H5SIdngB/30FnDe8yknZXKq2478wHWGJDxDDE8IMbMFzd5oLgyQgz+vf+n FL1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=lzB1F40T0BECSjVk/G6PCWKauVkIgx1ZLhCXr/OL7Go=; b=N3BayUzl1xg0FaftALf3v9Z2LvW2RyUVT8bUNBh6U7si0NxqFdip1VnahAozV3EYxT PZuj86XNBgq7EyN6S8gTlUtEB7ZerBPCdV80n0ftZOEmyWr3D1nw48cpUmZJGMGiD0sN ljLWskKo9L2zwgQNW+n0WXB+qHbLQ8EdduzjAUXfjKNSxvGyJzbQTxJ+BFjSGsCZIlsa zrKTkm3JnUq6M3AtdIvw5KwQUjKj/p0bOjObISbFRwf37MrpzHgkFD6Fcgl2/nY0J/pm OTZ5/mpghLpCj4geK2R3uctWQWe2DeyEutvvl6slmRvpbrUNip3/fBd+ipdAPeXu5Bmp Ri1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=YM9GLDOk; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn8si16321512plb.264.2019.01.22.12.14.19; Tue, 22 Jan 2019 12:14:35 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=YM9GLDOk; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbfAVUMw (ORCPT + 99 others); Tue, 22 Jan 2019 15:12:52 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46592 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfAVUMv (ORCPT ); Tue, 22 Jan 2019 15:12:51 -0500 Received: by mail-pl1-f194.google.com with SMTP id t13so11987386ply.13 for ; Tue, 22 Jan 2019 12:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=lzB1F40T0BECSjVk/G6PCWKauVkIgx1ZLhCXr/OL7Go=; b=YM9GLDOk+3AYhoaSB9s0WFl3KB6pVvIpBmK0SgWDzOq74gZvD4vwl+v3Vge+G6tkrZ 5PVx9l7VeUChsX3+PHA6/HsBORkrDvQzlYuAORN7plXWU/NGLCECm2UcriIl6EOZN1xE bZi1XQ7llQNoqEwGEOMoZgrcGRJSEekD4ZRLM= 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-transfer-encoding :content-language; bh=lzB1F40T0BECSjVk/G6PCWKauVkIgx1ZLhCXr/OL7Go=; b=JrgjEaj7g6WGfr1RabJ5ZfwLyQ/OxFJ19f2o5Fy5s4LrO68/q1exACHnD4/rEbe9Xf QwDNNbBKIRgElDR3oj1v1/WZjceb+NpcReE9j/7JIChG0GtNplerkz4sblDd4xKNYVkL Lc1ZJSPJGkM/1AUd+bLzcB4FwsoYB3/b/6bXKyYqyeXuA/A0x3273zCapYduRYNeyTg0 sPZ913eA/1DiKD5w7AByh7OjhZkKFGtu6HFPnTqGI8Q+fcVRs/GRnVHJv9H2aTXgXPAp ygZfPCP7SE0EuL/jBurkTMjrIL7CkXTpScCjHkTzyvzFx31NY0+ayanlWBSpz1KTrXQB coMw== X-Gm-Message-State: AJcUukdtpl01+b5SPH1OEwjUDiinN9BKFcXFIG1qVi4ZBpiRaDE8/BiM dYTrIuXMD2GPbx+UXIBKqCiCdQ== X-Received: by 2002:a17:902:b01:: with SMTP id 1mr36296019plq.331.1548187971203; Tue, 22 Jan 2019 12:12:51 -0800 (PST) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id l85sm26297518pfg.161.2019.01.22.12.12.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 12:12:50 -0800 (PST) Subject: Re: [PATCH 1/3] dt-bindings: pwm: kona: Add new compatible for new version pwm-kona To: Rob Herring Cc: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , 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 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> <20190121231105.GA928@bogus> From: Scott Branden Message-ID: <9b2dd73d-3a38-3a68-d37c-490811ed80ee@broadcom.com> Date: Tue, 22 Jan 2019 12:12:46 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190121231105.GA928@bogus> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 2019-01-21 3:11 p.m., Rob Herring wrote: > 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. No DT change would be necessary in any case. A check against the SOC type in the driver without additional DT compatibility strings could be done. > >>> 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... Please point me at such documentation. There is no consistency in kernel drivers from what I have seen. > >> "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