From patchwork Mon Aug 19 18:45:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 821903 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 7A72B189915; Mon, 19 Aug 2024 18:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093167; cv=none; b=YeQ/Ha1Utvz2u9ySlPYhSO0FMn+EYUUqmsKwJqtN0UE9xsKZ9KeZZ6EaWDjE+k1pKWzqrCP+MS+Ar2RNGo+e5TQC2vMGvyEJWt4a+0KChbLNDnQx9PmY/IpDfpDfQU1pAlIF/Zt4lcKAIi0XIfU0jFowKBWtFAh5PSqsr2NeJQM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093167; c=relaxed/simple; bh=JeD6dx8LkKLsb4f1jGNEIeW+t/ve0YFKAf5hq/Jb5G8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kGeuO5VAEXASn/rB+y93qvTYL0sbi/N7zHjSxEQww+g9KoU4ccOFZMEKtBeFdb63ph6S7czg6r3wze2eMZMNKT7EyMcbozZUZN7UFRR7eyNkHPfLbK5tJ8W8y/5vs4/6nYAipHBcB+eRKczo67H9agTYcV1AD+hcnOGqC9stz+U= 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=JVrDm5I9; arc=none smtp.client-ip=192.198.163.18 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="JVrDm5I9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724093166; x=1755629166; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JeD6dx8LkKLsb4f1jGNEIeW+t/ve0YFKAf5hq/Jb5G8=; b=JVrDm5I9nZb57ebRTXMhAvjfK7u+2bMOws2VeKp2iAe4TEtsKT94cU3K eEPtLjzCgG8j6HwQsTXBl8sewYoInCVrESv1sYswQQAyfxmuyxZr3xS3z tvy3dpVyWJ1E3NG/nRfNnk5r2ZZ3YwYXr5VV1uWuw+uB/JCKuHLocWeWV qleJ6h0Y0UXfSjNQaiLuqEbCW3H2nm7EWkqI/hL4zJagB3SenXvu0dbny FL5dXF0eG2T7pIeo6nEl42tbgo1wGRa5od3CGYDdC0LPl2ocxjt6kH1ny /PSxnuCm8rTGBT7PAHorzFkC5pOCZGoH+QbemRD3dTLGHIfcqhAF/nRiw A==; X-CSE-ConnectionGUID: CjkCzlbiT2qgcn+gWZsUtA== X-CSE-MsgGUID: TzCQlZZjSY2dcATnXXYY2A== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="21902302" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="21902302" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:46:05 -0700 X-CSE-ConnectionGUID: zOLOSkmyQpaaA9jOp7Z9vA== X-CSE-MsgGUID: zTPi4leaTGedagulTld4Fw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="83671052" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa002.fm.intel.com with ESMTP; 19 Aug 2024 11:46:02 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 16E152AA; Mon, 19 Aug 2024 21:46:01 +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 v3 1/7] i2c: designware: Replace a while-loop by for-loop Date: Mon, 19 Aug 2024 21:45:07 +0300 Message-ID: <20240819184600.2256658-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819184600.2256658-1-andriy.shevchenko@linux.intel.com> References: <20240819184600.2256658-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 Mon Aug 19 18:45:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 820436 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 81719189916; Mon, 19 Aug 2024 18:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093167; cv=none; b=LQ0sWBxPNFLZqUT3gPoTfYutB+IjfaoX7aGnSOx05FyZwmDnG1/Vi2XAbCaY2khI0s353LlHv6qHHXwniAszBXiz3zlIFCxbwy2I254F0DjLvhKjOQVjz4HxbInYcLyb/V5nBu974siAH7eWUvZyKB3Kz6/bxm9G0lWppn00jfU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093167; c=relaxed/simple; bh=lmpJVHEI45bCw92NS0r5bbHGa1U4pmqHhD3BTF+AWZ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OK4lRv11mOxK0jiOz4V7JYPd8upuwu3bT3gbwk8LHXkWDDi+Asrjf949uwJEeHAiW7W2ZlkdobV6+FYpf7b5RNmoAZu5f6A7mENy6ioYBq5Sax/XRViWgqDVZxsMNqKc1zXDKoswmHSpe8K/IV0Csc4SSTZ4mv19Qhptx9j4hEM= 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=bC/om4c4; arc=none smtp.client-ip=192.198.163.14 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="bC/om4c4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724093166; x=1755629166; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lmpJVHEI45bCw92NS0r5bbHGa1U4pmqHhD3BTF+AWZ0=; b=bC/om4c4SS5vdqDvQ01gsl7woW8+WlDdwN1Gjq/SBjxQhURHeIhVIsPq h8CHFzsJTOy4pA5SC1Uh3L1yKMn4FeETsvwUWND5kNbRaxMXGQIaElU1n rLYFj+82ZWE0emUQNm4rSgfYjMrkYYC2akliV1wWwBE7c1+SSK+vLCt8+ HblHiHALOsILsbw2raJrE8rIDGG/VldoztSYyrnU9X7yOlGK6lowLRmjw BW0HQjSm1pl2qXuE44b5y9bzwv2wV/o63iGqlMDVrzvegv9uDuQ+5Z+Yq bWEVktllCr1q8LtlPGcOIq/iBgG7BgmiDJ9g17SM7cKU/tLw8kB68kTSk g==; X-CSE-ConnectionGUID: ca3jwcA4TnK4jzHEXloLtw== X-CSE-MsgGUID: ts+9HLZjRzSzaF9mZ48UzQ== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="22537636" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="22537636" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:46:05 -0700 X-CSE-ConnectionGUID: P943Wh3bRESwcQbF/Osa5Q== X-CSE-MsgGUID: Sf2ivcdmSpuaMRMjVxSE5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="60433944" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa009.jf.intel.com with ESMTP; 19 Aug 2024 11:46:02 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 293245CF; Mon, 19 Aug 2024 21:46:01 +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 v3 2/7] i2c: designware: Let PCI core to take care about interrupt vectors Date: Mon, 19 Aug 2024 21:45:08 +0300 Message-ID: <20240819184600.2256658-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819184600.2256658-1-andriy.shevchenko@linux.intel.com> References: <20240819184600.2256658-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 Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula --- 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 Mon Aug 19 18:45:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 821902 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 985BD189BA6; Mon, 19 Aug 2024 18:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093169; cv=none; b=osSNtJ95yeXMxH2faVnJvHb0J2BlhjJGz4T/b04vtAQIHytr2MXCrItgyweqETnwx6Y3+OmL9BkGzLjoTRgSBcwoWbC192XQqfnuOo2zL4N7juBh7TA5KARwwJSObAK6VtMhc9Q32uVeMHgexGSYRubmU6z11SRq+VoR9kZlEqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093169; c=relaxed/simple; bh=wiNygSn0xYtYYKaHveS3CXKC0AKbBoJK3KI2wsMtOKk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=smNWwhFPwmzBFbDSEDbjqool2SSDBFxxjCdSvr4iONi+G3L3VIjOcKnG4DKs6Qx/jQo5npAVmUgrU7ljSvTxPYqoB9QO4623wYZPRYJsc9NmJZeiPyXmwomUW7uEi7hxPst5Jvbgim1/ubJfiTNoV1eBryG5g7sL1lR6LPry5Q4= 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=iRXpmHEh; arc=none smtp.client-ip=192.198.163.14 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="iRXpmHEh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724093168; x=1755629168; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wiNygSn0xYtYYKaHveS3CXKC0AKbBoJK3KI2wsMtOKk=; b=iRXpmHEhx2aDJij6XjMUpwHM5QHjGdJC/J9HYgdd+fx+ONfmS2rJRvG5 Sn2u1Nh4uFuSZUpoRAjswJLTdchwDcj/X9XPZN6JUiXIL470i49TSADIT WZdGhuAZkKH1K+LrK7hY5OcFhtDk4qqbcmNPGMYRJNX2OCuPIm1iHUufz XAg5HazoqolOtjHrb0zSHAO4gnsAu/As3iC0FKKUfQ4gm46toxpjEFImb 1PVAQehLDzVex0gicb/KeK3SU4msg8ebUmygrClciKeiYQy5MxrJZqoym AH+Cr0Q/Mj74v+4v7YfD6EzoVinBEquCpKPrYB8mZR/+MuW7j/hraLz2C A==; X-CSE-ConnectionGUID: qpJs/G+gTIiHBHXCQ+aOqg== X-CSE-MsgGUID: JDaxlWU0QxCMvIHCkZI3+w== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="22537648" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="22537648" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:46:05 -0700 X-CSE-ConnectionGUID: s20/WfE9QX6mF2fXKHRk/g== X-CSE-MsgGUID: hLqKjEM9Sy+xa2pI/B+5rA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="60433947" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa009.jf.intel.com with ESMTP; 19 Aug 2024 11:46:02 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 384F651C; Mon, 19 Aug 2024 21:46:01 +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 v3 3/7] i2c: designware: Add missing 'c' into PCI IDs variable name Date: Mon, 19 Aug 2024 21:45:09 +0300 Message-ID: <20240819184600.2256658-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819184600.2256658-1-andriy.shevchenko@linux.intel.com> References: <20240819184600.2256658-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 Mon Aug 19 18:45:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 820435 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 A1C25189BAB; Mon, 19 Aug 2024 18:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093169; cv=none; b=AJV2ejdACScl+NUnZAPfWgR7kvfi39RghUB7+IpU0pW3JKhSdMCwBFB8lbCgdMOlfE6beUY9CCrlBaPfLPjmAnMlB5RjxMiJJ31DkzL7ZhGt1b8aPv0h/3XvzMkX6xVD022DXI4CzeonXuuvXWp/jwxCHcQ2a90vCPCWLn3OTUM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093169; c=relaxed/simple; bh=ecRXmoWtr+H4FTDexcrxBLjv16chf+goailR2t/Is70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C54ojeIBAfaNtV2MHKkj+IJskhsZoO9Bdv2Kx8eyjoXmGV9vAzRaofG/RTIB1bf3ljVSLk7SzBfTBCoCUzBkAn3bWImHUuF0da41ZnSFCdakRQJh0s2z31C6BtShvS2gnGV9bDLSlozBULaQDXJj7AYUfFhPoob+b6G0EWzbJ5g= 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=UO+U3fXH; arc=none smtp.client-ip=192.198.163.18 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="UO+U3fXH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724093168; x=1755629168; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ecRXmoWtr+H4FTDexcrxBLjv16chf+goailR2t/Is70=; b=UO+U3fXHXg2jnOpcFrRT54pPvt6t9eo3hYwSSQAAtIm91av34r7/RGnz HuQMVkoP/cHwRigWyXkMKjA8l1PefNZosbb7BMaNb3Ff+eG/icOD9PtuV ddQq5klYo5Ab5rFIj6zxluhCpircVVJWfUUG93SFa2qLKgWkE4QWk9z9G hyAZ6eFt/psZOlVEQTHUkWqo82hrs/YMEWd8koWaOcgNUZBOGb78+2X8Z 4+AIhOmvX/CQlf8H14tm3SOwRPGd47zZygBjcL9UPyMIegPn3j0S8jY+a qJNAuztI9I9OFjG+GDJhog2hDWqxH8x4cfTkqs64l+wpfIyngz8xS4lL3 A==; X-CSE-ConnectionGUID: zJyhlL+TSlOVqFumFLbxuA== X-CSE-MsgGUID: fdATBkDDTeyC8Rwdb2Pa+g== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="21902309" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="21902309" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:46:05 -0700 X-CSE-ConnectionGUID: KxSRdwSMQTybJVmuk4gs6g== X-CSE-MsgGUID: H+KvwN9oTaaaV2q9aa3RvA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="83671053" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa002.fm.intel.com with ESMTP; 19 Aug 2024 11:46:02 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 49939719; Mon, 19 Aug 2024 21:46:01 +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 v3 4/7] i2c: designware: Unify terminator in device ID tables Date: Mon, 19 Aug 2024 21:45:10 +0300 Message-ID: <20240819184600.2256658-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819184600.2256658-1-andriy.shevchenko@linux.intel.com> References: <20240819184600.2256658-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 Mon Aug 19 18:45:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 821900 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 002AA18A932; Mon, 19 Aug 2024 18:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093171; cv=none; b=t+gMsf/ZfI1aDlA0xtaIQHymaQsZaN3m4c6CDrY+fT5eA7l2Ki23N85FAf3lVtEi83PoWzg8bfOcduqueNjvkMlqG+MDfyLbWQ6AKeQ/6E6sZHSEYCeEPRXqPLNtdDNtlprA7/eRSecMqpwv5Ndm1pm8hUiXZnTmaerXQRTj3HM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093171; c=relaxed/simple; bh=Y1Ep7oRG8mmFYP1MjwtqPXbgMeqhwANm2mnuz20Ojr8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y9TM+sZLgj1R8xkjyWCljtsx3J4PpWn0MxzoNomNME3MIznZMgVIQzN30SOq/dl9eJnGSVWL5eZIobyRiFOoBtkb/6vYENBqq/FxqguYV0Wa3fq4Wm1KpUdH85YBvn4YlB0IO5KtQT29AKCBN2SDpAKtr8Kq+aSqQjzRlzKuPTA= 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=dtCzxQL6; arc=none smtp.client-ip=192.198.163.18 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="dtCzxQL6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724093170; x=1755629170; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y1Ep7oRG8mmFYP1MjwtqPXbgMeqhwANm2mnuz20Ojr8=; b=dtCzxQL6N2Zh6yMQ47oqudrG/IGY/0pOXvavPsoQk0bNjfCQnt6qUZAZ F6nP/V/dKZjpXgYLkDZ5Iq14roEt6x46auBAMIYjfdUKTo7EL4ythNYlS 5UoJHhKnURUh2LgipJlNu9ju/Yg3cugI3BnkaGt4PjRNLUeI5ny55DHNC 9ODMvdrBksq8TauV1k6uwdcYQTBqsfco7v6RNqUoTTmNYl4m7QpJgiNJR rdncWIi/+0/lOym0CVgyZG31aKU0Ol0sdmTHXQoz9B3MBkUaFkcfPPnMQ Fl7/XubtQ7mIPJyYp6zaQgd25etBTd19CVCdGmMBoyZ+f2Zy4GGb8ldgv Q==; X-CSE-ConnectionGUID: PK/MZw7bSIO98fr1sdVhbA== X-CSE-MsgGUID: WkQfRgdFRiOfMHaMveQI3g== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="21902315" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="21902315" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:46:08 -0700 X-CSE-ConnectionGUID: LNyXs2hbQAypRk+2b2t5zw== X-CSE-MsgGUID: BBsp2xcNQZKtZJ0EU6mVkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="83671090" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa002.fm.intel.com with ESMTP; 19 Aug 2024 11:46:06 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 550A072C; Mon, 19 Aug 2024 21:46:01 +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 v3 5/7] i2c: designware: Always provide device ID tables Date: Mon, 19 Aug 2024 21:45:11 +0300 Message-ID: <20240819184600.2256658-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819184600.2256658-1-andriy.shevchenko@linux.intel.com> References: <20240819184600.2256658-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 | 64 ++++++++++----------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 9ce74a8be43a..c1e1344c3fc6 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -40,29 +40,6 @@ static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev) return clk_get_rate(dev->clk) / KILO; } -#ifdef CONFIG_ACPI -static const struct acpi_device_id dw_i2c_acpi_match[] = { - { "INT33C2", 0 }, - { "INT33C3", 0 }, - { "INT3432", 0 }, - { "INT3433", 0 }, - { "INTC10EF", 0 }, - { "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 }, - {} -}; -MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match); -#endif - #ifdef CONFIG_OF #define BT1_I2C_CTL 0x100 #define BT1_I2C_CTL_ADDR_MASK GENMASK(7, 0) @@ -149,14 +126,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 +446,35 @@ 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 }, + { "INTC10EF", 0 }, + {} +}; +MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match); + static const struct platform_device_id dw_i2c_platform_ids[] = { { "i2c_designware" }, {} @@ -488,8 +486,8 @@ static struct platform_driver dw_i2c_driver = { .remove_new = dw_i2c_plat_remove, .driver = { .name = "i2c_designware", - .of_match_table = of_match_ptr(dw_i2c_of_match), - .acpi_match_table = ACPI_PTR(dw_i2c_acpi_match), + .of_match_table = dw_i2c_of_match, + .acpi_match_table = dw_i2c_acpi_match, .pm = pm_ptr(&dw_i2c_dev_pm_ops), }, .id_table = dw_i2c_platform_ids, From patchwork Mon Aug 19 18:45:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 820434 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 1679A18A6C9; Mon, 19 Aug 2024 18:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093170; cv=none; b=jOhPkvyXaXtjEAYbAxGDStMf/Yp/q0Wpmh/j5aT+S10PENpx0LZsNI5eCLoYiByibJO66ddjWjeJTkUrU3AxvApyPzcgCDr6w4GO2T0atP69JC/BnVsLRnMuQLy6fBlt//XY815pnbuhbwNSTd/psS750RhWzAGpmhYx9IuNh20= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093170; c=relaxed/simple; bh=KoT/31pGAd0xE2KmlmoMP1RqpQ6AxIOuaCMFure4zbE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eSqxGgUAO8HowdG1cuj0MHiXTmHo/Av5zwAPjCJHqWhqffEDHMqwiBklFp/aBKAoVu4/s3pDQpFgNBwIFYlgzNMZIT4gX1ktXmFuRgXljb5KmFlwHlP5JENg8Xl3qQfvb4sfGwMVHwMayKsZwNraW79Y1ZjcG7oOQ0hgWuU/4EI= 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=daD9xcLa; arc=none smtp.client-ip=192.198.163.14 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="daD9xcLa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724093169; x=1755629169; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KoT/31pGAd0xE2KmlmoMP1RqpQ6AxIOuaCMFure4zbE=; b=daD9xcLaSjrSckrw8CN3hWQIDmE1MgawRWZLHjJxaa9+TkeUN1QvfGb8 yRSbXqc02ETg4dxtsiKHR3w77VUWHqrBI07hpykmKS5cXtgTERV8BpSlK boocK7NGuq8UZAlChJ9GGyuXSdv4FqiSn+e0comklgSwB+le+OvOtule2 dtrT0CepgVxaPGJ4QtZq8vP4oANpJqovctujUZCcJSjKc/2hGidke+zWV auFwfsr6MFc3JCzgUgrrj7ghwD+VN6I1B/+91DKP1TNItJL/k/yW3/aYU HkQtfZqs20gND0AV7/GPVqO6ui77+9Js5Fhl+YLYUhwcglKiHE1S+OzuW w==; X-CSE-ConnectionGUID: yuVtukRGRqCXaOsFPwWUWg== X-CSE-MsgGUID: MU7rAcgkRSmOZ15UMBQLXQ== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="22537666" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="22537666" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:46:09 -0700 X-CSE-ConnectionGUID: 9ZkS7+3zQjmmQUgRscmMlw== X-CSE-MsgGUID: RXpicG8OQcGdTldZJ+RE7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="60433959" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa009.jf.intel.com with ESMTP; 19 Aug 2024 11:46:06 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6485A751; Mon, 19 Aug 2024 21:46:01 +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 v3 6/7] i2c: designware: Drop return value from i2c_dw_acpi_configure() Date: Mon, 19 Aug 2024 21:45:12 +0300 Message-ID: <20240819184600.2256658-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819184600.2256658-1-andriy.shevchenko@linux.intel.com> References: <20240819184600.2256658-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 Mon Aug 19 18:45:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 821901 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 CE28018A6BC; Mon, 19 Aug 2024 18:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093170; cv=none; b=mEcnL5esJtvzdy/LcUiishRGZqQH0J+bsBuK+UVwaBDdKTy01hSbq1RxfEkUiW4ZMsG6ILCdcyC4RDNVtqZrw/nNw0JBOHvZjChKvtYg1/SZfK59wGVTJrfKhXSZDgbJax/1Zrnt6Nd1bPCt5Fm/uOKZWzJZM58fn3aw8HApzc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724093170; c=relaxed/simple; bh=orz/0lF6uAuaBB453PuZmPXmD0diGdVSoe/F0+vR7qU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vu0f03S07ZHFgLWyRQzV6gUBYJQKw7TszEtQ5gdLNejr0s4VWr6aRRiWSlW3434+o/SOlknqQeECppPt20QJDtWhpX4DUW8u3/tZyirAe3GoonscnTvOs9wjjOGqu1P5bLnRN2cMuN/yc79XUDHLrZy419zQ/6VhLyJ+Wv0DW0I= 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=jwwWSRZv; arc=none smtp.client-ip=192.198.163.14 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="jwwWSRZv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724093169; x=1755629169; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=orz/0lF6uAuaBB453PuZmPXmD0diGdVSoe/F0+vR7qU=; b=jwwWSRZvLWMzWbq8YL53uF/w5T8zFXSYoWdTt7jbQzszCBh2jq6CPYJ/ pRps1v2mb+TkdF2oR3A85fAGKRIUC4czu8dlwN611FaAh7D3lYNtd/8P8 AeUY78ebGqQFx7jgeO6SDflR3BCX44AJrWzRbrIdHF4IcT7dqbUVqjTSR EvSEC9j6rwt1K7OfdQqdn5vTp0erGFwr5GDktchv7Uw1KLsrkj+BCxHMC FmezLggO36poSsJY9Sp/CpjR/sxroe8wC6YwDgoTuOE94xzFSHus+tEUM WSEnOSxkfbyhDfB0gBIeQmXsx+nP+VgHBBDuVLjYz0pW0qS18prSMcwV/ g==; X-CSE-ConnectionGUID: lhLo1ZF+T9y+iXoxkxrIsw== X-CSE-MsgGUID: WhTtT+nLQKWCyawWNVo/xA== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="22537659" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="22537659" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:46:09 -0700 X-CSE-ConnectionGUID: B1J5UmGuQIumBX9gHdlP0w== X-CSE-MsgGUID: G4DK/AxpToCPUkNoe0O4fQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="60433958" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa009.jf.intel.com with ESMTP; 19 Aug 2024 11:46:06 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6E7E77CA; Mon, 19 Aug 2024 21:46:01 +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 v3 7/7] i2c: designware: Drop return value from dw_i2c_of_configure() Date: Mon, 19 Aug 2024 21:45:13 +0300 Message-ID: <20240819184600.2256658-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819184600.2256658-1-andriy.shevchenko@linux.intel.com> References: <20240819184600.2256658-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 c1e1344c3fc6..cd24d2b8becf 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -110,7 +110,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); @@ -123,8 +123,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) @@ -132,9 +130,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