Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1109628ybi; Wed, 17 Jul 2019 09:39:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwazA1IxnJ6Wa5BxeGL2pFgPuccLdgKfcP7vGRa0JVxO98VCTsUH9Ut2XZjJaOis52O9WBl X-Received: by 2002:a63:5b52:: with SMTP id l18mr42435861pgm.21.1563381563286; Wed, 17 Jul 2019 09:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563381563; cv=none; d=google.com; s=arc-20160816; b=JpUbnQPSwUpJ1fhnYtqS5z95zcxdRlzq1XY34SNjMJ5KjVpQ79VPY/eUGCj0RMEmQd ae1oFZXrwbDUqrh48XP5DWBkF5oqU/iBCwBnrHFOirC6t994pXVCFVHTZ0Kcz0LU8BGx hrA1Tbsv66r8760lQKN7L0UozjuLAVJ6G9wvR95PpD6N/vonvQfePDMUbBNGVI8GPtJK ARy5x9k2UdW8WC/bjq8uiszkP4EPvew1wO06Mw4Yy475eakU4h9CLx2sYn0xYvFuCYtr h9HiIszyUQZ1guMvHWBO/Bc4gFO/I8JRIk51kTkPSQF8lJqNr53wglZ/v6HKlYfRp/ZV SeiQ== 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=fru0qBVi9fH+7NOoHlQP7YUY571enGDbVXb+gSwl/zA=; b=L/M8NQ5UUm+4nJ4rv7ODYfxJ12s5g17wzEWY8PzQSSsXTCPje6rCbwZ62VX4JKcalm GL7dnK0XvBdmQ7Afb4z6pwmki0VQqDpGuPNoX6LB8Z/Ji4nR/NoDScYhEyt9ufZdRTg/ wxuQo6gbXwgIg3xh6gvv4mQFOOVa8/jIUT3wbdrdY0516MSAbUoxq54oPYDfFj9hrMn5 /rNhFtv4KKuIT+2MX4KvsTjWbNGSL/nlmMvaxcfAZrYZAiemE1tWyAHQCCJi3L9/fwZM 5hqSMVosL5UhaltR5ka7pz6rZHbnKvlELes0GTRxjPXrqZAHQJrcIjfHi9KJXnY8c5YH PGhA== 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 l19si24160837pgb.204.2019.07.17.09.39.06; Wed, 17 Jul 2019 09:39:23 -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 S1727414AbfGQQh5 (ORCPT + 99 others); Wed, 17 Jul 2019 12:37:57 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:49015 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbfGQQh4 (ORCPT ); Wed, 17 Jul 2019 12:37:56 -0400 X-Originating-IP: 91.163.65.175 Received: from localhost (91-163-65-175.subs.proxad.net [91.163.65.175]) (Authenticated sender: maxime.ripard@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C8C6C60005; Wed, 17 Jul 2019 16:37:53 +0000 (UTC) Date: Wed, 17 Jul 2019 18:37:53 +0200 From: Maxime Ripard To: "Zengtao (B)" 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: <20190717163753.ti6swjfhm7fczcn4@flea> References: <1562868255-31467-1-git-send-email-prime.zeng@hisilicon.com> <20190711112039.leuvelpm7opeoaxq@flea> <678F3D1BB717D949B966B68EAEB446ED2FF5B22D@DGGEMM506-MBX.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED2FF5B22D@DGGEMM506-MBX.china.huawei.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Jul 17, 2019 at 06:36:09AM +0000, Zengtao (B) wrote: > Hi Maxime: > > Thanks for your reply. > > >-----Original Message----- > >From: Maxime Ripard [mailto:maxime.ripard@bootlin.com] > >Sent: Thursday, July 11, 2019 7:21 PM > >To: Zengtao (B) > >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 > > > >* PGP Signed by an unknown key > > > >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? > > > > The phy.h will need to include vendor specific phy headers I'm not sure this is an issue. > and the union phy_configure_opts will become more complex. And this was the plan all along. > I don't think this is a good solution to include all vendor specific > phy configs into a single union structure. The thing is, as Sakari have stated, this interface was meant as a generic way to negotiate a configuration between a PHY consumer and a PHY provider (ie, whatever sends data to the phy and the phy itself). If you remove the explicit type check, then you need to have prior knowledge (and agreement) on both sides, which breaks the initial intent. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com