From patchwork Fri Aug 16 17:01:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 820212 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 500B61C378B; Fri, 16 Aug 2024 17:12:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828362; cv=none; b=N0O8dqbanQFi5/Dqd6WfQ9+k0VBdoGEUny1FvIMC4EpGi7nujni/Ijt/mKfO6BF9mxt0yqmNfJU8uKsh08cmnWrybkKnx9j3Wm7Poi98C2ZC9kbJk6s1NJvhHF3Tt/NFzCSYdFFlgYNCqdjtX0Tut/IwEGjYFDdPpR5PkFXVInk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828362; c=relaxed/simple; bh=JeD6dx8LkKLsb4f1jGNEIeW+t/ve0YFKAf5hq/Jb5G8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WM+JNm2nmD3kUK4Syc0C55442+cH9aQFzV9nHJARJPFpdfY9AcX717za8nH3z3YaOnfJ4t3EAOhW++gRa1V2EPv5Yc4NIVVQq+/+i9XZSFC59gStIx4OgvccytJZx+Od2+znDH9qJnhMFrOFAbZ7OaxCdKPnGfK4hE4jZaITUdc= 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=N3FgcbO4; arc=none smtp.client-ip=198.175.65.15 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="N3FgcbO4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723828361; x=1755364361; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JeD6dx8LkKLsb4f1jGNEIeW+t/ve0YFKAf5hq/Jb5G8=; b=N3FgcbO4zdMk1I0jdAR5HVIAKLclNULxLeVITUuYRuCO+B2MdXu/mOqx 5UqYZ9HL3q8tIVD3lh9isxJDnhb7Uj7tHfgaxq2Oe+/rzqjI0aCvbCGVB HYBPtPcU41xGXehBbkU/ge3e4Kpi5L08RZcF8gZN5tNIvVZHlY+wq6Sat LuATrvlK3t5jj/bOeWkuUTCtd6j4BLLtDBIxOMhTwXjt7vTey+kEGTPkP XQr87C9pdNxls7yLVgxCOM93/JvEg9awPTKk5gvxU1I1CJzjis6SDUT5H CH6dFyK1DiXuE97TstaR9MAsS7hR+0d3CcgI6HM3y+UjjOY4LnPhTbMC0 A==; X-CSE-ConnectionGUID: zbb93Rh8Rg6aQbfACFH5vA== X-CSE-MsgGUID: tB/SGKnTSLmhUwyDQX2WPw== X-IronPort-AV: E=McAfee;i="6700,10204,11166"; a="25888880" X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="25888880" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2024 10:12:36 -0700 X-CSE-ConnectionGUID: xgJPT7dTT5qLlCLXfk6sBQ== X-CSE-MsgGUID: pvYuNcbgTsaq0f1Dc/UYog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="59360357" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa006.fm.intel.com with ESMTP; 16 Aug 2024 10:12:33 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 71E32213; Fri, 16 Aug 2024 20:12:32 +0300 (EEST) From: Andy Shevchenko To: Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips , Mario Limonciello Subject: [PATCH v1 1/7] i2c: designware: Replace a while-loop by for-loop Date: Fri, 16 Aug 2024 20:01:59 +0300 Message-ID: <20240816171225.3506844-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> References: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Replace a while-loop by for-loop in i2c_dw_probe_lock_support() to save a few lines of code. Reviewed-by: Mario Limonciello Acked-by: Jarkko Nikula Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-platdrv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index df3dc1e8093e..d092532375b8 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -238,11 +238,9 @@ static int i2c_dw_probe_lock_support(struct dw_i2c_dev *dev) int i = 0; int ret; - ptr = i2c_dw_semaphore_cb_table; - dev->semaphore_idx = -1; - while (ptr->probe) { + for (ptr = i2c_dw_semaphore_cb_table; ptr->probe; ptr++) { ret = ptr->probe(dev); if (ret) { /* @@ -254,7 +252,6 @@ static int i2c_dw_probe_lock_support(struct dw_i2c_dev *dev) return ret; i++; - ptr++; continue; } From patchwork Fri Aug 16 17:02:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 819834 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 8DF181C0DF7; Fri, 16 Aug 2024 17:12:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828361; cv=none; b=t8Bv0gOFqXAOCJswd8EdvtPodNMSvetd52NztwzSuMdq8I/btV1RlTbIK0Kq+jNqNNuJsU3lw2sJqPL6ekMzjfUf6GceSdDGLglwo2PhjuSlBdhB9QnXMNvZ1yQYmPXfoqGYmtpTYJHbjXuqoqZbtQ/sudfeQDugngSzGgeUx1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828361; c=relaxed/simple; bh=lmpJVHEI45bCw92NS0r5bbHGa1U4pmqHhD3BTF+AWZ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PD++uvVYWEiKXSjzgk7xXTqXH0WHibB6iME5hx3j0qnioUZ8J0Yr/koahCNd0uNf7i+Aua26y8roFMOYFh4s39MOMKJ9/UmDirSdDvm3DJv7K1XEKYLeytltLqHCCg4BQLlawXs+56xrjRrMEtKr8CXCd0FwbmYfHZPjb+Rm9pM= 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=LXQvKFq8; arc=none smtp.client-ip=198.175.65.15 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="LXQvKFq8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723828359; x=1755364359; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lmpJVHEI45bCw92NS0r5bbHGa1U4pmqHhD3BTF+AWZ0=; b=LXQvKFq8xupnUm8OEIrS8O4Tw4yUiGe4AzZ442UvTwUAVPyqkZX4egId u2q401ntSBZvlBcZdXreMoPae5frPXkJ82d1NaSvHiruLInNC1CXAo1Rm fVGTeSQsjQKj6kpVzbtfg8mBgI5Y1SJmFv8q8qYLuCLevMZsYb1Pb8bfo CA8oBtsHuqJhfJtESQ7GS+5w3k41LiZO0EhK+xUZMcfoPst1z0W7LAqCU yTGC8frACnMZLbdKagVAdbnZCjSLEegAq1gQTEjpPAKBB84/1wT5yPE2Z 6VpUoLCskZxltJvrdvYfvj/r/JjkH71Bd92rna5/0px8hJju6a6iHdtv+ g==; X-CSE-ConnectionGUID: Pi0eVmn6SbCacl4Nx30kYg== X-CSE-MsgGUID: g4vfI6DJTP+1MOYt+ue/GA== X-IronPort-AV: E=McAfee;i="6700,10204,11166"; a="25888865" X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="25888865" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2024 10:12:36 -0700 X-CSE-ConnectionGUID: 58mmwS9DQvKzv7KbHxNpJw== X-CSE-MsgGUID: TSsNBn1QTX2VOgKHlLWGXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="59360354" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa006.fm.intel.com with ESMTP; 16 Aug 2024 10:12:33 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7DF7826D; Fri, 16 Aug 2024 20:12:32 +0300 (EEST) From: Andy Shevchenko To: Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips Subject: [PATCH v1 2/7] i2c: designware: Let PCI core to take care about interrupt vectors Date: Fri, 16 Aug 2024 20:02:00 +0300 Message-ID: <20240816171225.3506844-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> References: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 PCI core, after pcim_enable_device(), takes care about the allocated IRQ vectors, no need to do it explicitly and break the cleaning up order. Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-pcidrv.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index a1b379a1e904..507e114332cd 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -295,10 +295,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, if (controller->setup) { r = controller->setup(pdev, controller); - if (r) { - pci_free_irq_vectors(pdev); + if (r) return r; - } } i2c_dw_adjust_bus_speed(dev); @@ -307,10 +305,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, i2c_dw_acpi_configure(&pdev->dev); r = i2c_dw_validate_speed(dev); - if (r) { - pci_free_irq_vectors(pdev); + if (r) return r; - } i2c_dw_configure(dev); @@ -330,10 +326,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, adap->nr = controller->bus_num; r = i2c_dw_probe(dev); - if (r) { - pci_free_irq_vectors(pdev); + if (r) return r; - } if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) { dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, &dgpu_node); @@ -359,8 +353,6 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev) pm_runtime_get_noresume(&pdev->dev); i2c_del_adapter(&dev->adapter); - devm_free_irq(&pdev->dev, dev->irq, dev); - pci_free_irq_vectors(pdev); } static const struct pci_device_id i2_designware_pci_ids[] = { From patchwork Fri Aug 16 17:02:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 820213 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 DF9491C2301; Fri, 16 Aug 2024 17:12:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828361; cv=none; b=rF/vRl/XIEh1tfyTrNVEFsqA7zp1RNfmON44TZ22kTHKXPJ7CQb6DL3+YbikcbddrQJtBc5IyN/ZNtbKPzZp9VCFxbM+ITk3h9g3DXFnh4f+wZNhvBcdu+QuQuQdxvmbg4L9JL93enKoAoJrB1AeJe+Z/kBLho7thtBtXn3JfDo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828361; c=relaxed/simple; bh=wiNygSn0xYtYYKaHveS3CXKC0AKbBoJK3KI2wsMtOKk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VC3zG2tKZBLtlSW7Ubt0R+/k8O276iMdsLEBZqxp28iDNcbcJ/WLaB4944p8UpAD+4tGBWu5Wmf4ZPKWLzyRzxmXxSJyTEzgMTS2BR5nhImRP497NL1VSzLqNiV7/ZFc4nlXQGjug7UpQnACIRbbjoeEiDegJWEQgaDY0ZHL2pk= 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=Fk2xCCML; arc=none smtp.client-ip=198.175.65.15 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="Fk2xCCML" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723828360; x=1755364360; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wiNygSn0xYtYYKaHveS3CXKC0AKbBoJK3KI2wsMtOKk=; b=Fk2xCCMLUluX6uv2RR2tN/U2trpkelCad++90zo+OdaozTbBqGyJQ3F+ /QQj0iA9OygUGxxcMXzzLjlbEetp0SkuFcFsUgMBUx72FORcnJccvqxkv zcg/wg0lDlEezS7q8uw+wYSwIT6OhmVoWhwh0xtevsVQQaRuh/N17yXm4 mMSQlwVtHMCw06wgJI4YeNyQGjdnSxKFz+QRPCEwDxBC5dn79K8aKaO5N bc6rHOowvfq9R+UlzABRoFZjrVBScF85U/aZumDp00jOM1izAOu/3gQN5 WwVfNRZEkfHY4AzIwbaMgtBq5LxUBnTVnURPfmIrsvzuNImEJOntYXA7x g==; X-CSE-ConnectionGUID: PnpIdSliQmqCRcX2LcRoWw== X-CSE-MsgGUID: +J/ikS6GSWy0p5X9Is5qew== X-IronPort-AV: E=McAfee;i="6700,10204,11166"; a="25888874" X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="25888874" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2024 10:12:36 -0700 X-CSE-ConnectionGUID: C0dlg9vTRCq8SYQ4AOHWsw== X-CSE-MsgGUID: v6ly5JksSUq9bGrF/L/GNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="59360356" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa006.fm.intel.com with ESMTP; 16 Aug 2024 10:12:33 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 918822FB; Fri, 16 Aug 2024 20:12:32 +0300 (EEST) From: Andy Shevchenko To: Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips Subject: [PATCH v1 3/7] i2c: designware: Add missing 'c' into PCI IDs variable name Date: Fri, 16 Aug 2024 20:02:01 +0300 Message-ID: <20240816171225.3506844-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> References: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add missing 'c' into i2c_designware_pci_ids variable name. Acked-by: Jarkko Nikula Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-pcidrv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 507e114332cd..4cbcdae8cd90 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -355,7 +355,7 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev) i2c_del_adapter(&dev->adapter); } -static const struct pci_device_id i2_designware_pci_ids[] = { +static const struct pci_device_id i2c_designware_pci_ids[] = { /* Medfield */ { PCI_VDEVICE(INTEL, 0x0817), medfield }, { PCI_VDEVICE(INTEL, 0x0818), medfield }, @@ -403,16 +403,16 @@ static const struct pci_device_id i2_designware_pci_ids[] = { { PCI_VDEVICE(ATI, 0x7464), navi_amd }, { 0,} }; -MODULE_DEVICE_TABLE(pci, i2_designware_pci_ids); +MODULE_DEVICE_TABLE(pci, i2c_designware_pci_ids); static struct pci_driver dw_i2c_driver = { .name = DRIVER_NAME, - .id_table = i2_designware_pci_ids, .probe = i2c_dw_pci_probe, .remove = i2c_dw_pci_remove, .driver = { .pm = &i2c_dw_pm_ops, }, + .id_table = i2c_designware_pci_ids, }; module_pci_driver(dw_i2c_driver); From patchwork Fri Aug 16 17:02:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 820211 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 A063C1C379C; Fri, 16 Aug 2024 17:12:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828363; cv=none; b=ijOlcfBxVQfLAwH/W5iMcX7paatTsIbe/Ws6mh0uFmDXSXTmhSJ5HAvzAjgGiTHoof86Bc2uG0dPeJXQgxn4TzQnWR5UePIcipfDk+H5d+tR0h9Tnqij4ycxUROrUZM5VXy/5+RhuWJ8s1euvgtUtcbV50fV51nFgnXSPtR3EK8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828363; c=relaxed/simple; bh=ecRXmoWtr+H4FTDexcrxBLjv16chf+goailR2t/Is70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N0GCkdPwHXA8dy13prtnPHZOUmW4/fJAkC3AjEFlrizBe5E4s/tGtQ/xU5T1cklbBRY7mSqWMIwcvUJU2PXYzH0fMUjGg2hPPCkS+OizCRweJVNcWn5SdxQaHnKT/E8fv/+OQS5FR3qNlmjAVr66a3F8fn9RqsJu1LYOR5k4Oeo= 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=DcMX3cPL; arc=none smtp.client-ip=198.175.65.21 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="DcMX3cPL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723828362; x=1755364362; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ecRXmoWtr+H4FTDexcrxBLjv16chf+goailR2t/Is70=; b=DcMX3cPLn6aDnr1ffzlp9UQ/3gk9jWnKeivpVG54lL0jQFLZgiaIurhp FRMQD7xoaCuDAgCGDV2EQu5dU4LvAYWKav8LSD6VLZpr7wHxji2KQwBWq oL+Q9ZfE+5/sN1DINuUphP9x3TU5x8ltrO7t3gI7mi+TVWi9Uyf7qb286 rSQbmOkwdFM4uz70WO5Ab7yVtco4T0nh34d+ACWfF6Iu0Q35OjO2AOk61 VGfb9oVaPg9Ms8qJs2BLKEOu+ySwOCxmabzc7KYGte6kEj/OdMv38YIUb g2qOPhG8jsCodBktHs2wkI/ROnY+n9GFp3o1uwnL3WSqYtUWV/fQpalwI A==; X-CSE-ConnectionGUID: jV26isFNRwmETjYquGKkvg== X-CSE-MsgGUID: 3p63dK0qQri1JyteGvafvg== X-IronPort-AV: E=McAfee;i="6700,10204,11166"; a="22101734" X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="22101734" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2024 10:12:39 -0700 X-CSE-ConnectionGUID: rs7+Wms6QyikkNHDhwThwg== X-CSE-MsgGUID: +hwmYbPbQm+bkUPMgBIShw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="97233138" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 16 Aug 2024 10:12:36 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 99381297; Fri, 16 Aug 2024 20:12:32 +0300 (EEST) From: Andy Shevchenko To: Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips , Mario Limonciello Subject: [PATCH v1 4/7] i2c: designware: Unify terminator in device ID tables Date: Fri, 16 Aug 2024 20:02:02 +0300 Message-ID: <20240816171225.3506844-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> References: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Make the terminator entry look the same in all device ID tables. Reviewed-by: Mario Limonciello Acked-by: Jarkko Nikula Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-pcidrv.c | 2 +- drivers/i2c/busses/i2c-designware-platdrv.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 4cbcdae8cd90..cbbcbcc265c9 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -401,7 +401,7 @@ static const struct pci_device_id i2c_designware_pci_ids[] = { { PCI_VDEVICE(ATI, 0x73c4), navi_amd }, { PCI_VDEVICE(ATI, 0x7444), navi_amd }, { PCI_VDEVICE(ATI, 0x7464), navi_amd }, - { 0,} + {} }; MODULE_DEVICE_TABLE(pci, i2c_designware_pci_ids); diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index d092532375b8..9ce74a8be43a 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -58,7 +58,7 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = { { "HISI02A2", 0 }, { "HISI02A3", 0 }, { "HYGO0010", ACCESS_INTR_MASK }, - { } + {} }; MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match); #endif @@ -154,7 +154,7 @@ static const struct of_device_id dw_i2c_of_match[] = { { .compatible = "snps,designware-i2c", }, { .compatible = "mscc,ocelot-i2c", .data = (void *)MODEL_MSCC_OCELOT }, { .compatible = "baikal,bt1-sys-i2c", .data = (void *)MODEL_BAIKAL_BT1 }, - {}, + {} }; MODULE_DEVICE_TABLE(of, dw_i2c_of_match); #else From patchwork Fri Aug 16 17:02:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 819832 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 E1A8A1C2302; Fri, 16 Aug 2024 17:12:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828362; cv=none; b=QZm9+eyssZcAMbZ1pg0RZVVqbiXA0Avo16/USrZcTsEQyolmUe4UW9TAHPxXn6QYsc40cWFbXfjsBC8Xqv1jKAeegKOsP7eOK6PYAs/CkSs90GYF8brektvPTwmDV4HfN6x5SFEI5KDGjFGEp5ty5HiGPIbRPYu5bOC0+PXMcFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828362; c=relaxed/simple; bh=fM3QyOcACxbz3EgkNWA6wIeK6Z0/rqQoD5M/3kN7fKI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CVVRazZYvoy42N7WsLapYiLDpMKIs4AD7CNvrURQCLC9hf06vPMSxafbAH3SZHbYRf59n/DpF8cvJAK6rlCCjHMXzxYMZOqDRpBUe3MSaz+Ow6aJ5ALt2r/I9nlRR7uX917HSAqDsb6hblP/7R3uRXZvw7OTDTjUDmcTjVgOz1M= 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=BZJ0MBO/; arc=none smtp.client-ip=192.198.163.8 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="BZJ0MBO/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723828360; x=1755364360; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fM3QyOcACxbz3EgkNWA6wIeK6Z0/rqQoD5M/3kN7fKI=; b=BZJ0MBO/v4zKEPjt94pRPaZLTL8Lpwd0cdXVP4y2wkyPygajnQlJIdEI 4UySX4vHWgE/hT8J3GmCZSDuM50CUWcfuZuG6CdM9D/h+2FSKTWXsCd8b DiJpLDoojQOhPNlRvbfP7jW0iX60pRdjprR4AWyAZ/msD8/E1dh+R0vpL Tg/YNMvbmi6WcB7uhdEmao7BOFhuj43xeMf2C4vIPXAIXnQoRZiS+3mr4 99l54ArP/nRUHry4u08rEWS4JcILZTFeVeEJ6K5QE1cWvWdFY/UmUzbvb KXtUbK4f0zmqR8aOpgyjvmuoLGSBvyl9tSRWedM3ZDVpxk0AVvlm1WF4c w==; X-CSE-ConnectionGUID: Zyhp9pu/QrGNEbeNrd06jg== X-CSE-MsgGUID: oqSwECVTSMWgEniHyDeneg== X-IronPort-AV: E=McAfee;i="6700,10204,11166"; a="39644617" X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="39644617" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2024 10:12:39 -0700 X-CSE-ConnectionGUID: mlOdonHbTkWhPOP9WOIE8A== X-CSE-MsgGUID: kK8mqIeQQvuxqO2UaaQsQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="64394902" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 16 Aug 2024 10:12:37 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id AA70C35D; Fri, 16 Aug 2024 20:12:32 +0300 (EEST) From: Andy Shevchenko To: Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips , Mario Limonciello Subject: [PATCH v1 5/7] i2c: designware: Always provide device ID tables Date: Fri, 16 Aug 2024 20:02:03 +0300 Message-ID: <20240816171225.3506844-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> References: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is no need to have ugly ifdeffery and additional macros for the device ID tables. Always provide them. Since we touch the ACPI table, make it sorted by ID. Reviewed-by: Andi Shyti Reviewed-by: Mario Limonciello Acked-by: Jarkko Nikula Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-platdrv.c | 36 ++++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 9ce74a8be43a..905557c7dfa4 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -149,14 +149,6 @@ static int dw_i2c_of_configure(struct platform_device *pdev) return 0; } - -static const struct of_device_id dw_i2c_of_match[] = { - { .compatible = "snps,designware-i2c", }, - { .compatible = "mscc,ocelot-i2c", .data = (void *)MODEL_MSCC_OCELOT }, - { .compatible = "baikal,bt1-sys-i2c", .data = (void *)MODEL_BAIKAL_BT1 }, - {} -}; -MODULE_DEVICE_TABLE(of, dw_i2c_of_match); #else static int bt1_i2c_request_regs(struct dw_i2c_dev *dev) { @@ -477,6 +469,34 @@ static const struct dev_pm_ops dw_i2c_dev_pm_ops = { RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL) }; +static const struct of_device_id dw_i2c_of_match[] = { + { .compatible = "snps,designware-i2c", }, + { .compatible = "mscc,ocelot-i2c", .data = (void *)MODEL_MSCC_OCELOT }, + { .compatible = "baikal,bt1-sys-i2c", .data = (void *)MODEL_BAIKAL_BT1 }, + {} +}; +MODULE_DEVICE_TABLE(of, dw_i2c_of_match); + +static const struct acpi_device_id dw_i2c_acpi_match[] = { + { "80860F41", ACCESS_NO_IRQ_SUSPEND }, + { "808622C1", ACCESS_NO_IRQ_SUSPEND }, + { "AMD0010", ACCESS_INTR_MASK }, + { "AMDI0010", ACCESS_INTR_MASK }, + { "AMDI0019", ACCESS_INTR_MASK | ARBITRATION_SEMAPHORE }, + { "AMDI0510", 0 }, + { "APMC0D0F", 0 }, + { "HISI02A1", 0 }, + { "HISI02A2", 0 }, + { "HISI02A3", 0 }, + { "HYGO0010", ACCESS_INTR_MASK }, + { "INT33C2", 0 }, + { "INT33C3", 0 }, + { "INT3432", 0 }, + { "INT3433", 0 }, + {} +}; +MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match); + static const struct platform_device_id dw_i2c_platform_ids[] = { { "i2c_designware" }, {} From patchwork Fri Aug 16 17:02:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 819831 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 0C48A1C3F1D; Fri, 16 Aug 2024 17:12:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828364; cv=none; b=pWy5imAARTOiMWbCBEbWtpKTm3PHvNjuT8INR61V8ceByfR2/DVjgRskZrNe5WagnbPgItYsosh5lIh7uz72YKjboEPy2eOufQsQOLS2zf04IcxsN2wm2cJB+XdG8fgQoFCjrAfqtt9n0Yr7OffEj+HzSCNqGB7JaIh3aiOnCn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828364; c=relaxed/simple; bh=KoT/31pGAd0xE2KmlmoMP1RqpQ6AxIOuaCMFure4zbE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fz0p6EZnha/PLWZ6sNDunTnIz+Mz1+PNAmGbJKi14plqHWr/wh1ewA9V0z/DGx8iATw0vBpo36vHgBMtNHhWxOnHSf9HPGoxBsqPT88CCdEybZ9iE2Zo0B5LqumakpwfR2PNgF5XGJeFFlfz7ndAhpeezF8f4xUJtexBpk/juuw= 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=SLZ9PFnO; arc=none smtp.client-ip=192.198.163.8 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="SLZ9PFnO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723828363; x=1755364363; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KoT/31pGAd0xE2KmlmoMP1RqpQ6AxIOuaCMFure4zbE=; b=SLZ9PFnOHTlbx+z5NZ8+bfoQfrOEcdiIIKaTOi0OHaU8yWQMyPd+7hm+ Yv5q/cHk02gKfNvnYLmuINbJixOdcwMGanSE/tYsXW3PwZF/wca/7jA0q h3BB5aokaBlHlpiZR5d/cZ7aCiFA12N4nnY8Sbh9iz+yaDZ76sek3KYSs oOGwdbOEDCmr1YU1bHkC023A3fwXjVM8CuMgTH7EuddeLlnJyvPdmnCz/ IjKMUn5XpQSVhkH1xKGAsHiigJHBG73lsJCgYR5wiWPQO6l5hWGqmTiWY 3G2UNj2wwPwaulcfQMJk/Z0DI2pSfdA0ihPxuZJM/rasDgmi5tYUhbrCT g==; X-CSE-ConnectionGUID: jq9DREQdSmOvhjbmcGPz0g== X-CSE-MsgGUID: q2qeyS5KT7uTElGvDI3gkw== X-IronPort-AV: E=McAfee;i="6700,10204,11166"; a="39644614" X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="39644614" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2024 10:12:39 -0700 X-CSE-ConnectionGUID: Op6rMOtVR9uB+x3Lzx8n2g== X-CSE-MsgGUID: 7y+7OoLYSoG/N3uloeN1Ug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="64394903" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 16 Aug 2024 10:12:37 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B899B39D; Fri, 16 Aug 2024 20:12:32 +0300 (EEST) From: Andy Shevchenko To: Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips Subject: [PATCH v1 6/7] i2c: designware: Drop return value from i2c_dw_acpi_configure() Date: Fri, 16 Aug 2024 20:02:04 +0300 Message-ID: <20240816171225.3506844-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> References: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 i2c_dw_acpi_configure() is called without checking of the returned value, hence just drop it by converting to void. Reviewed-by: Andi Shyti Acked-by: Jarkko Nikula Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-common.c | 4 +--- drivers/i2c/busses/i2c-designware-core.h | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index 4160c5e57df4..f0d7cad92f1c 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -255,7 +255,7 @@ static void i2c_dw_acpi_params(struct device *device, char method[], kfree(buf.pointer); } -int i2c_dw_acpi_configure(struct device *device) +void i2c_dw_acpi_configure(struct device *device) { struct dw_i2c_dev *dev = dev_get_drvdata(device); struct i2c_timings *t = &dev->timings; @@ -285,8 +285,6 @@ int i2c_dw_acpi_configure(struct device *device) dev->sda_hold_time = fs_ht; break; } - - return 0; } EXPORT_SYMBOL_GPL(i2c_dw_acpi_configure); diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index 3e48f446ce53..ebcf816b731c 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h @@ -420,7 +420,7 @@ int i2c_dw_validate_speed(struct dw_i2c_dev *dev); void i2c_dw_adjust_bus_speed(struct dw_i2c_dev *dev); #if IS_ENABLED(CONFIG_ACPI) -int i2c_dw_acpi_configure(struct device *device); +void i2c_dw_acpi_configure(struct device *device); #else -static inline int i2c_dw_acpi_configure(struct device *device) { return -ENODEV; } +static inline void i2c_dw_acpi_configure(struct device *device) { } #endif From patchwork Fri Aug 16 17:02:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 819833 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 189B11C2307; Fri, 16 Aug 2024 17:12:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828361; cv=none; b=WnI/Av5b8a0sYwe+kKKuiTw+cZ/xcHEdpYDg7u5Sb6UiYsaUusUCijCYqHKc+IhHx0yCCMFRZoldt4lkU6rjU+POttaMnraSc9xvYGlEt0/Nkbji5JejBBgrTWNY/grYy6lmxSynZztAKItVO43gSTr9vHIuF2xPmzbYMpLfq2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723828361; c=relaxed/simple; bh=Azq9qB8c+ZqCCIl0U60dNZORg3VJLIGkiKwQHx+8jz4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CibdHxSO+bUKzq2WYBD8h/ytR7S20wMWx/pMlK5RZStpQZZl9qrgMhWbzoiXFjkPyD3cgoitpGM/aiQLhy5ZHmcDo6sMhkkNbvDMXZTneNf6OVMS6WutOQMLFuw3hWGgfL5NPDkyV8gY92z0MoYfGkvon+Cd0F1qTn1OI+RBW6g= 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=RO+EXmqf; arc=none smtp.client-ip=198.175.65.21 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="RO+EXmqf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723828360; x=1755364360; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Azq9qB8c+ZqCCIl0U60dNZORg3VJLIGkiKwQHx+8jz4=; b=RO+EXmqfTHh2jWnxVNQU8AltvNIpEhEOzghdcYVm+AMX/WMtqRzXeRyt xfa1hzr0dHCRU0rwt2gmSuUef50apvpMlPLwY0NSgu/UQdicPS262tovZ 5d64wdo1jCXbj1DYFIcrAbchBGkoe1Ibc9vDcwmOJa/5co8YX6urLvCxN dm6lGCIvJ+U82A8CshQEoc5CW0qw8BjwIIsIEAPZAqw+M7L/IPifAybNP cKaTTIntmKfi7A3jqmiCiLJjGjegnTBQZjDJ1a8zjC9W0HawxFAEpAxs+ zLK8APqEPZ/2CzhiyMJG0g+J5IAAigpEgspPud5ns3qi1L9pCwd61aKVM g==; X-CSE-ConnectionGUID: lFE2KSq2QFuNdcQXilxasg== X-CSE-MsgGUID: ApgzBaIHTsGeqQ6n1Q0+Dg== X-IronPort-AV: E=McAfee;i="6700,10204,11166"; a="22101739" X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="22101739" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2024 10:12:40 -0700 X-CSE-ConnectionGUID: 5l52B8chR5W0B7BNtbvLJg== X-CSE-MsgGUID: SorZKKYIQBOKPvmppXlgZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,152,1719903600"; d="scan'208";a="97233141" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 16 Aug 2024 10:12:37 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C32113B7; Fri, 16 Aug 2024 20:12:32 +0300 (EEST) From: Andy Shevchenko To: Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips , Mario Limonciello Subject: [PATCH v1 7/7] i2c: designware: Drop return value from dw_i2c_of_configure() Date: Fri, 16 Aug 2024 20:02:05 +0300 Message-ID: <20240816171225.3506844-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> References: <20240816171225.3506844-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 dw_i2c_of_configure() is called without checking of the returned value, hence just drop it by converting to void. Reviewed-by: Andi Shyti Reviewed-by: Mario Limonciello Acked-by: Jarkko Nikula Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-platdrv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 905557c7dfa4..0ea6c95ee60e 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -133,7 +133,7 @@ static int mscc_twi_set_sda_hold_time(struct dw_i2c_dev *dev) return 0; } -static int dw_i2c_of_configure(struct platform_device *pdev) +static void dw_i2c_of_configure(struct platform_device *pdev) { struct dw_i2c_dev *dev = platform_get_drvdata(pdev); @@ -146,8 +146,6 @@ static int dw_i2c_of_configure(struct platform_device *pdev) default: break; } - - return 0; } #else static int bt1_i2c_request_regs(struct dw_i2c_dev *dev) @@ -155,9 +153,8 @@ static int bt1_i2c_request_regs(struct dw_i2c_dev *dev) return -ENODEV; } -static inline int dw_i2c_of_configure(struct platform_device *pdev) +static inline void dw_i2c_of_configure(struct platform_device *pdev) { - return -ENODEV; } #endif