From patchwork Mon Aug 19 08:39: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: 820450 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 EA2D915B14C; Mon, 19 Aug 2024 08:40:15 +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=1724056817; cv=none; b=QNuM3sVBUSf+XANaIVtzl2FtwdYD+GbGDKqST51XmC3hPahh7wE6uOTgBbnoHKxULmW7elTXFhH8gEXQ3oXaccGIBb173QKDvTO4nyYmmedGgQtoiES5ixnKpjiWwKMYDoGLXt09+FOpKhtCxNuv4pr6gC0ax2uhu2SKIIDUuYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056817; c=relaxed/simple; bh=JeD6dx8LkKLsb4f1jGNEIeW+t/ve0YFKAf5hq/Jb5G8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rGttRgP4ypnMSLNmZPQpJ0tXvNkr4OF2efSwFaYglx7/Ifw8k+Fy4NfEEFGrMlLtYPZ1KLrulhaTctDn2TODYEsjo75ZULbqZwmKaxZPsY6eDfUpFMBwVVmdzcuZnSVS9A4jGkSNdvGcnvVBjgArrVCSZtJ9kEzWuUdo9NScnKg= 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=etrLq4vR; 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="etrLq4vR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724056816; x=1755592816; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JeD6dx8LkKLsb4f1jGNEIeW+t/ve0YFKAf5hq/Jb5G8=; b=etrLq4vRgwLOfGmJdKsckUG3I4rTTltceRTyHGFsOaRgGSXkTaNgFvYr BVP8kfmiTUGCFM2+ltCdPUNko1R97Qn5+rSxrjw/y3xYnBF23U0L8NNLb Ckk6QWlBF2cHAkIhZMjxolbCnoK/CVmIbxYzuhi1AHc41KYblnAlc0m6Y 0OXht1x4RuVrm/+7TEIftg7NaiQS/GXaxWt7p+9pyOF3VhpC+OpZiq4iW XDTCPfHbaBF/KqvMI74WQqYsp1ijomAZShxPdvGk+T3SJn8IBKSjSEGKf whFwoqGNfga4Gy0X2xXMjMSzNsw33E88HbRkcudWAaClh9Q6S2re8tZd3 A==; X-CSE-ConnectionGUID: +XEg5bSVQHyxGc0S0/z9MQ== X-CSE-MsgGUID: ZazoBwPdRRu6uC/XU/Jvdg== X-IronPort-AV: E=McAfee;i="6700,10204,11168"; a="21834852" X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="21834852" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 01:40:13 -0700 X-CSE-ConnectionGUID: f08XVrIYRYC7I561LKWXbg== X-CSE-MsgGUID: HBOILHGCQoyhdIAVg6SiyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="91080186" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP; 19 Aug 2024 01:40:10 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D8505164; Mon, 19 Aug 2024 11:40:08 +0300 (EEST) From: Andy Shevchenko To: Jarkko Nikula , Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips , Mario Limonciello Subject: [PATCH v2 1/7] i2c: designware: Replace a while-loop by for-loop Date: Mon, 19 Aug 2024 11:39:05 +0300 Message-ID: <20240819084007.3700433-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819084007.3700433-1-andriy.shevchenko@linux.intel.com> References: <20240819084007.3700433-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 08:39:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 821921 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 40F82C125; Mon, 19 Aug 2024 08:40:13 +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=1724056815; cv=none; b=AqftT4nP68xthOFppCzPX+05Iu4pVvgKNozbPHCKXdNRzb7pF9bS6yRdg2cVOLFrVB+UQpIqJl1sju6dGXKHkJmBB6eehzfzI1OnEiffq5zmb0CThFA7pAkY3IXqWOjYq1z9sRpo0uSHLUgcsERs/oiA2DX9h47w4IFm6qR+BmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056815; c=relaxed/simple; bh=lmpJVHEI45bCw92NS0r5bbHGa1U4pmqHhD3BTF+AWZ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YlIbRHPMzUz2ny8GxzXIW/fbwA2lzV/ll2w6bHR/+w1LsWppBm1k+BN+0YuAEKkh1wPbyOeNQsdshwiNkQ058WFt808xYjLC7GeLltj4K4M3EqJrAQU77nIFWkFfKt41yChVXTNeNCNgt9lLEUmwMRrNXl8hTo7c4GbdjNQ2Hrg= 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=XwDJJ5W5; 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="XwDJJ5W5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724056813; x=1755592813; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lmpJVHEI45bCw92NS0r5bbHGa1U4pmqHhD3BTF+AWZ0=; b=XwDJJ5W518M+3YUvHGbya41FcqNFs6/rl2lsqXFhAOWZCE35i6ejtrfY Tdrkdw5MfsE29KmFWXaKDT44IoJ5cYCEE/cA5I4+oXKy+xrY4zvOPPAIE BTtZ1SMa2v8dnXY1NV3EvDsa0HaQN8nuJqCdcwUyvLh//cBPZu562dYn9 qRMDWLq/pIM+wrqMn9+KolEnlqfIZC4L5QrtFO5xm5O7XexdTB44dfdFV 7mWZljggZlkcI13TGlXVgl/yl7dSXtbBOiEjx3ZLavYZto6dLfbTPvhoY qwEYZMUVsag7zVIxOs8nKmhZzxy4NYDiNuMq1mFNWZM0xpKZ4ANo4MWuc Q==; X-CSE-ConnectionGUID: rDoYuPY7TFelV3dNC9cxmw== X-CSE-MsgGUID: tDvQOzFdRtGLV06fPJnhkA== X-IronPort-AV: E=McAfee;i="6700,10204,11168"; a="21834847" X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="21834847" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 01:40:12 -0700 X-CSE-ConnectionGUID: MbfR/L+BQsm6oYvwqZxPcg== X-CSE-MsgGUID: gme/tkdZSvin6cemuCv+Ow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="91080185" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP; 19 Aug 2024 01:40:10 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E143F2D8; Mon, 19 Aug 2024 11:40:08 +0300 (EEST) From: Andy Shevchenko To: Jarkko Nikula , Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips Subject: [PATCH v2 2/7] i2c: designware: Let PCI core to take care about interrupt vectors Date: Mon, 19 Aug 2024 11:39:06 +0300 Message-ID: <20240819084007.3700433-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819084007.3700433-1-andriy.shevchenko@linux.intel.com> References: <20240819084007.3700433-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 Mon Aug 19 08:39: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: 820451 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 D7FBA15821D; Mon, 19 Aug 2024 08:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056816; cv=none; b=hSYMK4eWaSIEisSD79ZnIxG2w6PxNk0wFFc0I52bRGCIZy99Kfjl0FAPj6p4DOmXpusv0CjDgqCAzig8QXx7/I7spTvYbe5VgQpOcY47pDcDAU+U4lD62oKU4VfZ+9H83yyKhmcqpxssroMw+XC3BUzF/K/vgwxOPupo8ORQeNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056816; c=relaxed/simple; bh=wiNygSn0xYtYYKaHveS3CXKC0AKbBoJK3KI2wsMtOKk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zh/K2G8vCy4AZR8o4Z1e6SaHNf0hZ+XRQazTYMW456cYwa1d+7ttPWLky4nDZhf6mgMPzEkH61GSETSlDN8QDmBiVmZ/jLyCHuriE4dgNYsFZ0r7JTnj3/euTMHkYPNDmuz3nubqbvnc/T5KFkAJIQiXDc2YvByfii9hgO3KTiA= 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=M9LCR+OT; arc=none smtp.client-ip=192.198.163.17 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="M9LCR+OT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724056815; x=1755592815; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wiNygSn0xYtYYKaHveS3CXKC0AKbBoJK3KI2wsMtOKk=; b=M9LCR+OT5DsvTP7vs7obgsHzgVyoMCjt18j1wY7PCwA1TIXKfsF7t3Vk sUdf0BlSWDHmfBEd0L6n0i8ZBPJd/VwihJsCahP1z+tmm+tYEzmB8wIiO bIIbgamDC1ykTjbPwzBQvav6i7/36mLMNmqNiW2btqZKaOJHor2QsUrKI X2wMGtHyUyLroY4NyVvRhzdLlBo0OPy/qbFxCIcbIBkkg/FRlZfWAhsaN Zmd76EjFXv2HqO3sw3rrRq6Cy6d6/quRuxIAQpQ/u8FUj0TqbBkFKriAz ida6BWEGBIFKUrnwEvuFSIWKGIG2okXKyC7FsbeJPJluJpKbxz3iXX6jB g==; X-CSE-ConnectionGUID: gtWD+7ZjQKeWer63mUDw7A== X-CSE-MsgGUID: Byf2p9gwRdeO9fpJh9Xlow== X-IronPort-AV: E=McAfee;i="6700,10204,11168"; a="22170966" X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="22170966" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 01:40:12 -0700 X-CSE-ConnectionGUID: SNM3NK3jTaq8r3sYiYrqcw== X-CSE-MsgGUID: lrJDITHiRrycMZnQNDhvGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="60007797" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa007.fm.intel.com with ESMTP; 19 Aug 2024 01:40:10 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EE6BA34A; Mon, 19 Aug 2024 11:40:08 +0300 (EEST) From: Andy Shevchenko To: Jarkko Nikula , Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips Subject: [PATCH v2 3/7] i2c: designware: Add missing 'c' into PCI IDs variable name Date: Mon, 19 Aug 2024 11:39:07 +0300 Message-ID: <20240819084007.3700433-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819084007.3700433-1-andriy.shevchenko@linux.intel.com> References: <20240819084007.3700433-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 08:39: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: 820452 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 4AC6157880; Mon, 19 Aug 2024 08:40:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056814; cv=none; b=pLrVIYtnUvW2f+IoZNLHkB9p3dck/2FGkMSttG25rQHLF5FUl9iarFGqnb4VtwmR5x/j3QIDWzLW2WnPUkTy29ru3rfZpEAFS65XQtIUyPpbSAOJkQ+SUu4torWJGx7KIM3tSKcbZmQi56O9n1pX2AUDcqX+NEZ5x0yHb0dNoD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056814; c=relaxed/simple; bh=ecRXmoWtr+H4FTDexcrxBLjv16chf+goailR2t/Is70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jZxU1fy7b5LVzjWZmqDyhoHwwAGn4VrK2chB+qJgbFNFx3tgDLrFWmY2Az5ryobyIDRcz7ZmXypYEj6E0Wxvbvn4//Rk7Up364xuSZmq0kGYqZDgiYoz+7R5g8VhZ2icr3PWbME70IRX7eN6K/lMdcHaGn/p84cAKwVdoGdq/gY= 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=er1pcw/M; arc=none smtp.client-ip=192.198.163.17 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="er1pcw/M" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724056813; x=1755592813; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ecRXmoWtr+H4FTDexcrxBLjv16chf+goailR2t/Is70=; b=er1pcw/MLP1g+MXTcGMzEuRuLQsNK2JEKw+foO1byc6g4X1DVZgFlFuf 5LSdApTRhEwjIBondFgkrAKb9Seban3P3s48Vetp1JW74hE5EKoJ9O/yc 8NETAppaTuMqYQSNi/uTORNvRbu4AYr6HpSJ2U/HP12IG0s1FtNm1ax0C suspfgmsiC8lM3GwDXz5RMVniBPSq9/TKiydaTLc6UCxU7Nkne+qiEFcT fsF9yweyeXUi77/eYBmMsz9TiLAjHuOA/T8YKgEef8mnXWwBAcfQGr5y+ 9jal0zTbDhNBZrhFqhML2fDseLHTSKJG6siFkv2C1zLD3p22kxtSWGM6/ g==; X-CSE-ConnectionGUID: ZjN+y7BWRD2RH7JM/6QKdA== X-CSE-MsgGUID: Uo7/eSVKTKa1mZyfYurhzg== X-IronPort-AV: E=McAfee;i="6700,10204,11168"; a="22170979" X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="22170979" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 01:40:12 -0700 X-CSE-ConnectionGUID: n7W1zypzSbCymD/je+DhQg== X-CSE-MsgGUID: XaRQHOJmQ+2vKLgdEW97MQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="60007796" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa007.fm.intel.com with ESMTP; 19 Aug 2024 01:40:10 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 02B97352; Mon, 19 Aug 2024 11:40:08 +0300 (EEST) From: Andy Shevchenko To: Jarkko Nikula , Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips , Mario Limonciello Subject: [PATCH v2 4/7] i2c: designware: Unify terminator in device ID tables Date: Mon, 19 Aug 2024 11:39:08 +0300 Message-ID: <20240819084007.3700433-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819084007.3700433-1-andriy.shevchenko@linux.intel.com> References: <20240819084007.3700433-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 08:39: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: 820449 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 9A27115C130; Mon, 19 Aug 2024 08:40:17 +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=1724056819; cv=none; b=Ln3FxWwj/HsUHEgKc1qyFUQhVJ0oel9k6FaR9pIxvx2pneVnCGgJRUr+0kOdv8PFqxFtLVG8xyEnrtKKRHBD1equPcwheAXpRt6RUAMDFvjnO53X9yVV4PqK+WRg1UDbi1Bz7sri2hvVRcCT5GFWjPs3B5l3v6RIES9TXGNAFZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056819; c=relaxed/simple; bh=q/dzERaIodn+eQ2P4wKpMoyNkbhR80Ijh3zvaSu63WA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r0m47ZjzqexSzwIaUnjkk3iAAiF0FQUX1Au71A1GyjlM8qmpG/qMKazg8vlv1aj/u49gqE3JGr6Wo6JVoM4atkmIk26qq2EaoTlPhEzQiDxadIZr5CjXtED4KdnzRgxfHOWqJPhiOSRVrRR/3jd8M2/PpYEyoAL8+xaG7IRfY18= 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=izZXYpMp; 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="izZXYpMp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724056818; x=1755592818; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=q/dzERaIodn+eQ2P4wKpMoyNkbhR80Ijh3zvaSu63WA=; b=izZXYpMpX3JlDRc7wzQyGT66p6JZ1ttKRlP3xhiNw5kvii5Yel1xo43M wypiIVwfqTUX8rDfuD3/5qB68vdQyXEPE6RN8Si7lPMdzxkeTSJAD8JWZ X1d+vY8TQcU+eIe8zPGujdaZlZ3Mvy/1anO6Wae9j+B0DbVgugEHRlcqL P7p3Psi76b6kCcZ/1NieWBOiRP/cB8UxOb750l34MiKDm7lxIfLNOxXuP h86fH9uDxRE+E3sMY6j2kgKiuaYS2Vz2kSMDt8fUYrXMtf2Cviz+cSlh3 QOHy6BtRg+q4U6RNStjRbffgqEuo8t2MrML4sc2Um/B+/OxHlB3mrLZ3W g==; X-CSE-ConnectionGUID: wB3C072vTGu3wAnHGJkggw== X-CSE-MsgGUID: 2ABktHmUQsWvNforX9vjfw== X-IronPort-AV: E=McAfee;i="6700,10204,11168"; a="21834867" X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="21834867" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 01:40:16 -0700 X-CSE-ConnectionGUID: ga3bwXg2SBe8b+jT/1lj3A== X-CSE-MsgGUID: ELAIoj+kSk6ed7V8OP6cow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="91080206" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP; 19 Aug 2024 01:40:13 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 13C843FD; Mon, 19 Aug 2024 11:40:09 +0300 (EEST) From: Andy Shevchenko To: Jarkko Nikula , Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips , Mario Limonciello Subject: [PATCH v2 5/7] i2c: designware: Always provide device ID tables Date: Mon, 19 Aug 2024 11:39:09 +0300 Message-ID: <20240819084007.3700433-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819084007.3700433-1-andriy.shevchenko@linux.intel.com> References: <20240819084007.3700433-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 | 60 ++++++++++----------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 9ce74a8be43a..6328ae943a34 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" }, {} From patchwork Mon Aug 19 08:39: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: 821919 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 5F70615B55D; Mon, 19 Aug 2024 08:40:16 +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=1724056818; cv=none; b=IUSmyU7tHL3dpVQDYSZqxA7OJglBqKNyrvw90UUSGebo8iQ4i9uBnI0UNEgaO9MkfCdHLa219d8VklkI3jfJpasTu2yejwrOBW5x8mojhmKsrbtOd3woyYC88bd9DuHWVhwXW30Hv4Xs9UUPn12OHcSTPK2rNR/WjidoZgLl9qk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056818; c=relaxed/simple; bh=KoT/31pGAd0xE2KmlmoMP1RqpQ6AxIOuaCMFure4zbE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TUZtfeGnGTcS+++xzSRaAvW4+feA+fHZHeOaY+GQbIlIkSrLSkoSnPaWZQJre8RcH1uQqpkTSVduUbq7b4qx2s/pvMtiayOkGdRjWSKVoxPbQy84Aeit3jGJiAbhvufGmGzA8fyvoF+pmcXMMhbxQWDDk99XU3/W1VSpMvvXAAc= 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=UG1K4j0m; 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="UG1K4j0m" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724056816; x=1755592816; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KoT/31pGAd0xE2KmlmoMP1RqpQ6AxIOuaCMFure4zbE=; b=UG1K4j0mUxFpYnAryd/yqkRvhyQM1xQyFk9PQdkGf4m3plC+uo9Dh8an vLWukVIpojfNyx2338AmjaCJGflly+W4wgJeSo3iDgFuhlUa36P2+H7WF PpGvBXdkbI0tQ/CStcAt8aS7lH6XAi5KvU/qSgEkeXX1tsoxShaU2IURH 1gVyjhYka3wzbr5kjCw7qxuBNQZhvmb1hPFwviBM9UO2WaobV1IzOVVIs bMhyGM49nzna6ignABdfJZSRAqwcQoERDt4zEfi0XuDUXpWmVvZae1ZfS tHXbaYVn00QNazlRAKLzFfnMa1NY4/+wgwtzXLxNAiSCVaXwfT/4XxOkP A==; X-CSE-ConnectionGUID: 6xic3sp+RKGwUBF8w0VwDw== X-CSE-MsgGUID: 86xyg+u2Qu+e5KU/BJtX0Q== X-IronPort-AV: E=McAfee;i="6700,10204,11168"; a="21834862" X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="21834862" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 01:40:16 -0700 X-CSE-ConnectionGUID: CcEu4ocTQOOA+wsvlEKj0g== X-CSE-MsgGUID: 5uWCnUFCQYeW43VtakzmDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="91080205" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP; 19 Aug 2024 01:40:13 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 20C37433; Mon, 19 Aug 2024 11:40:09 +0300 (EEST) From: Andy Shevchenko To: Jarkko Nikula , Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips Subject: [PATCH v2 6/7] i2c: designware: Drop return value from i2c_dw_acpi_configure() Date: Mon, 19 Aug 2024 11:39:10 +0300 Message-ID: <20240819084007.3700433-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819084007.3700433-1-andriy.shevchenko@linux.intel.com> References: <20240819084007.3700433-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 08:39: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: 821918 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 D74FB15C14C; Mon, 19 Aug 2024 08:40:17 +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=1724056819; cv=none; b=eav1qOV/BRfxaCicqQaDrBqDZ73I7rX0QCl0242NJXZ6RYkD0+Sp4LPp+LTwZynrwWihBLZ1ExrN09oXguQnjEKuBDsOvddv8VZE7snSLPaE38mcR1o6tLgaj17HpiXfCiZSsRBG41xgbKrw76wqux2J7n/FGlhM/odJ89JQOIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724056819; c=relaxed/simple; bh=jxV2hAqOs7BxSVK1cXUtzc6fthb30mv8K5t33I/+KgE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OjGWJT7GOaDD176t8yBzT3qj/RczCqSL0pnLt2HbDFB1lL71mDYZdEWzxbr9VehB9bEnZGG1Cs/O/mzOq+5OTJazxpWFmj/tAHdfJ57ezm7szShQTXcllSCI1SVwSBSoC1C4uhJXe7DWXPh/dpqAhPMIN5Ng7T1NOwc8DcXYPLI= 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=LJ4Z6P1C; 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="LJ4Z6P1C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724056818; x=1755592818; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jxV2hAqOs7BxSVK1cXUtzc6fthb30mv8K5t33I/+KgE=; b=LJ4Z6P1CKegVaXydHsvdw0bgkT9HSmcccrdBYs88KLaHasthEbiTQL4B VC0X0cqxsOF1NlgQ4Rj3h8EQmgg2h6K+G0roDG5TLk+hlrwyj3HWtlTP7 xvkkNNyZFm6m4bn5BACTufl/JblyhT+8QOlphP6hBsJ+eI8EKF0T7ajcQ B6zZyuIY8wdNzx50SVm/7KFI4j4m2HXkw5HhyYIMh+9yNULVo46NtS7nL thYQiphzVOwOa81Vi3dU+4PBdUeMD8uJMb0xdNZcze/bIOKQIZxLe3ty8 QpnAU9JtynMVbqc3KepmPDE5vCfUsBGebTEvT/RXuqC3P7b4FSp5Y+WaT Q==; X-CSE-ConnectionGUID: nsoDeTK1R4Cn2+onYzEdcA== X-CSE-MsgGUID: 37qcyBTvQbC+htD999e05Q== X-IronPort-AV: E=McAfee;i="6700,10204,11168"; a="21834872" X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="21834872" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 01:40:16 -0700 X-CSE-ConnectionGUID: znqmongDRB6XZZX9VGx4MA== X-CSE-MsgGUID: Mo8kxpxpT4KU15/58nhwRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="91080207" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP; 19 Aug 2024 01:40:14 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2EF13562; Mon, 19 Aug 2024 11:40:09 +0300 (EEST) From: Andy Shevchenko To: Jarkko Nikula , Andi Shyti , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Narasimhan.V@amd.com, Borislav Petkov , Kim Phillips , Mario Limonciello Subject: [PATCH v2 7/7] i2c: designware: Drop return value from dw_i2c_of_configure() Date: Mon, 19 Aug 2024 11:39:11 +0300 Message-ID: <20240819084007.3700433-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240819084007.3700433-1-andriy.shevchenko@linux.intel.com> References: <20240819084007.3700433-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 6328ae943a34..340c9e9a450a 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