Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp14146rdb; Mon, 4 Dec 2023 18:18:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGL1wpc53kUMEufpbMPeb6xbVufBjA8StbHB0IORr9X+DVbBupS0zhbRo7an45aaO/6h5hW X-Received: by 2002:a05:6a20:12ce:b0:187:4329:f06d with SMTP id v14-20020a056a2012ce00b001874329f06dmr958916pzg.31.1701742686367; Mon, 04 Dec 2023 18:18:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701742686; cv=none; d=google.com; s=arc-20160816; b=pi2wBosvl+yo/uvDyRWVJerf4sMvSHEz5Pov6IqnEOMDQPrdolg9uZVO5vKbcPuJY6 fcKkdIrT04+vWQys5VB8R7cZ+Yz0IL6vT3wOfnKT+j7sJb8e2hu3NKN+W5vpmlDZho9J pJBAnQBb6mkYxcLFJIr3Q08e9eSCKh+GD+izoVIMhAiqrnCn2Ks79KMxQT3RW/yHJ8Ys kSVh77JUnuifej8sj6z4g7Nkl/yiY/ENxzzQMvGt/2J9rSMr8NFLNoTFO+IihLv9Z5EQ XJIq85NyEXpI3HLjAwX2r8C9VzU6j1LDPJNqcqbMv/lCYjqNRFgp7mKHHhWuORi1hGYP FWOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=vPJvy9bVFngLkrhGi51evHf7fJQO0P4Cb3VBwR94R8M=; fh=Xqelef1/lXP0mDpCC46p6G/t6FAq8/3H/CAWeFKFVYE=; b=zRNhZFJqDJxDw6X0k5IGLVSJ55HPSsMgx5ySJ37nTRIOohRijwhjVmdSXA7jzAFCJk rhguKs4adbqbVlByctwpYux5OOJn2HAaqCYU/toSbS4t661gSf/+Xhge40tDe/sdBLCH lHscW3B+mGOC852kEcQmIGopEWI4iEg4kW1nmN4CgIkbq658OBEo460lVQ5N5hlxdz6e bcpXGePwueEkol5gI1nuZASm6IvHR0jeOxVBeI3Z41vOcXzIvU5GqVsy18uXr2YCLx7i vAvwWPy74KktWX2IPACB8vKP+RJ7H5dZlN3McBAdyhzwd9qcpJ/yuMjBAaBOXUkRZwB8 Q5fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QPhJIaUR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id y2-20020a63fa02000000b005be1ee5b9dfsi4425131pgh.454.2023.12.04.18.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 18:18:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QPhJIaUR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id E3E8380C711A; Mon, 4 Dec 2023 18:18:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343867AbjLECRt (ORCPT + 99 others); Mon, 4 Dec 2023 21:17:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231565AbjLECRr (ORCPT ); Mon, 4 Dec 2023 21:17:47 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77D19A0 for ; Mon, 4 Dec 2023 18:17:54 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BAF2C433C8; Tue, 5 Dec 2023 02:17:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701742674; bh=CFuIQBFb4jQLP5hJXSZ1DamnTQmlulyUK6o3iWa+amA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QPhJIaURVkaehK07DiA9eU7x4cF/P10zqZmv6Gx6GiTtbUDmQj0fxdb3uMce1NdRd Owsw6ukeGy96FxYtXL22lMsoYsmwV/mAD+NnJJAVP8VdZ8jPdk4EzbSrFQXjT8FJSe lhRshCmKH/h7Sl5BVk3rEILYGeDJ7sYgmaTdwDai9aoSfefuSLBrDlZLZQJmqVuAsV xYQsCXgbVQEm908rvw/PNhrpFfPiMv3vClnnexPXg6hG1UdLiKdEsS+PFesBI+hIcH 7j0YdVgbRmhefip2PIRQ2fIZTkS2brQi+sl6Ly+WF6TjpJBvwHh5DSPTpDS9C9yQp9 f1GbEGR3xDw4A== Date: Mon, 4 Dec 2023 18:17:52 -0800 From: Jakub Kicinski To: Andrew Lunn Cc: Christian Marangi , Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Paolo Abeni , David Epping , Vladimir Oltean , Harini Katakam , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next PATCH v3 3/3] net: phy: add support for PHY package MMD read/write Message-ID: <20231204181752.2be3fd68@kernel.org> In-Reply-To: <20231128133630.7829-3-ansuelsmth@gmail.com> References: <20231128133630.7829-1-ansuelsmth@gmail.com> <20231128133630.7829-3-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Mon, 04 Dec 2023 18:18:04 -0800 (PST) On Tue, 28 Nov 2023 14:36:30 +0100 Christian Marangi wrote: > +/** > + * phy_package_write_mmd - Convenience function for writing a register > + * on an MMD on a given PHY using the PHY package base addr, added of > + * the addr_offset value. > + * @phydev: The phy_device struct > + * @addr_offset: The offset to be added to PHY package base_addr > + * @devad: The MMD to read from > + * @regnum: The register on the MMD to read > + * @val: value to write to @regnum > + * > + * Same rules as for phy_write(); > + * > + * NOTE: It's assumed that the entire PHY package is either C22 or C45. > + */ > +/* > + * phy_package_write_mmd - Convenience function for writing a register > + * on an MMD on a given PHY using the PHY package base addr, added of > + * the addr_offset value. > + */ > +int phy_package_write_mmd(struct phy_device *phydev, > + unsigned int addr_offset, int devad, > + u32 regnum, u16 val); Hm, I see there's some precedent here already for this duplicated semi-kdoc. It seems a bit unusual. If I was looking for kdoc and found the header one I'd probably not look at the source file at all. Andrew, WDYT?