Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2717804rwd; Mon, 22 May 2023 03:19:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Z0ylB45ndiUWmyb0OMD0MJoefwLHVHDuxX9+p4k60rGFFdem06+nSslGLqZUfH161Ychn X-Received: by 2002:a17:903:11cf:b0:1ae:10bc:4ae8 with SMTP id q15-20020a17090311cf00b001ae10bc4ae8mr11733923plh.26.1684750794473; Mon, 22 May 2023 03:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684750794; cv=none; d=google.com; s=arc-20160816; b=vhjh5NLP5cz+P6GS4uE3JK1Nnv7+/qRSPxY5grP10WptdFq9QtnSG6cp1O8Yxyiq48 V/dNqIWaCSbmBBp7cJ13vvuyzoVlUyyqRAag34HDY108Q1C9dGNcPtx8hd3mU6C2WZl3 3/xRoeE0kwOReTfqSYyn9J79lRJOpSDJdcvX1O63ywXAodnN/ozIeXG4gjWhGZikXylP gb+tXELcbLZREKHeIp+vDs4gTeLP/RiT7QyuTiN+CwFO9GUGkqOW2O3WWSr5TuaSbdSH meeFOG8N8Pc8sBDcbpc1MLp8jNX9k/NKq3Px6u9tU1at9E5E3058KAhnRR3b70TcO2+7 s8Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=y85VHUtUE0Yd9XzehlOVr8s22F8p1WsdIXc9zu+tpsM=; b=XnKZKUz5n8EHx+3N+TnIBjxRCShkiaFtAuhAUiOnJ9JMN6eGdSeO7954IO7r49S3px ZPfJ/VPAst/ipclgHhQSONp7COVNAU2yGam66qfrQ0ro9lsT6ikaGGXo3aJ5XmjiipVw u6bTSgM8wK7qXNFCl1Cv71gpkp9qTL8Aq4+Y7rSpXpLEpNFtRuHNTY44I1TcKgyS4NRR kI6LVoJ7dRu8Gfju02qCkCm8e7/ujzic7qc3c1fGa9/n6Xlqz5kshg/Mp5yKKwD3rHc0 Kt8utcKmblkcCXbE3OrBshufLu11IqD8EmzvhrUaU32iLXxbsWgULk1yoldVWWY6QtVJ 3l/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=l8L7ePGq; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a170902e98900b001a669006139si4241649plb.248.2023.05.22.03.19.42; Mon, 22 May 2023 03:19:54 -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=@intel.com header.s=Intel header.b=l8L7ePGq; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232788AbjEVJyf (ORCPT + 99 others); Mon, 22 May 2023 05:54:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232659AbjEVJyX (ORCPT ); Mon, 22 May 2023 05:54:23 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2778CC2; Mon, 22 May 2023 02:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684749262; x=1716285262; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Tpv33id8FXgSyWY15secqhEjCEaHD/wMEKZRfaT7ChE=; b=l8L7ePGqHJgHfE+GKVySJ0ZjsJ3r5rXPC9JPUr2ycjst71zrJnV6Z2R4 3zQYa8m8NIi1jnL6UA1h7X+sU6l7UxWTs8X5RF9Di1IfrAwaaar36dhdl mO/V40e0Ox9flskIMwUOi4eeoHwPULYIJx//sAs+WyL0j5NtkOe9PEL7F ZyKh55ST6x469aakH88C5Ai6GcotboebaJe0fpBmNbssjN2Qq2J797YyP lcqzSub2AXnX8ycBKFI6qfJ6IIF/ufsqCTPzYc2mIg5F0mcdnaPqAh9EW HOS2HQA6/8FywqZgzbsGqwp4lNlC4OHuVwcumuXXiyjfXsxjq3DZQcqsL A==; X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="352900229" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="352900229" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 02:54:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="653884244" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="653884244" Received: from rajatkha-mobl.gar.corp.intel.com (HELO [10.67.146.41]) ([10.67.146.41]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 02:54:16 -0700 Message-ID: Date: Mon, 22 May 2023 15:24:13 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v4] usb: typec: intel_pmc_mux: Expose IOM port status to debugfs Content-Language: en-US To: Greg KH Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230522070343.3675581-1-rajat.khandelwal@linux.intel.com> <2023052216-railway-zipfile-680f@gregkh> From: Rajat Khandelwal In-Reply-To: <2023052216-railway-zipfile-680f@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 Hi, On 5/22/2023 1:07 PM, Greg KH wrote: > On Mon, May 22, 2023 at 12:33:43PM +0530, Rajat Khandelwal wrote: >> IOM status has a crucial role during debugging to check the >> current state of the type-C port. >> There are ways to fetch the status, but all those require the >> IOM port status offset, which could change with platform. >> >> Make a debugfs directory for intel_pmc_mux and expose the status >> under it per port basis. >> >> Signed-off-by: Rajat Khandelwal >> Reviewed-by: Heikki Krogerus >> --- >> >> v4: >> 1. Maintain a root directory for PMC module and incorporate devices >> under it >> 2. Add the debugfs module under '/sys/kernel/debug/usb' >> 3. Use the platform device 'pmc->dev' to assign the device's name >> >> v3: Allocate the debugfs directory name for the platform device with >> its ACPI dev name included >> >> v2: >> 1. Remove static declaration of the debugfs root for 'intel_pmc_mux' >> 2. Remove explicitly defined one-liner functions >> >> drivers/usb/typec/mux/intel_pmc_mux.c | 54 ++++++++++++++++++++++++++- >> 1 file changed, 53 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c >> index 34e4188a40ff..f400094c76f2 100644 >> --- a/drivers/usb/typec/mux/intel_pmc_mux.c >> +++ b/drivers/usb/typec/mux/intel_pmc_mux.c >> @@ -15,6 +15,8 @@ >> #include >> #include >> #include >> +#include >> +#include >> >> #include >> >> @@ -143,8 +145,14 @@ struct pmc_usb { >> struct acpi_device *iom_adev; >> void __iomem *iom_base; >> u32 iom_port_status_offset; >> + >> +#ifdef CONFIG_DEBUG_FS >> + struct dentry *dentry; >> +#endif > No need for the #ifdef anymore, right? In fact, I think it will break > the build if you have it this way and CONFIG_DEBUG_FS is not enabled, > right? I guess you're right. Maybe it'd have been fine if the rest of the debugfs stuff was also enclosed within the conditional macros. Anyways, removing it seems appropriate now. Also, is it OK to send you v5 on the public list directly? Thanks Rajat > thanks, > > greg k-h