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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D15CAD10390 for ; Wed, 26 Nov 2025 09:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s87fVsHQCvU+HWvbjFd9PPX59bcd2k1mD7vUClox+OM=; b=MU+IIJC6zOYN5E gaUqUnOBqfBDBVse16bAGBWl5VG4vT5b5uXNVoylDgCNEWj9lymDIc+59piKneJX3agVUhm+haTKE nVn7JtUBPcGJwtkhM1yFnHUfLkEsKiKkuoycmH2C+tLJbkpbhtewxPFlVCkSOYhd2F3AhnCUjvnbY jbEqWG+x14G9Y/GmbEeAqkG7Mg2v7msgldnLYAChig93+na6vTSXl0Vo0tA1XlwfPugIvpegCjbEx iwcwk5aoHYjmmLoQmt45YkkDJIQmJ/MiZhHw2APPYKsolKPIKReEA0mLGWGQ50E3PjZ0uJtvk1SmM /6NCT6OlWLat7x8j9KzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vOC3V-0000000EjQq-49lY; Wed, 26 Nov 2025 09:43:22 +0000 Received: from mgamail.intel.com ([192.198.163.18]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vOC3S-0000000EjPt-17VW; Wed, 26 Nov 2025 09:43:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1764150198; x=1795686198; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=CCg+lZSEq+WcXEQmJQne7xQ4oE1yxypysTDuDghy64Q=; b=iBDS2yOuRT9lKKYMJ1kxUPgu/X+Pm81Heeg6xmprFhycjI1/Ddu45gLJ sU4+kAegRTlNDQHkGB4rCkIpjGY1eJQbRUs88cKTdzpMg7J+zokYgAUl7 xWMDT5mZ/xg/zIOMoiM+3Y/fpHvw0YzEiiwe9G/EpPxE84hu/yJ23y9kd tSsDShBgxcwaAdDNLewzfBbN63X/1rIqn4HJRxXouVQxgV9vACAZEheGm Jicxk4asYOHcLhXm94K5bX289tf392rPRg0kCKvMsqHKMeWJSXUgRHXBw /aVrVY/L0Ai6UkHrVIEYiKC2dCZRTRASKR/8oSwfPWmi5Qb10DZFBRsAr g==; X-CSE-ConnectionGUID: eXU6AcowSISKJNzT/EAQQA== X-CSE-MsgGUID: /8iNkcs7SqitRaRQmfe0vg== X-IronPort-AV: E=McAfee;i="6800,10657,11624"; a="65371596" X-IronPort-AV: E=Sophos;i="6.20,228,1758610800"; d="scan'208";a="65371596" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2025 01:43:14 -0800 X-CSE-ConnectionGUID: B+T8YiSeRD+/P6Odm3S47w== X-CSE-MsgGUID: B/YD/UVbQWaORjBCGIUAVA== X-ExtLoop1: 1 Received: from iherna2-mobl4.amr.corp.intel.com (HELO kuha) ([10.124.223.25]) by fmviesa003.fm.intel.com with SMTP; 26 Nov 2025 01:42:55 -0800 Received: by kuha (sSMTP sendmail emulation); Wed, 26 Nov 2025 11:42:43 +0200 Date: Wed, 26 Nov 2025 11:42:43 +0200 From: Heikki Krogerus To: Chaoyi Chen Cc: Greg Kroah-Hartman , Chaoyi Chen , Dmitry Baryshkov , Peter Chen , Luca Ceresoli , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Sandy Huang , Andy Yan , Yubing Zhang , Frank Wang , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Amit Sunil Dhamne , Dragan Simic , Johan Jonker , Diederik de Haas , Peter Robinson , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v10 01/11] usb: typec: Add notifier functions Message-ID: References: <20251120022343.250-2-kernel@airkyi.com> <2025112102-laurel-mulch-58e4@gregkh> <462ad1bd-7eec-4f26-b383-96b049e14559@rock-chips.com> <2025112402-unopposed-polio-e6e9@gregkh> <2025112448-brush-porcupine-c851@gregkh> <2025112554-uncaring-curator-642a@gregkh> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251126_014318_343926_F0FCAEC5 X-CRM114-Status: GOOD ( 17.46 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Wed, Nov 26, 2025 at 09:46:19AM +0800, Chaoyi Chen kirjoitti: > On 11/25/2025 7:49 PM, Greg Kroah-Hartman wrote: > >> +static umode_t typec_is_visible(struct kobject *kobj, struct attribute *attr, int n) > >> +{ > >> + if (is_typec_port(kobj_to_dev(kobj)->parent)) > > > > Why look at the parent? Doesn't the device have a type that should show > > this? > > > > Otherwise, looks good to me. > > They have same deivce type "typec_altmode_dev_type". > The parent device has a different device type to distinguish between > port device and partner device. I was already wondering would it make sense to provide separate device types for the port, and also plug, alternate modes, but I'm not sure if that's the right thing to do. There is a plan to register an "altmode" also for the USB4 mode, which of course is not an alternate mode. So USB4 will definitely need a separate device type. So if we supply separate device types for the port, plug and partner alternate modes, we need to supply separate device types for port, plug and partner USB4 mode as well. We certainly can still do that, but I'm just not sure if it makes sense? I'll prepare a new version for this and include a separate patch where instead of defining separate device types for the port and plug alternate modes I'll just supply helpers is_port_alternate_mode() and is_plug_alternate_mode(). thanks, -- heikki _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip