Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1707798iob; Thu, 19 May 2022 12:24:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqkDF+BN5dS7T4v7bD87F0E/jlIF6rLcIq3oFvh4BU5TzViQLRcXWpBkl17X6iXYtKWkTM X-Received: by 2002:a17:903:41d1:b0:161:cfc9:45f7 with SMTP id u17-20020a17090341d100b00161cfc945f7mr6236036ple.44.1652988244265; Thu, 19 May 2022 12:24:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652988244; cv=none; d=google.com; s=arc-20160816; b=Nb7zB2yakDB0pBEsxC6AdjD0vwJSB7JK4QNP1YKNJ6SUjnaZoHGKvXPBHTzRUdc5EU SXoTSyahjSm3nzEnd34hpUO9wnReTHm3LonjgmkYIwwEunIuV4F5KQkmTlnlprOdNnqU py0aq7wlgzmAPx9zZv3T2KNN3p49RkBeMXCfthQbo/X53ou3z/j9ehF0+tWRGghINPAm JwF0vK1HaUmUD7Zc91mvu0n+gLHUI4ZILoHTEDyp7NuMQ4N+Bw/hqPR1IzVxaUttlTQ6 EAXOUuJOpyskKqjXT2KzAUshOqD32tMKPZqVmMeH2GIAmqMA5zcZzJyYwK3GpC7H4qaK 9veQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dceFmCzIuiCcP5wjFfn/yD7Fkn2zWgT79IgEeu48Yi0=; b=C/5WVwAL/wcxEYO4+iP74PaWSrvguCH9LY1iRLfRZs7g4+J6/jgE0CejoOWovT07Yq x948eeqm5924wYBoKdOaSmom7R0YOLWsiGQIuK0M66lqjfmimj1axUeRv5EAaEr54Rsg Ps7pFvUsIjFjkh8dpD2jhp/6cdF9Ce2hdwHBC6UTYFlJ1Fmwjyj0CB8abRTFCF5N4NGp 8JKHEAUTbkGikYn5HX0uHGmM4Qxgp/q/iyUqh/xBBfHCFblRnUiBTB1U+QbF4ePCKk+g F4pej0lhJT8rwt6dwOl12A0rJunRDWhPoCOEt6Bciy0PnFmYZQXnJk61jntF6jjy6/Vh mdCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=b1Nrjuas; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu17-20020a17090b389100b001dfef58d071si488480pjb.124.2022.05.19.12.23.51; Thu, 19 May 2022 12:24:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=b1Nrjuas; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239709AbiESO2T (ORCPT + 99 others); Thu, 19 May 2022 10:28:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236562AbiESO2S (ORCPT ); Thu, 19 May 2022 10:28:18 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AB0266ACF; Thu, 19 May 2022 07:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=dceFmCzIuiCcP5wjFfn/yD7Fkn2zWgT79IgEeu48Yi0=; b=b1Nrjuass/+FK8zHD3AIL1ECm/ obo77XUp7+TJsL3t/I2yMs52kIqRd8QD6T9T2TjHxo8V8LmdX4aSRXP3Y555VTwfNuNtYl9kkhaHS NXurg3TofCsoFwWUEW4qdYNIrtIbxV5WGhqGcvAl1PtukDXwCSDmzAjrqdssLPfb0BCc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nrh8P-003UvM-5o; Thu, 19 May 2022 16:28:13 +0200 Date: Thu, 19 May 2022 16:28:13 +0200 From: Andrew Lunn To: Maxime Chevallier Cc: davem@davemloft.net, Rob Herring , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Richard Cochran , Horatiu.Vultur@microchip.com, Allan.Nielsen@microchip.com, UNGLinuxDriver@microchip.com Subject: Re: [PATCH net-next 4/6] net: phy: Add support for inband extensions Message-ID: References: <20220519135647.465653-1-maxime.chevallier@bootlin.com> <20220519135647.465653-5-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220519135647.465653-5-maxime.chevallier@bootlin.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int phy_set_inband_ext(struct phy_device *phydev, u32 mask, u32 ext) > +{ > +/* > + * TODO : Doc > + */ > +enum { > + __PHY_INBAND_EXT_PCH = 0, > +}; I'm not so happy with this API passing masks and values, when you are actually dealing with a feature which is a boolean, exists, does not exist. > +int phy_inband_ext_enable(struct phy_device *phydev, u32 ext); > +int phy_inband_ext_disable(struct phy_device *phydev, u32 ext); I would prefer enum phy_inband_ext ext; phy_inband_ext_set_available(struct phy_device *phydev, enum phy_inband_ext ext); and add phy_inband_ext_set_unavailable(struct phy_device *phydev, enum phy_inband_ext ext); Internally you can then turn these into operations on a u32. Andrew