From patchwork Wed May 26 12:43:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 448542 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E87F2C4708F for ; Wed, 26 May 2021 12:43:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C44B9613F9 for ; Wed, 26 May 2021 12:43:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234371AbhEZMpP (ORCPT ); Wed, 26 May 2021 08:45:15 -0400 Received: from mga11.intel.com ([192.55.52.93]:21157 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234717AbhEZMoy (ORCPT ); Wed, 26 May 2021 08:44:54 -0400 IronPort-SDR: JZymIjNpEGWdC1GFfZ817csLjNwKwNUJV3Sxvt4yPoAZhZ5RBHsIw5BTr7IzMSYpIabEbiqXOt GzyQnX8SrUzA== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="199401425" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="199401425" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 05:43:10 -0700 IronPort-SDR: zTs2TTIv13tMyrQ1H+JPD6TKvvOFT1FLZ7z0ukWI+ASbmBLBBN9hQNWz7OMBEtfBLqrQJHnZTP TkjxzqXXqECA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="409246039" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 26 May 2021 05:43:07 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 3CD0850E; Wed, 26 May 2021 15:43:30 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Wolfram Sang , Hans de Goede , Mauro Carvalho Chehab , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Cc: Mika Westerberg , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman Subject: [PATCH v1 1/6] i2c: acpi: Export i2c_acpi_find_client_by_adev() for users Date: Wed, 26 May 2021 15:43:17 +0300 Message-Id: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There is at least one user that will gain from the i2c_acpi_find_client_by_adev() being exported. Signed-off-by: Andy Shevchenko --- drivers/i2c/i2c-core-acpi.c | 3 ++- include/linux/i2c.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index 8ceaa88dd78f..5be37a5efcb4 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c @@ -387,7 +387,7 @@ struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle) } EXPORT_SYMBOL_GPL(i2c_acpi_find_adapter_by_handle); -static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev) +struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev) { struct device *dev; struct i2c_client *client; @@ -402,6 +402,7 @@ static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev) return client; } +EXPORT_SYMBOL_GPL(i2c_acpi_find_client_by_adev); static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value, void *arg) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index e8f2ac8c9c3d..335dc4f5abbb 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -995,6 +995,7 @@ static inline int of_i2c_get_board_info(struct device *dev, #endif /* CONFIG_OF */ +struct acpi_device; struct acpi_resource; struct acpi_resource_i2c_serialbus; @@ -1005,6 +1006,7 @@ u32 i2c_acpi_find_bus_speed(struct device *dev); struct i2c_client *i2c_acpi_new_device(struct device *dev, int index, struct i2c_board_info *info); struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle); +struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev); #else static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares, struct acpi_resource_i2c_serialbus **i2c) @@ -1024,6 +1026,10 @@ static inline struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle ha { return NULL; } +static inline struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev) +{ + return NULL; +} #endif /* CONFIG_ACPI */ #endif /* _LINUX_I2C_H */ From patchwork Wed May 26 12:43:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 449169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BC4CC47088 for ; Wed, 26 May 2021 12:43:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7587C613E6 for ; Wed, 26 May 2021 12:43:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234776AbhEZMpZ (ORCPT ); Wed, 26 May 2021 08:45:25 -0400 Received: from mga09.intel.com ([134.134.136.24]:35379 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234729AbhEZMoy (ORCPT ); Wed, 26 May 2021 08:44:54 -0400 IronPort-SDR: 7SNAp/d/nkUtNy+9vbWRKLq96AOnme3lPrB6me9KeKgPl++fohvU0Dc53I+j+KPnkjV16wnYCa 3mvTLcSNuUiw== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="202465789" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="202465789" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 05:43:11 -0700 IronPort-SDR: US5eylIamLHu1xhHFH1BUCVEeg3n3s7XnfpZPb1txTaFuAuaAmWN3z6P/0T0fvBFBVk2KpKAut iQTgivWSMM/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="476924265" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 26 May 2021 05:43:07 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 485CAD7; Wed, 26 May 2021 15:43:30 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Wolfram Sang , Hans de Goede , Mauro Carvalho Chehab , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Cc: Mika Westerberg , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman Subject: [PATCH v1 2/6] staging: atomisp: Replace open-coded i2c_acpi_find_client_by_adev() Date: Wed, 26 May 2021 15:43:18 +0300 Message-Id: <20210526124322.48915-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> References: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org gmin_i2c_dev_exists() is using open-coded variant of i2c_acpi_find_client_by_adev(). Replace it with a corresponding call. Signed-off-by: Andy Shevchenko Reviewed-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/atomisp_gmin_platform.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c index 135994d44802..a1064d1a3d6b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c @@ -378,19 +378,14 @@ static struct i2c_client *gmin_i2c_dev_exists(struct device *dev, char *name, struct i2c_client **client) { struct acpi_device *adev; - struct device *d; adev = acpi_dev_get_first_match_dev(name, NULL, -1); if (!adev) return NULL; - d = bus_find_device_by_acpi_dev(&i2c_bus_type, adev); - acpi_dev_put(adev); - if (!d) - return NULL; + *client = i2c_acpi_find_client_by_adev(adev); - *client = i2c_verify_client(d); - put_device(d); + acpi_dev_put(adev); dev_dbg(dev, "found '%s' at address 0x%02x, adapter %d\n", (*client)->name, (*client)->addr, (*client)->adapter->nr); From patchwork Wed May 26 12:43:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 448541 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEBD6C47089 for ; Wed, 26 May 2021 12:43:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E5476101E for ; Wed, 26 May 2021 12:43:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234738AbhEZMpW (ORCPT ); Wed, 26 May 2021 08:45:22 -0400 Received: from mga11.intel.com ([192.55.52.93]:21157 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234741AbhEZMoy (ORCPT ); Wed, 26 May 2021 08:44:54 -0400 IronPort-SDR: 1u0VBTYOWj+FL1nx/rKXFpILC6NPM/l++IBqKfKq4cgg0/D0/Yd4wplUa7+AWRYQnxpXzqxUUo O4ENyt+vUqTw== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="199401427" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="199401427" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 05:43:11 -0700 IronPort-SDR: Dzk5EFsP7fJJVT6B3lf0dHwP7+a4bLImdwCySiTE43cfCefcEez/XVuQAqRbDuMXGa17s9VgWU VXQt1BZPP0yg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="409246040" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 26 May 2021 05:43:08 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 53E645B6; Wed, 26 May 2021 15:43:30 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Wolfram Sang , Hans de Goede , Mauro Carvalho Chehab , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Cc: Mika Westerberg , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman Subject: [PATCH v1 3/6] staging: atomisp: Remove unused declarations Date: Wed, 26 May 2021 15:43:19 +0300 Message-Id: <20210526124322.48915-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> References: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There is a few static declarations that are not used anywhere, remove them. Signed-off-by: Andy Shevchenko --- .../atomisp/pci/isp2400_input_system_local.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h b/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h index 072a92199e05..27f3c8a45730 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h @@ -362,23 +362,6 @@ static const hrt_address MIPI_PORT_OFFSET[N_MIPI_PORT_ID] = { 0x00000200UL }; -static const mipi_lane_cfg_t MIPI_PORT_MAXLANES[N_MIPI_PORT_ID] = { - MIPI_4LANE_CFG, - MIPI_1LANE_CFG, - MIPI_2LANE_CFG -}; - -static const bool MIPI_PORT_ACTIVE[N_RX_MODE][N_MIPI_PORT_ID] = { - {true, true, false}, - {true, true, false}, - {true, true, false}, - {true, true, false}, - {true, true, true}, - {true, true, true}, - {true, true, true}, - {true, true, true} -}; - static const mipi_lane_cfg_t MIPI_PORT_LANES[N_RX_MODE][N_MIPI_PORT_ID] = { {MIPI_4LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, {MIPI_3LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, From patchwork Wed May 26 12:43:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 448540 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2895C47082 for ; Wed, 26 May 2021 12:43:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B57D6101E for ; Wed, 26 May 2021 12:43:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234780AbhEZMp0 (ORCPT ); Wed, 26 May 2021 08:45:26 -0400 Received: from mga18.intel.com ([134.134.136.126]:64752 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234746AbhEZMo7 (ORCPT ); Wed, 26 May 2021 08:44:59 -0400 IronPort-SDR: vRwfIW1zbT1QnmgrnGybgqOa8A2YaavxqpQ5B0ID2EcI1gjLsHdTeqNFMc5VvcOL64RrF2Vsd+ hNMi8SUBrrHw== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="189830955" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="189830955" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 05:43:11 -0700 IronPort-SDR: NpsX2vIwn6ixmOF1JZksDKrXWsUdi8M1osu91jEUvIGg0yAjzxFnqOMUyddMWNGimch3l8v7yD eWFstUJP0vqA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="480028207" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 26 May 2021 05:43:08 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 617DF53E; Wed, 26 May 2021 15:43:30 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Wolfram Sang , Hans de Goede , Mauro Carvalho Chehab , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Cc: Mika Westerberg , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman Subject: [PATCH v1 4/6] staging: atomisp: Annotate a couple of definitions with __maybe_unused Date: Wed, 26 May 2021 15:43:20 +0300 Message-Id: <20210526124322.48915-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> References: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There are definitions in the header that are not used by all modules inside the driver. Annotate them with __maybe_unused to avoid compiler warnings. Signed-off-by: Andy Shevchenko --- .../staging/media/atomisp/pci/isp2400_input_system_local.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h b/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h index 27f3c8a45730..21f11bdfc85f 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h @@ -356,7 +356,7 @@ struct rx_cfg_s { }; /* NOTE: The base has already an offset of 0x0100 */ -static const hrt_address MIPI_PORT_OFFSET[N_MIPI_PORT_ID] = { +static const hrt_address __maybe_unused MIPI_PORT_OFFSET[N_MIPI_PORT_ID] = { 0x00000000UL, 0x00000100UL, 0x00000200UL @@ -373,7 +373,7 @@ static const mipi_lane_cfg_t MIPI_PORT_LANES[N_RX_MODE][N_MIPI_PORT_ID] = { {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG} }; -static const hrt_address SUB_SYSTEM_OFFSET[N_SUB_SYSTEM_ID] = { +static const hrt_address __maybe_unused SUB_SYSTEM_OFFSET[N_SUB_SYSTEM_ID] = { 0x00001000UL, 0x00002000UL, 0x00003000UL, From patchwork Wed May 26 12:43:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 449170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B882FC47082 for ; Wed, 26 May 2021 12:43:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B26C613EC for ; Wed, 26 May 2021 12:43:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234687AbhEZMpQ (ORCPT ); Wed, 26 May 2021 08:45:16 -0400 Received: from mga02.intel.com ([134.134.136.20]:24602 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234728AbhEZMoy (ORCPT ); Wed, 26 May 2021 08:44:54 -0400 IronPort-SDR: A7felA4oGH2w95/VlMKy/mj0W5t+vxDpMMY1tSnAB9dWdaPlFT0qAQ61I3BJ+FcTJxzPQDxoBj VGp/A1LLLkxA== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="189574314" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="189574314" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 05:43:11 -0700 IronPort-SDR: 038J/aXIgYUgMzjXdUOq0rBwYrrC+EWtxkXo+NLB9nVFn7t2Kucy1TAZV7jcDzI6//+95reKQM eZ2d4o627/AA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="630717247" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 26 May 2021 05:43:08 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 702A36D8; Wed, 26 May 2021 15:43:30 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Wolfram Sang , Hans de Goede , Mauro Carvalho Chehab , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Cc: Mika Westerberg , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman Subject: [PATCH v1 5/6] staging: atomisp: Move MIPI_PORT_LANES to the only user Date: Wed, 26 May 2021 15:43:21 +0300 Message-Id: <20210526124322.48915-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> References: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Move MIPI_PORT_LANES to the only user of it, i.e. pci/runtime/isys/src/rx.c. Signed-off-by: Andy Shevchenko --- .../media/atomisp/pci/isp2400_input_system_local.h | 11 ----------- .../staging/media/atomisp/pci/runtime/isys/src/rx.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h b/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h index 21f11bdfc85f..2614b89b8e34 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2400_input_system_local.h @@ -362,17 +362,6 @@ static const hrt_address __maybe_unused MIPI_PORT_OFFSET[N_MIPI_PORT_ID] = { 0x00000200UL }; -static const mipi_lane_cfg_t MIPI_PORT_LANES[N_RX_MODE][N_MIPI_PORT_ID] = { - {MIPI_4LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, - {MIPI_3LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, - {MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, - {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, - {MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_2LANE_CFG}, - {MIPI_3LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG}, - {MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG}, - {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG} -}; - static const hrt_address __maybe_unused SUB_SYSTEM_OFFSET[N_SUB_SYSTEM_ID] = { 0x00001000UL, 0x00002000UL, diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c index 4a18da6bf0c1..29486dcc9a04 100644 --- a/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c @@ -20,6 +20,17 @@ #include "ia_css_irq.h" #include "sh_css_internal.h" +static const mipi_lane_cfg_t MIPI_PORT_LANES[N_RX_MODE][N_MIPI_PORT_ID] = { + {MIPI_4LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, + {MIPI_3LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, + {MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, + {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG}, + {MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_2LANE_CFG}, + {MIPI_3LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG}, + {MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG}, + {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG} +}; + #if !defined(ISP2401) void ia_css_isys_rx_enable_all_interrupts(enum mipi_port_id port) { From patchwork Wed May 26 12:43:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 449171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32158C4708C for ; Wed, 26 May 2021 12:43:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B1636101E for ; Wed, 26 May 2021 12:43:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234028AbhEZMpN (ORCPT ); Wed, 26 May 2021 08:45:13 -0400 Received: from mga14.intel.com ([192.55.52.115]:46596 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234731AbhEZMox (ORCPT ); Wed, 26 May 2021 08:44:53 -0400 IronPort-SDR: 1USzK07JjAKewNr5TSTJO8TeayNUceycYLE8UpmFSagqKF/dhzviurrP4g9iNSTXzcinJUsctR JFffmW6t53uQ== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="202210458" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="202210458" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 05:43:15 -0700 IronPort-SDR: 1X5vo9M7VygZNZQSa1VCQhMAvfKUuQ+yiCMQhPP03UkoKZhzAY6Zy5Ytx6wke9sl7Ulb4tGi5O fBGx0etEZC4Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="443019366" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 26 May 2021 05:43:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7B8E199D; Wed, 26 May 2021 15:43:30 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Wolfram Sang , Hans de Goede , Mauro Carvalho Chehab , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Cc: Mika Westerberg , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman Subject: [PATCH v1 6/6] staging: atomisp: Remove unused port_enabled variable Date: Wed, 26 May 2021 15:43:22 +0300 Message-Id: <20210526124322.48915-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> References: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Remove unused port_enabled variable in ia_css_isys_rx_configure(). Signed-off-by: Andy Shevchenko --- drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c index 29486dcc9a04..79e82fc08aa9 100644 --- a/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c @@ -490,7 +490,6 @@ unsigned int ia_css_csi2_calculate_input_system_alignment( void ia_css_isys_rx_configure(const rx_cfg_t *config, const enum ia_css_input_mode input_mode) { - bool port_enabled[N_MIPI_PORT_ID]; bool any_port_enabled = false; enum mipi_port_id port; @@ -527,8 +526,6 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config, _HRT_CSS_RECEIVER_2400_RX_COUNT_REG_IDX, config->rxcount); - port_enabled[port] = true; - if (input_mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR) { /* MW: A bit of a hack, straight wiring of the capture * units,assuming they are linearly enumerated. */