From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD4CCC3A5A4 for ; Wed, 28 Aug 2019 18:07:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 84E9D206BB for ; Wed, 28 Aug 2019 18:07:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="at4nmbDE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbfH1SHA (ORCPT ); Wed, 28 Aug 2019 14:07:00 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:38480 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbfH1SHA (ORCPT ); Wed, 28 Aug 2019 14:07:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZFvGMza15ngZrDEMw/qc9GUTeA/63ZnQGGVV9mb6/TU=; b=at4nmbDEh46aU3q3P9/CB2+YsF 3HHB6SMsVAaQ8sbF/sKmg7KyQLVkr8BRFDknUQKwwYHDKle465IBrVj7Klv7H8rdT0FBccqq9ogey sRpdwlWsc4Pqh7X+CjViHhH3fox8xsDHB/3d6wQhDhsdh3eMywtSQpqDR0+cxc+uzrcA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1i32LH-000512-Ra; Wed, 28 Aug 2019 20:06:47 +0200 Date: Wed, 28 Aug 2019 20:06:47 +0200 From: Andrew Lunn To: Ong Boon Leong Cc: davem@davemloft.net, linux@armlinux.org.uk, mcoquelin.stm32@gmail.com, joabreu@synopsys.com, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, peppe.cavallaro@st.com, alexandre.torgue@st.com, weifeng.voon@intel.com Subject: Re: [RFC net-next v2 3/5] net: phy: add private data to mdio_device Message-ID: <20190828180647.GA17864@lunn.ch> References: <20190828174722.6726-1-boon.leong.ong@intel.com> <20190828174722.6726-4-boon.leong.ong@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190828174722.6726-4-boon.leong.ong@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Aug 29, 2019 at 01:47:20AM +0800, Ong Boon Leong wrote: > PHY converter device is represented as mdio_device and requires private > data. So, we add pointer for private data to mdio_device struct. Hi Ong This was discussed recently with regard to the xilinx_gmii2rgmii.c driver. You can use the usual dev_get_drvdata() to get private data associated to the device. I did suggest adding wrappers, so you can pass a phydev, or and mdiodev. Andrew