Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1028555rwl; Fri, 31 Mar 2023 05:58:22 -0700 (PDT) X-Google-Smtp-Source: AKy350Zy82gd46kZc8Up9syDGXmM09qav0H3x5Mm6GmRz0UJhkKLkfFpouNleEDh6jB07x99F9Dv X-Received: by 2002:a05:6402:34c6:b0:502:1cf6:f52c with SMTP id w6-20020a05640234c600b005021cf6f52cmr6817755edc.4.1680267501791; Fri, 31 Mar 2023 05:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680267501; cv=none; d=google.com; s=arc-20160816; b=baSD9DjJIvzof5GgICSljvIsE98mstHAkv0sqQEx6tfUoK98JOArRe2PMbMHv5zvD6 yYRFe1f5Sb17T8wmZt/KrvRi5ph0jv02oNmlXeNLNp6sqqs+FauG3VjvD8lyyFbDmjmv +nSThOh+eumhLgCIAyt5V+Gbv6sOgIvh8nKPkkWUrG3d2pieCl+t0DVJf+BiZOhYXoaw b2G8eVCSte3u6m/7iin+Rh67CW9repUKD/S8W3YAqbO/z7EqHwnP14qlhKl50GvgGpN9 jyigih4o4X48Yjk4VDkDwXUoNqbR7yPRoWsx01sz5rPcvUHmPmyatwaurhTG9NlOALPc D1gA== 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=+Oc7fnMhQHzNj0HXIXXoSdujcdt4segVEP7/1Tk5JuY=; b=TRDAsmKLVSuObzoellaFw5X51+wNPXAnRDVJwiXzbn/Wilm+iB9a8Yr/i2N2Iox46f oqDn8LOTnrwZQuWVoUhteinFhBlw5UXKX7r6Bdk6vj3OVo2+hQ6DSN8hQ99nNZNWDjq3 2wlud4YnFPKI6Y5N6PkPAXzeQAB9Xz3OWKPp2fVTvPj8KCAR4+CUB1L7jU+8DJbGei76 da2iLNuSH2bbobprdGWNpnzHeXYEUiYLkV1x3KeZ+I9sYNe6zM1osy7qbD+IXrGxO+0M C6Jxw9icJPHhHkMLpSkXP+4yuXLKyhSENZnEag+w/fLBwZ7x4bzm1JFdEy5lkUEvwaM5 G4vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=wgKJnhLg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h26-20020a50ed9a000000b005004b4ca08dsi2029122edr.599.2023.03.31.05.57.56; Fri, 31 Mar 2023 05:58:21 -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=wgKJnhLg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231661AbjCaMxH (ORCPT + 99 others); Fri, 31 Mar 2023 08:53:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232599AbjCaMxB (ORCPT ); Fri, 31 Mar 2023 08:53:01 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E79220DBF; Fri, 31 Mar 2023 05:52:47 -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=+Oc7fnMhQHzNj0HXIXXoSdujcdt4segVEP7/1Tk5JuY=; b=wgKJnhLgc6yB0txSCPwANSQaW8 A2uYtnOrIDgGg8ZDFO9aURsO8ypjTIKS3yJKWK/zQlD4awrh5quqpom4IrLUarU3XRkrTSuk7BWGX XlJl7Dqic9hh7VQFrA9fbmEd9A3B5yRvjyuLOT0aqaPUvRd91XCL5+N1Tuze7TwpSBmE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1piEF0-0091oo-KR; Fri, 31 Mar 2023 14:52:26 +0200 Date: Fri, 31 Mar 2023 14:52:26 +0200 From: Andrew Lunn To: "Radu Pirea (OSS)" Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC net-next] net: phy: introduce phy_reg_field interface Message-ID: References: <20230331123259.567627-1-radu-nicolae.pirea@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230331123259.567627-1-radu-nicolae.pirea@oss.nxp.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 On Fri, Mar 31, 2023 at 03:32:59PM +0300, Radu Pirea (OSS) wrote: > Some PHYs can be heavily modified between revisions, and the addresses of > the registers are changed and the register fields are moved from one > register to another. > > To integrate more PHYs in the same driver with the same register fields, > but these register fields were located in different registers at > different offsets, I introduced the phy_reg_fied structure. > > phy_reg_fied structure abstracts the register fields differences. Hi Radu You should always include a user of a new API. It makes it easier to understand and review if you see both sides of an API. Please turn this into a patchset, and make use of this new functions in a driver. Andrew