Message ID | 20230118084343.26913-2-chunfeng.yun@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2236173wrn; Wed, 18 Jan 2023 01:37:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJW38cw/xjica8uFCBI81uBImtgLGDR9nHC8wUdRACERDrn14oPpqJ/Usom2JONpS6MQS8 X-Received: by 2002:a17:90a:ba09:b0:229:306b:6111 with SMTP id s9-20020a17090aba0900b00229306b6111mr6011388pjr.20.1674034643178; Wed, 18 Jan 2023 01:37:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674034643; cv=none; d=google.com; s=arc-20160816; b=vivSbdPJoKZMdqAkUQKvqScP1gTP445aFBnC3AFkbvnt6XlGyskuR4ONEeJOgDz8Hn dxpKdIQejpzGzuEOumjkvL0bwkIGPjjIRhK2VwHnCpj5rWzfl7JiMg9cU+FVsQk/REKY f62aQhM7ZVp7nEYM/ccSDwPEy7bhefGJ8CMlLOTreV3MAAEy8GBm5xI3EZCTD0gYnIB9 QIV4Jc5kxnVg3Fvsk/ZtcydXKt5zs92PXsMmzKGOZKQ/Ny+F/eC+/YpBwUNnOGrzobLt PI2o5Lz59QbGZy7rdmiL17UzgkHAkzEEzaZKwT3RFdPxTG1iwyQ3M3KON9gn5rE4fnt8 qilQ== 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:date:subject:cc:to:from :dkim-signature; bh=wi5UY5wYjAKEw29TcABVtPFmRKOtecoPlbXcffhZgNI=; b=GI5Cl00+4yNGwFAxDy/MhpeBsTeMAzw2w/fl2e2jGTNW9G7hEUhx28Ln3RG1fPv1PO LaPGu225EsygTcPgpbrK5aHybaGaa6PQAS/oOxaP+/ngofYcBT5nCqW09fr1mtcxXk7y 8A5b6MAsF8VREHreJtiH3fgxjEz+PpdK0xcbj2MfyNbKhebED+X6KJh4FLaqXVsLyN02 h9S1AMPGSkGEjqn1iNb10sejhfwjFn9YeQYtoMhxy72mzhUBYpmwaUMOnG++JY1cD6QH /L8j/4e6KsX3UYOE56px1CZCWniFHnKZrA1Y5VJ66TGj9Sy7vYpoZ1oDv1dOc4hv9cBQ sutg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=iEv9E3nu; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020a17090a588200b0022919cb441bsi1583013pji.38.2023.01.18.01.37.11; Wed, 18 Jan 2023 01:37:23 -0800 (PST) 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=@mediatek.com header.s=dk header.b=iEv9E3nu; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbjARJaf (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Wed, 18 Jan 2023 04:30:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbjARJVP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Jan 2023 04:21:15 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8366E5D132 for <linux-kernel@vger.kernel.org>; Wed, 18 Jan 2023 00:43:54 -0800 (PST) X-UUID: 38e7075a970c11ed945fc101203acc17-20230118 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=wi5UY5wYjAKEw29TcABVtPFmRKOtecoPlbXcffhZgNI=; b=iEv9E3nu+evn1OmvvtcF4nKJs2jE19GxwyafyYyScnt0hoKKEJxPeLMAhvCYCsaaFRmSGo/IOr0hNUi07s8JJ+VkApsNn45CeZ2wv/BP1GqW0Q7vkX2vxs53J3gLv7ZAWpIJqMdXV35s/riLjd/j1jNzoVhyLfbVt26rSyclmog=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.18,REQID:3ec6e9d8-0943-4c74-b705-26efdd17f41f,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:3ca2d6b,CLOUDID:a22c9a8c-8530-4eff-9f77-222cf6e2895b,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: 38e7075a970c11ed945fc101203acc17-20230118 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from <chunfeng.yun@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 400821164; Wed, 18 Jan 2023 16:43:46 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Wed, 18 Jan 2023 16:43:46 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Wed, 18 Jan 2023 16:43:45 +0800 From: Chunfeng Yun <chunfeng.yun@mediatek.com> To: Vinod Koul <vkoul@kernel.org> CC: Chunfeng Yun <chunfeng.yun@mediatek.com>, Kishon Vijay Abraham I <kishon@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, "Nathan Chancellor" <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Tom Rix <trix@redhat.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <llvm@lists.linux.dev>, Eddie Hung <eddie.hung@mediatek.com> Subject: [PATCH v7 2/3] phy: core: add debugfs root Date: Wed, 18 Jan 2023 16:43:42 +0800 Message-ID: <20230118084343.26913-2-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118084343.26913-1-chunfeng.yun@mediatek.com> References: <20230118084343.26913-1-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,RDNS_NONE, SPF_HELO_PASS,T_SPF_TEMPERROR,UNPARSEABLE_RELAY autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755352550165811454?= X-GMAIL-MSGID: =?utf-8?q?1755352550165811454?= |
Series |
[v7,1/3] phy: mediatek: remove temporary variable @mask_
|
|
Commit Message
Chunfeng Yun (云春峰)
Jan. 18, 2023, 8:43 a.m. UTC
Add a debugfs root for phy class, then phy drivers can add debugfs files
under this folder.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v2~v7: no changes
---
drivers/phy/phy-core.c | 6 ++++++
include/linux/phy/phy.h | 2 ++
2 files changed, 8 insertions(+)
Comments
Il 18/01/23 09:43, Chunfeng Yun ha scritto: > Add a debugfs root for phy class, then phy drivers can add debugfs files > under this folder. > > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On 18-01-23, 16:43, Chunfeng Yun wrote: > Add a debugfs root for phy class, then phy drivers can add debugfs files > under this folder. > > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> > --- > v2~v7: no changes > --- > drivers/phy/phy-core.c | 6 ++++++ > include/linux/phy/phy.h | 2 ++ > 2 files changed, 8 insertions(+) > > diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c > index d93ddf1262c5..2f9f69190519 100644 > --- a/drivers/phy/phy-core.c > +++ b/drivers/phy/phy-core.c > @@ -11,6 +11,7 @@ > #include <linux/export.h> > #include <linux/module.h> > #include <linux/err.h> > +#include <linux/debugfs.h> > #include <linux/device.h> > #include <linux/slab.h> > #include <linux/of.h> > @@ -1204,6 +1205,9 @@ void devm_of_phy_provider_unregister(struct device *dev, > } > EXPORT_SYMBOL_GPL(devm_of_phy_provider_unregister); > > +struct dentry *phy_debug_root; > +EXPORT_SYMBOL_GPL(phy_debug_root); Please make this a member of struct phy, that way all phy drivers have access to this and we wont need to export this! > + > /** > * phy_release() - release the phy > * @dev: the dev member within phy > @@ -1233,6 +1237,8 @@ static int __init phy_core_init(void) > > phy_class->dev_release = phy_release; > > + phy_debug_root = debugfs_create_dir("phy", NULL); > + > return 0; > } > device_initcall(phy_core_init); > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index b1413757fcc3..c398749d49b9 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -205,6 +205,8 @@ struct phy_lookup { > #define devm_of_phy_provider_register_full(dev, children, xlate) \ > __devm_of_phy_provider_register(dev, children, THIS_MODULE, xlate) > > +extern struct dentry *phy_debug_root; > + > static inline void phy_set_drvdata(struct phy *phy, void *data) > { > dev_set_drvdata(&phy->dev, data); > -- > 2.18.0
On Thu, 2023-02-02 at 18:41 +0530, Vinod Koul wrote: > On 18-01-23, 16:43, Chunfeng Yun wrote: > > Add a debugfs root for phy class, then phy drivers can add debugfs > > files > > under this folder. > > > > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> > > --- > > v2~v7: no changes > > --- > > drivers/phy/phy-core.c | 6 ++++++ > > include/linux/phy/phy.h | 2 ++ > > 2 files changed, 8 insertions(+) > > > > diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c > > index d93ddf1262c5..2f9f69190519 100644 > > --- a/drivers/phy/phy-core.c > > +++ b/drivers/phy/phy-core.c > > @@ -11,6 +11,7 @@ > > #include <linux/export.h> > > #include <linux/module.h> > > #include <linux/err.h> > > +#include <linux/debugfs.h> > > #include <linux/device.h> > > #include <linux/slab.h> > > #include <linux/of.h> > > @@ -1204,6 +1205,9 @@ void devm_of_phy_provider_unregister(struct > > device *dev, > > } > > EXPORT_SYMBOL_GPL(devm_of_phy_provider_unregister); > > > > +struct dentry *phy_debug_root; > > +EXPORT_SYMBOL_GPL(phy_debug_root); > > Please make this a member of struct phy, that way all phy drivers > have access > to this and we wont need to export this! Ok, I'll modify it, thanks > > > + > > /** > > * phy_release() - release the phy > > * @dev: the dev member within phy > > @@ -1233,6 +1237,8 @@ static int __init phy_core_init(void) > > > > phy_class->dev_release = phy_release; > > > > + phy_debug_root = debugfs_create_dir("phy", NULL); > > + > > return 0; > > } > > device_initcall(phy_core_init); > > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > > index b1413757fcc3..c398749d49b9 100644 > > --- a/include/linux/phy/phy.h > > +++ b/include/linux/phy/phy.h > > @@ -205,6 +205,8 @@ struct phy_lookup { > > #define devm_of_phy_provider_register_full(dev, children, xlate) \ > > __devm_of_phy_provider_register(dev, children, THIS_MODULE, > > xlate) > > > > +extern struct dentry *phy_debug_root; > > + > > static inline void phy_set_drvdata(struct phy *phy, void *data) > > { > > dev_set_drvdata(&phy->dev, data); > > -- > > 2.18.0 > >
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index d93ddf1262c5..2f9f69190519 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -11,6 +11,7 @@ #include <linux/export.h> #include <linux/module.h> #include <linux/err.h> +#include <linux/debugfs.h> #include <linux/device.h> #include <linux/slab.h> #include <linux/of.h> @@ -1204,6 +1205,9 @@ void devm_of_phy_provider_unregister(struct device *dev, } EXPORT_SYMBOL_GPL(devm_of_phy_provider_unregister); +struct dentry *phy_debug_root; +EXPORT_SYMBOL_GPL(phy_debug_root); + /** * phy_release() - release the phy * @dev: the dev member within phy @@ -1233,6 +1237,8 @@ static int __init phy_core_init(void) phy_class->dev_release = phy_release; + phy_debug_root = debugfs_create_dir("phy", NULL); + return 0; } device_initcall(phy_core_init); diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index b1413757fcc3..c398749d49b9 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -205,6 +205,8 @@ struct phy_lookup { #define devm_of_phy_provider_register_full(dev, children, xlate) \ __devm_of_phy_provider_register(dev, children, THIS_MODULE, xlate) +extern struct dentry *phy_debug_root; + static inline void phy_set_drvdata(struct phy *phy, void *data) { dev_set_drvdata(&phy->dev, data);