Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3121700rdh; Thu, 28 Sep 2023 03:23:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIqdOEGOt8tBLcz7E8sYSnozqjQ0/IOwzb3tNvRz7d3Ak76+dpuMTTXPIWcghAhzIBLMCR X-Received: by 2002:a17:902:720a:b0:1bb:b30e:4364 with SMTP id ba10-20020a170902720a00b001bbb30e4364mr605532plb.39.1695896612676; Thu, 28 Sep 2023 03:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695896612; cv=none; d=google.com; s=arc-20160816; b=ASEmbfhRFxhl1XwEecs1rovmsuqH2F6yg7ChcobHmFqcsoWaGZ5oG8cLrnh3D1xc3/ Lawh4A8xS3GXCDTnwDMBrHwKli+d2blrYYospXjLyandz8SunxnrMr6Hfj1sgBNc8I53 cfwsYajsPFQA3+oUS7gbb56XPNjkrejYzyBVd9xjH+tePx6fH4yUyxQSNMpEL8wPm2Ug hn8gO/pMUIxFygmj/4Gck5PH5QbAzVT3cMVqUa6yTN/HwokOhXn7V+3tyKIxcZ6sNtjW 3ycrUymOn8ij4Jn3u08WGo3cCijT/L0H+dTLWsMCHeXzU3Btk9nP+hY3NRNcz9tBKFp7 iftQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=16HPbAIF0KxSDAv7A2kqSkSfgf23118g+srCqqLlUyo=; fh=t1fwPz7FTYD2uJXQFiexFCS5XcGJs78EriKQRB/eYNQ=; b=Opqg/yJFqVMCscoMwqH09k3AzLATQNQgU6xOYZsLds01SFWJAc8O64TJiQbEbgNTr0 108EBm3uVp1mmHe20bgw0KrCLmFzqyRLDeJ2a6zT3wFdU/bH2fVEjOBXt8xtvqZq+iCm +460H7A8iK9FlSuoP4fQZv64w2tBb9SBwuHAs0oRA0tJoB7+lA9W8pkCdFYJOs1Wt5jQ VGDknpl23rOgT3mjStXJbgyLNvHdampwqzL3kG+h+GR3f1BGaggUNJprN/h6QFwD53H4 gFz/BG4ZzgFmIuONGk+8ZF0hYLjQjb0kEeKPvwDM7au7c5M5OaLnxygvRfvtEsJzrgyE 05tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=PsH2Fx4s; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=VHKj0JAt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id km11-20020a17090327cb00b001c4248c3f8bsi16617716plb.559.2023.09.28.03.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 03:23:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=PsH2Fx4s; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=VHKj0JAt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id DC61C8299E1C; Thu, 28 Sep 2023 03:07:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230503AbjI1KHx (ORCPT + 99 others); Thu, 28 Sep 2023 06:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbjI1KHv (ORCPT ); Thu, 28 Sep 2023 06:07:51 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5B55194; Thu, 28 Sep 2023 03:07:49 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1B3F85C25ED; Thu, 28 Sep 2023 06:07:47 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 28 Sep 2023 06:07:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1695895667; x=1695982067; bh=16 HPbAIF0KxSDAv7A2kqSkSfgf23118g+srCqqLlUyo=; b=PsH2Fx4sdu8I1G6WJq dcOCqaWVZnmVfsHQeyDxC0zwLh3ARMGM1doSQwNyuhdTJv+Td+p3/DtsD5hg7h+N EXISVysMCCVGSGO9Jvh4vjejy193LyWKcLb9z/jxhB/hmkqShVQmWuESkVHpz6ZS faJgl9CExx3yXKwdy63xlLdwujUCoD2wFEu4dKnPJh2BCxC17g1W1SxoJtCFeIat Uln3U+t6R61vp5bFQLAAqDkHsCwMdQQJcgJGENfRfLQZCx08dnTK7++Ruj36j1NT GABQtJjawL6E+gg0tQsVfYZUzju8Z8eISdd+831+rsLkynIWCJMWE7SEyhqhcyap S6Xw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1695895667; x=1695982067; bh=16HPbAIF0KxSD Av7A2kqSkSfgf23118g+srCqqLlUyo=; b=VHKj0JAtIseHmp2Zv91ZZ4tNcBC+J 9D/EVrUgC6bhTkYb5W23jt7J9BG+oluC2deIhcKdnCztsl+XYxKN4/dP4zoWZInn MzBwqyOybmJV3uSUMjZxlDacqSx279EjoqEUi0ECZOfjHNT+HQw0C5B78ZqIeRaW +aAb54aUiERQYBVODa7xxi51xs1zSNqe/0GETN2YYElVM8Hw9vRqd2ZoaoICjZt0 NmTsldiwWEfYWIDGrzur79ZNmDD3pHPtaP8mgI2uF4XwIpomY2s4aMBv3QrNk/Ak Sb+nHflxFUWzy4ygVIR0N5ZQGh2lrdNLbGTfC7x/cJMDr3d9jejsfPY9Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvjedrtdeigddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B9EB1B60089; Thu, 28 Sep 2023 06:07:46 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-958-g1b1b911df8-fm-20230927.002-g1b1b911d MIME-Version: 1.0 Message-Id: <839638d2-7502-4925-8b7f-6b15779a6840@app.fastmail.com> In-Reply-To: <20230928092804.22612-3-eliza.balas@analog.com> References: <20230928092804.22612-1-eliza.balas@analog.com> <20230928092804.22612-3-eliza.balas@analog.com> Date: Thu, 28 Sep 2023 12:07:26 +0200 From: "Arnd Bergmann" To: "Eliza Balas" Cc: "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "derek.kiernan@amd.com" , "dragan.cvetic@amd.com" , "Greg Kroah-Hartman" , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 2/2] drivers: misc: adi-axi-tdd: Add TDD engine Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 28 Sep 2023 03:08:00 -0700 (PDT) On Thu, Sep 28, 2023, at 11:28, Eliza Balas wrote: > This patch introduces the driver for the new ADI TDD engine HDL. > The generic TDD controller is in essence a waveform generator > capable of addressing RF applications which require Time Division > Duplexing, as well as controlling other modules of general > applications through its dedicated 32 channel outputs. > > The reason of creating the generic TDD controller was to reduce > the naming confusion around the existing repurposed TDD core > built for AD9361, as well as expanding its number of output > channels for systems which require more than six controlling signals. > > Signed-off-by: Eliza Balas Thanks for your submission, I've had a first look at the driver and the implementation of the interface you have chosen looks all good to me, so I have no detailed comments on that. It would however help to explain the ideas you had for the user-space interface design and summarize them in the changelog text. You have chosen a low-level interface that wraps the individual device registers and gives user space direct control over them. The risk here is to lock yourself into the first design, giving you less flexibility for future extensions, so it would help to understand what the usage model is here. One risk is that there may be an in-kernel user in the future when the TDD engine interacts with another device, so you need a driver level interface, which would in turn break if any user pokes the registers directly. Another possible problem I see is that an application written for this driver would be incompatible with similar hardware that has the same functionality but a different register-level interface, or even a minor revision of the device that ends up breaking one of the assumptions about the hardware design. In both cases, the likely answer is to have a higher-level interface of some sort, but the downside of that would be that it is much harder to come up with a good interface that covers all possible use cases. Another question is whether you could fit into some existing subsystem instead of creating a single-driver interface. drivers/iio/ might be a good choice, as it already handles both in-kernel and userspace users, and provides a common abstraction for multiple classes of devices that (without any domain knowledge in my case) look similar enough that this could be added there. Arnd