From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7973D18E37C; Tue, 20 Aug 2024 10:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724148745; cv=none; b=tJr9Pfec/Lcr1yj/9+oyamIIpTvpHIjhwypWt0iPAs3HC1gYfB9mmR9N8o0d6wtJEBp798dkVlXlkqehJoRmQLTutk7vie6pRF2IwPU+Yl5BdzOlOEdM9dIwfdUPgF612UlFwb40SwhkO1hPNhE1ndXlxlqQcdQU/Z0QC8yvI+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724148745; c=relaxed/simple; bh=Xjl8dKDbKgoAq8L7xJ1TWK91PegYT1JH6NvsARQX1wU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GMxe7fHLbbfqwBR5EfDkjsLEerCDOokDC9p+RgdeMI8/S7BInoUj0gKNP1KUZPGQJErz1BJBlLdOCS1tze06oZG5DwHQQpAckFN6FKVSW86e7SrWrsOVhIHpba39sVHd9Z/5H9uVeTxk2kUbToOW32/hZ7tEBJ17rsC68P41uYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=KA/ZAg0t; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KA/ZAg0t" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724148743; x=1755684743; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Xjl8dKDbKgoAq8L7xJ1TWK91PegYT1JH6NvsARQX1wU=; b=KA/ZAg0tZNF1uxbYkQD4kZ+MYT9FWgC74PBa1setBx/Kb8q5fKKYACE1 k6uDxzj1caA5mOiZy1PpxDCnMiyk4aaO5v9pBmuJ2WJZMWyR7ZaOzrmiu njglW5Yq5Cl5euSiMMioR8hbCEZT0e6VvS50YjliWhkWeEO36eL8fnMh8 g7KJF6xmLzBZ4/mJL3JxBeBWtFTzoDH8tZW9wPEewRttUpHfiW4qcHPdm 8lLwiFMU70QBT0J1VXYCnzDIPGIM3Xgq0C8M2vScgwjU91LId9nXEygaj g6C2f11Uj5PnVTIFbo7c+GcDfPh0exltt0o5SAZ++TIiApUg88hy74NsU Q==; X-CSE-ConnectionGUID: rv9+/oOFQwOjeJy3egaWIw== X-CSE-MsgGUID: 1CkvDlF4RdqaxBD/llzJ6g== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="22574408" X-IronPort-AV: E=Sophos;i="6.10,161,1719903600"; d="scan'208";a="22574408" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2024 03:12:23 -0700 X-CSE-ConnectionGUID: tpBGM4vlSGOQqdbqPK8NpA== X-CSE-MsgGUID: BqSjPYo0TeujU2hVl0ol6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,161,1719903600"; d="scan'208";a="61231361" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa007.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2024 03:12:15 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1sgLqV-0000000HG7V-08mJ; Tue, 20 Aug 2024 13:12:11 +0300 Date: Tue, 20 Aug 2024 13:12:10 +0300 From: Andy Shevchenko 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 , Tzung-Bi Shih , Alexandre Belloni , 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 03/17] usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n Message-ID: References: <20240819223834.2049862-1-swboyd@chromium.org> <20240819223834.2049862-4-swboyd@chromium.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240819223834.2049862-4-swboyd@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Mon, Aug 19, 2024 at 03:38:17PM -0700, Stephen Boyd wrote: > Ease driver development by adding stubs for the typec_switch APIs when > CONFIG_TYPEC=n. Copy the same method used for the typec_mux APIs to be > consistent. > Cc: Heikki Krogerus > Cc: Greg Kroah-Hartman > Cc: > Cc: Pin-yen Lin Since it's not a DRM subsystem, can we move Cc after the --- line with the same effect minus Git commit pollution? ... > +#else Do you need #include here? Or is it already included at the top of the file? > +static inline struct typec_switch * > +fwnode_typec_switch_get(struct fwnode_handle *fwnode) > +{ > + return NULL; > +} > +static inline void typec_switch_put(struct typec_switch *sw) {} > +static inline int typec_switch_set(struct typec_switch *sw, > + enum typec_orientation orientation) > +{ > + return 0; > +} > + > +static inline struct typec_switch_dev * > +typec_switch_register(struct device *parent, > + const struct typec_switch_desc *desc) > +{ > + return ERR_PTR(-EOPNOTSUPP); > +} > +static inline void typec_switch_unregister(struct typec_switch_dev *sw) {} > + > +static inline void typec_switch_set_drvdata(struct typec_switch_dev *sw, void *data) {} > +static inline void *typec_switch_get_drvdata(struct typec_switch_dev *sw) > +{ > + return ERR_PTR(-EOPNOTSUPP); > +} > + > +#endif /* CONFIG_TYPEC */ -- With Best Regards, Andy Shevchenko