Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2270619rdb; Mon, 20 Nov 2023 06:50:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8a6rIGUav7n1wNs97w0PtMxqODbDJtMJUenboqx/AsKO0uhxVAGU3teMKGCTCMbceRLwX X-Received: by 2002:a05:6808:3c8a:b0:3b6:cf17:7be with SMTP id gs10-20020a0568083c8a00b003b6cf1707bemr12396570oib.26.1700491810991; Mon, 20 Nov 2023 06:50:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700491810; cv=none; d=google.com; s=arc-20160816; b=qRWNE9JVtVJLJI5r7afpPnsGBmPa6itvvDUWyJVI6DGDoqziafS5Sxa4TlMPPO8l0I QKIcww1245FKtKA3gu9DHL0je/byqjmPxfRumtWZvErYYKx5fMWMa3dgsbGYPUKNwAfP vePZ+rtkRFm4LO5/n+mjkpoKb8MCBHmHvdqvRRSx+jLMs4H7YHZF6VtNLAmOwdUV5PlS HEHTg+2kqXl1jg8eQ7TgJw95qgsqhyA+DEOgDU/iOLf9lLCdTb75nQji8maqbpk+sFxC kBCNzmXGe+x0ColXUYL2zq/PKqN8v6azDFy0b0+u/ujBvXwHnNvDroljUhA1s4pjVEJ1 xP9g== 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=jD48fs3fVntIIbubSDz+bnvs52SrHgkqNpyrN0YQ4SE=; fh=g3amdiifXhwL/mTWljo4oOX/iLvH3RCBC8SWsJqOWek=; b=A6v5A+c/BgIHzFubY5ytzoRfbUhXb9YkhEL1UfkAD843JhETZD5zx5/L3hfzoKHsFS Uzpf6OM/uOBqC0wPJAo0jXeyqHCwESF6SbHvLftU4W6LucLMKyFuWTSOpQwZkmnA0Ouh coNB+dphxYxR77e8iGRUy5cmG2ctBET8YRuZifvsRRrPGGyujKc0ttbUhd0fFVDM8+Hb TqgdhIEn6hBRA04iE+tty03AaUa09pmNP1/gNna5lUYexJeRRUoEfaVXQTNK84Uuw5D5 xSzSf1RI8Lgmegu8hMNmQZFLGuoglrS9sx56XdBJHfRh3IfEJf4eAbueEcXF33eMRJk+ /Hqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hRZmxe+l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id g63-20020a636b42000000b005bd043751ccsi7986998pgc.748.2023.11.20.06.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 06:50:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hRZmxe+l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1AE798026AE6; Mon, 20 Nov 2023 06:48:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233853AbjKTOrw (ORCPT + 99 others); Mon, 20 Nov 2023 09:47:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233875AbjKTOrI (ORCPT ); Mon, 20 Nov 2023 09:47:08 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8BB1D66; Mon, 20 Nov 2023 06:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700491619; x=1732027619; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OIU/ohSenRIHfIdotaL7Z+fDSzDZwcwlLHrvdYy8u3A=; b=hRZmxe+lhiFwI+J5aBg8topVUB22WD+uIuE56rNrehkfAssvzyDs0W3G 8ngXSdIRa2nd+lThDJvEicBKpdORq9eMtQIh4YCts25gENCq6L3EA0L4N yulsiLRcHd5BAIQm6vTTMfsCxl0jyHpOom9BBq/VJkG7WQ1jZl/SPjXBd L5/uMiJJdiYLUaR7HDEk8Q+PhQMM4xsMp4IwUirJYR/a61jgyuq8nny0g EZdhHDZUWVJvbmjdRP5URyX3sgp45Sf+Ob4BKwGX47sbZJSm8Ln0UcrkD iGQhqCg0GRFb83AWOpA+teeb4XKUaskmQw3XST7cyLeF8YE94Ccrs8Dy4 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="382017086" X-IronPort-AV: E=Sophos;i="6.04,214,1695711600"; d="scan'208";a="382017086" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 06:46:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="832291654" X-IronPort-AV: E=Sophos;i="6.04,214,1695711600"; d="scan'208";a="832291654" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Nov 2023 06:46:53 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0CA136B5; Mon, 20 Nov 2023 16:46:45 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Andi Shyti , Philipp Zabel Subject: [PATCH v4 19/24] i2c: designware: Uninline i2c_dw_probe() Date: Mon, 20 Nov 2023 16:42:01 +0200 Message-ID: <20231120144641.1660574-20-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231120144641.1660574-1-andriy.shevchenko@linux.intel.com> References: <20231120144641.1660574-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 06:48:02 -0800 (PST) Since i2c_dw_probe() is going to be extended, uninline it to reduce the noise in the common header. Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-common.c | 14 ++++++++++++++ drivers/i2c/busses/i2c-designware-core.h | 17 ++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index 7c877e380605..1d213bc0bbfa 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -714,6 +714,20 @@ void i2c_dw_disable(struct dw_i2c_dev *dev) } EXPORT_SYMBOL_GPL(i2c_dw_disable); +int i2c_dw_probe(struct dw_i2c_dev *dev) +{ + switch (dev->mode) { + case DW_IC_SLAVE: + return i2c_dw_probe_slave(dev); + case DW_IC_MASTER: + return i2c_dw_probe_master(dev); + default: + dev_err(dev->dev, "Wrong operation mode: %d\n", dev->mode); + return -EINVAL; + } +} +EXPORT_SYMBOL_GPL(i2c_dw_probe); + static int i2c_dw_prepare(struct device *device) { /* diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index f6ebf86dcc6f..7479cb3a450d 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h @@ -10,9 +10,7 @@ */ #include -#include #include -#include #include #include #include @@ -367,19 +365,6 @@ static inline void i2c_dw_configure_slave(struct dw_i2c_dev *dev) { } static inline int i2c_dw_probe_slave(struct dw_i2c_dev *dev) { return -EINVAL; } #endif -static inline int i2c_dw_probe(struct dw_i2c_dev *dev) -{ - switch (dev->mode) { - case DW_IC_SLAVE: - return i2c_dw_probe_slave(dev); - case DW_IC_MASTER: - return i2c_dw_probe_master(dev); - default: - dev_err(dev->dev, "Wrong operation mode: %d\n", dev->mode); - return -EINVAL; - } -} - static inline void i2c_dw_configure(struct dw_i2c_dev *dev) { if (i2c_detect_slave_mode(dev->dev)) @@ -388,6 +373,8 @@ static inline void i2c_dw_configure(struct dw_i2c_dev *dev) i2c_dw_configure_master(dev); } +int i2c_dw_probe(struct dw_i2c_dev *dev); + #if IS_ENABLED(CONFIG_I2C_DESIGNWARE_BAYTRAIL) int i2c_dw_baytrail_probe_lock_support(struct dw_i2c_dev *dev); #endif -- 2.43.0.rc1.1.gbec44491f096