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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 34FA6C52D6F for ; Tue, 27 Aug 2024 03:26:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F80910E13F; Tue, 27 Aug 2024 03:26:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="VOn1wGVY"; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 590C710E13F for ; Tue, 27 Aug 2024 03:26:10 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 85D53CE0F47; Tue, 27 Aug 2024 03:26:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2C1BC8B7A9; Tue, 27 Aug 2024 03:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724729166; bh=P3O3alY1dOWsnBgRxMhJRgQyWOYsqQUpM59bPHtbPjc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VOn1wGVYWxDe/+cBrO7rnjlhZ4SckN/0/Weo/9m7YtiJc5WIsv8XnimZjLrwczA0R J9JjajHqHP56SId9uRHq/KwbOfwaSH1+mFuyZXWdiM9mJk+GtX1CG58p3y+cvwO+0w GLCiZypGUmm9XNayBpWahGBM7w6O1e7KjOS0AucLr3RZZJpugZfv+BkhCM/uXJUtSL rdW/+sSUU6jh6/PLJ3TyTvebP6A6AtXe4Ek4lLpDZMG2R/uGRWM+L+iuWnj69TmX2X v9SQriQJbAK8qNWcEYag6uH5urWlzesH3Iy5oaqHZ1mltRXDd4UH2+TEqcO0iv6SGi bMfz8sUI7D5HA== Date: Tue, 27 Aug 2024 03:25:58 +0000 From: Tzung-Bi Shih To: Stephen Boyd Cc: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, patches@lists.linux.dev, devicetree@vger.kernel.org, Douglas Anderson , Pin-yen Lin , Andrzej Hajda , Benson Leung , Conor Dooley , Daniel Vetter , David Airlie , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, Guenter Roeck , Jernej Skrabec , Jonas Karlman , Krzysztof Kozlowski , Laurent Pinchart , Lee Jones , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Prashant Malani , Robert Foss , Rob Herring , Thomas Zimmermann , Alexandre Belloni , Andy Shevchenko , Daniel Scally , Greg Kroah-Hartman , Heikki Krogerus , Ivan Orlov , linux-acpi@vger.kernel.org, linux-usb@vger.kernel.org, Mika Westerberg , "Rafael J . Wysocki" , Sakari Ailus , Vinod Koul Subject: Re: [PATCH v3 15/17] platform/chrome: cros_ec_typec: Add support for signaling DP HPD via drm_bridge Message-ID: References: <20240819223834.2049862-1-swboyd@chromium.org> <20240819223834.2049862-16-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Aug 23, 2024 at 01:47:23PM -0700, Stephen Boyd wrote: > Quoting Tzung-Bi Shih (2024-08-22 07:35:13) > > On Mon, Aug 19, 2024 at 03:38:29PM -0700, Stephen Boyd wrote: > > > +struct cros_typec_dp_bridge { > > > + struct cros_typec_data *typec_data; > > > + struct drm_dp_typec_bridge_dev *dev; > > > +}; > > > > It looks like structs are all defined in cros_ec_typec.h. I think this struct > > definition can be also moved there. > > I put it here because it wasn't used by any other driver. Maybe I can > skip the entire struct though and add what I need directly to 'struct > cros_typec_data'. I see. * struct cros_typec_altmode_node, used by cros_ec_typec.c. * struct cros_typec_data, used by cros_ec_typec.c and cros_typec_vdm.c. * struct cros_typec_port, used by cros_ec_typec.c and cros_typec_vdm.c. cros_typec_switch.c has another struct cros_typec_port. To simplify, I'm not sure whether we should merge cros_ec_typec.h, cros_typec_vdm.c, and cros_typec_vdm.h into cros_ec_typec.c. Back to struct cros_typec_dp_bridge, I think it's fine to keep it as is. > > > > > > diff --git a/drivers/platform/chrome/cros_ec_typec.h b/drivers/platform/chrome/cros_ec_typec.h > > > index deda180a646f..73d300427140 100644 > > > --- a/drivers/platform/chrome/cros_ec_typec.h > > > +++ b/drivers/platform/chrome/cros_ec_typec.h > > > @@ -27,6 +27,8 @@ struct cros_typec_altmode_node { > > > struct list_head list; > > > }; > > > > > > +struct cros_typec_dp_bridge; > > > > If the struct definition moves here, it doesn't need to declare forward. > > But then we have to forward declare 'struct cros_typec_data'? There's no > escape. I see.