From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2A3AC2B9F8 for ; Tue, 25 May 2021 06:13:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A093261413 for ; Tue, 25 May 2021 06:13:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A093261413 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jWckrni+derXRERU0k7crWY3bX4UuSVAnCd1lHL3uGw=; b=4qzITwOXGYaLdtod+h/H4f2eb Djknb8KpPRAL1+9129T+gM+sGcsfdFiaQJVR9nGB7CUgBJtIZ5iKGoCRE0Q1/Cv4Zw5MjOtov6qga 1pdvCliw5GproxnCdrF51y7QEeJ5ind3zPB0yKB40WgVcuaMMhdJoCG/mwVR/gyf1t1VZvqW9Twg2 U7fESUrUNOkBl2dU4m51G16NaA1bQy5Jd/DxVXTONZwImYcOIdfTVB9yIIFIfYijhDKMRymjgaPq0 FdhJN6dzgAbSaSY0hEzQ1l80gMII+V5uAQ9zNgEKtIIKF4N4j9usND9F5tAGmY36jGs09RNiPg0VT BkWdG7F0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llQI7-003Yos-3D; Tue, 25 May 2021 06:11:47 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1llQI3-003Ynl-5e for linux-arm-kernel@lists.infradead.org; Tue, 25 May 2021 06:11:44 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llQHu-0003jC-9d; Tue, 25 May 2021 08:11:34 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1llQHr-0001vZ-U0; Tue, 25 May 2021 08:11:31 +0200 Date: Tue, 25 May 2021 08:11:31 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Sean Anderson , Michal Simek Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Thierry Reding , Alvaro Gamez , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Daniel Lezcano , Lee Jones , Thomas Gleixner , kernel@pengutronix.de Subject: Re: [PATCH v3 2/2] clocksource: Add support for Xilinx AXI Timer Message-ID: <20210525061131.omrbcdewf4z75ib7@pengutronix.de> References: <20210511191239.774570-1-sean.anderson@seco.com> <20210511191239.774570-2-sean.anderson@seco.com> <5f960034-174d-0ed8-9f52-3d5fde90e16a@seco.com> <9f227f96-a310-0fbd-fd34-91eb386306b9@xilinx.com> <7a06cf46-0f85-1edb-ca08-abd7b2543ad9@seco.com> <41542760-3967-4f9a-0f0c-1206e03ff494@xilinx.com> <2296d4e5-717a-0470-d487-e0924cf6c076@xilinx.com> MIME-Version: 1.0 In-Reply-To: <2296d4e5-717a-0470-d487-e0924cf6c076@xilinx.com> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210524_231143_251617_3CF12D9F X-CRM114-Status: GOOD ( 47.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1876719911587720635==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1876719911587720635== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wn37yka2xnftryhr" Content-Disposition: inline --wn37yka2xnftryhr Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Sean, hello Michal, On Mon, May 24, 2021 at 09:00:51AM +0200, Michal Simek wrote: > On 5/20/21 10:13 PM, Sean Anderson wrote: > > On 5/19/21 3:24 AM, Michal Simek wrote: > >> On 5/18/21 12:15 AM, Sean Anderson wrote: > >>> This could be deprecated, but cannot be removed since existing device > >>> trees (e.g. qemu) have neither clocks nor clock-frequency properties. > >> > >> Rob: Do we have any obligation to keep properties for other projects? If a binding is in the wild and used to be documented, it has to stay. > >>>> 4. Make driver as module > >>>> 5. Do whatever changes you want before adding pwm support > >>>> 6. Extend DT binding doc for PWM support > >>>> 7. Add PWM support > >>> > >>> Frankly, I am inclined to just leave the microblaze timer as-is. The = PWM > >>> driver is completely independent. I have already put too much effort = into > >>> this driver, and I don't have the energy to continue working on the > >>> microblaze timer. > >> > >> I understand. I am actually using axi timer as pwm driver in one of my > >> project but never had time to upstream it because of couple of steps a= bove. > >> We need to do it right based on steps listed above. If this is too much > >> work it will have to wait. I will NACK all attempts to add separate > >> driver for IP which we already support in the tree. > >=20 > > 1. Many timers have separate clocksource and PWM drivers. E.g. samsung, > > =A0=A0 renesas TPU, etc. It is completely reasonable to keep separate > > =A0=A0 drivers for these purposes. There is no Linux requirement that e= ach > > =A0=A0 device have only one driver, especially if it has multiple funct= ions > > =A0=A0 or ways to be configured. >=20 > It doesn't mean that it was done properly and correctly. Code > duplication is bad all the time. IMHO it's not so much about code duplication. Yes, code duplication is bad and should be prevented if possible. But it's more important to not introduce surprises. So I think it should be obvious from reading the device tree source which timer is used to provide the PWM. I don't care much if this is from an extra property (like xilinx,provide-pwm), overriding the compatible or some other explicit mechanism. IIUC in this suggested patch the selection is implicit and so this isn't so nice. > > 2. If you want to do work on a driver, I'm all for it. However, if you > > =A0=A0 have not yet submitted that work to the list, you should not gate > > =A0=A0 other work behind it. Saying that X feature must be gated behind= Y > > =A0=A0 *even if X works completely independently of Y* is just stifling > > =A0=A0 development. >=20 > I gave you guidance how I think this should be done. I am not gating you > from this work. Your patch is not working on Microblaze arch which is > what I maintain. And I don't want to go the route that we will have two > drivers for the same IP without integration. We were there in past and > it is just pain. > I am expecting that PWM guys will guide how this should be done > properly. I haven't heard any guidance on this yet. > Thierry/Uwe: Any comment? Not sure I can and want to provide guidance here. This is not Perl, but still TIMTOWTDI. If it was me who cared here, I'd look into the auxiliary bus (Documentation/driver-api/auxiliary_bus.rst) to check if it can help to solve this problem. =20 > > 3. There is a clear desire for a PWM driver for this device. You, I, and > > =A0=A0 Alvaro have all written separate drivers for this device because= we > > =A0=A0 want to use it as a PWM. By preventing merging this driver, you = are > > =A0=A0 encouraging duplicate effort by the next person who wants to use= this > > =A0=A0 device as a PWM, and sees that there is no driver in the tree. >=20 > We should do it cleanly that it will be easy to maintain which is not by > creating two separate drivers or by switching to completely new driver. +1 Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --wn37yka2xnftryhr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmCslRAACgkQwfwUeK3K 7Ak7YQf/TpIJXkF7drwqBVWLD73Z149/8vSGvkDfPtqJrQq3/B+cxJ2dd9+ehIPH 3HmLTLu2Uv/BUylaRgFZj8FH0vszNMgRyskYTdbyGgrXti63GhAJDad1C/o8xOax 92rsl/YE6PqHz6htoyjjq3XxPjKZyeuWtYAQop+IsKYy06p+H0N3d5A+Rdx/YVwC IWYfKTrFejAIHADFJuWSesyr8AVjiz5hGq6l8BUd7vkpZ8QS3G3KV0j4aYhgPTpe Bai+4VHoArdJYF/jBIcBzT5Oxa8W8xtie1Nu5O5E3XTj6gXuzpxPxCwudML62K85 dBVqeYouJgmtxoicWFMRXQ0dFmWWMQ== =DZ2s -----END PGP SIGNATURE----- --wn37yka2xnftryhr-- --===============1876719911587720635== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1876719911587720635==--