Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10442148ybi; Thu, 11 Jul 2019 05:25:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrE+fHLHjHWjHp6lNcSGZQ6RZvsI1nDGKcYWPLIz9l5rLNHm9gssPTM0RVHwlJ4aRPHfSy X-Received: by 2002:a63:460c:: with SMTP id t12mr4142278pga.69.1562847925806; Thu, 11 Jul 2019 05:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562847925; cv=none; d=google.com; s=arc-20160816; b=ikF1aHCRl9iK19GpfU7R1wrOUTgDeJS9Pcg1Y+bxIyzAMM4yp5ta35EFhs7i9qYUYx 7y5pDt1R9XHIjnhJv9gK6HGhg6Op3fQ3YzHUrD6ZpHnnx5sXnALel/LUKDf5wGpKrPAR Jn3trqTD31dpo8V+V5XAFOj8TbSVW2JXVZH+WK0RkhlznX+i2uYCFGEILl6hjoHIFQlI AVeVtlnn37/2yL9Xs8o1y3G+3dBV4pV7b1tpe5ysGYzW58BWWS6R2yuFyKki6k1EC7Ts lQrxVNmVJwDkIr7pmSgL4KkLSUrtr7T0aVjX9Cl4lt65TPgfPYMMmuIfwxz+K2QF/AZQ RhUg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EEn1EJLpo5V/fo4+zGWrxCwCfVj6x8Qzf8esf1cNTNU=; b=PZ8/+aPHGiij9NFXI9wNWoDQdZ4J+W+g6aozFCsrbBF46Wn3re2dpjfjsUd6cqUa0i sfvm+fEswewizJZCz2X2GHaNu3LN0oW5Ldy/J3RFWllWlzPXJmh+xFAAJM52Or8RBkct +gCVxWyaUWqb+HKnUZc8HzbG63gErFkM14vNyaEB+IJEbvtVOfzHlVKT3lqoCNSG9yqE kDPF60pR3VCW/V7VS+rSaNvrANnDXnQTvY+nHvm+mCiK76W96e+qHMd4JkjVgwLsNJIK H96g131Vj91kGDD93HVufH8YQgoDGmjBm51cMkvVhWxfmSq2SmsRkDT+M2RPammFjdB3 /s6g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u191si5117110pgd.281.2019.07.11.05.25.09; Thu, 11 Jul 2019 05:25:25 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728655AbfGKMXK (ORCPT + 99 others); Thu, 11 Jul 2019 08:23:10 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:50895 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbfGKMXK (ORCPT ); Thu, 11 Jul 2019 08:23:10 -0400 X-Originating-IP: 86.250.200.211 Received: from localhost (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: maxime.ripard@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 9FD24C0004; Thu, 11 Jul 2019 12:23:07 +0000 (UTC) Date: Thu, 11 Jul 2019 13:20:39 +0200 From: Maxime Ripard To: Zeng Tao Cc: kishon@ti.com, Chen-Yu Tsai , Paul Kocialkowski , Sakari Ailus , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] phy: Change the configuration interface param to void* to make it more general Message-ID: <20190711112039.leuvelpm7opeoaxq@flea> References: <1562868255-31467-1-git-send-email-prime.zeng@hisilicon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c2tecu4d2tdhze26" Content-Disposition: inline In-Reply-To: <1562868255-31467-1-git-send-email-prime.zeng@hisilicon.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --c2tecu4d2tdhze26 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jul 12, 2019 at 02:04:08AM +0800, Zeng Tao wrote: > The phy framework now allows runtime configurations, but only limited > to mipi now, and it's not reasonable to introduce user specified > configurations into the union phy_configure_opts structure. An simple > way is to replace with a void *. I'm not sure why it's unreasonable? > We have already got some phy drivers which introduce private phy API > for runtime configurations, and with this patch, they can switch to > the phy_configure as a replace. If you have a custom mode of operation, then you'll need a custom phy_mode as well, and surely you can have a custom set of parameters. Since those functions are meant to provide a two-way negotiation of the various parameters, you'll have to have that structure shared between the two either way, so the only thing required in addition to what you would have passing a void is one line to add that structure in the union. That's barely unreasonable. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --c2tecu4d2tdhze26 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXScbegAKCRDj7w1vZxhR xR7EAP44QxBQgbt8VyM5okXONW5XGgzi5lMv3iAHBL15ZA3WXwEAnVGOHiv5Ouz3 Bw95hMz8t5Qmcma+5/zZiPcoNIPCdwA= =sALA -----END PGP SIGNATURE----- --c2tecu4d2tdhze26--