From patchwork Tue Sep 3 21:28:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13789321 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 DA8FE13DB92; Tue, 3 Sep 2024 21:29:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725398975; cv=none; b=B6AfeVVcgAi0NZqnc7YZYcIfpmI1PrnO3+If1MagYqL2iEQy5TOA9wIbZzh+svQ1YbU1bWxaKZ+rqfsT6l5VlQVmXXyV78IWvwx5K1IAQhlklyzKMB7cbk4Um5U4G2fML2jgo2DqIuLS2NR1W4gLIqyQO13j8z/EZARXievG25U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725398975; c=relaxed/simple; bh=RzBWo5I47sYPIU+Mwh9SA+bbgDpT7ljQ4ejQ2FXfWLE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YGaUKeTlrhDgxXeoLl+6zh68yRBnq0xqVrGj7Cqb5VZQJ3bwTkufPRq/A2DX+ljtZr6bLjs1Y+xnRPauXA6iYzI7EnG0nn5udhcL5CUhfrnod3BcVThuY4aaX0zCXx8myiZTRqm4A48MCTKNMF5Y3FlwcI20gB5e9UvnJ+3sYhw= 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=M9dCvAk1; arc=none smtp.client-ip=198.175.65.9 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="M9dCvAk1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725398974; x=1756934974; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RzBWo5I47sYPIU+Mwh9SA+bbgDpT7ljQ4ejQ2FXfWLE=; b=M9dCvAk164yHh32Y0K/zek2zqGV6RJW1VZSsOzQbguH5fngtnyFJggTN xNYM+wnx7qDV7st2zf3O1xTedq639lI4vc/b7zWDa1RpIuF5io6iOSuf2 OeqZnzboBatbOGFDRoRvxRNCCpe1qZJHr1Qn4srqM3Vl0+XwNaYuLSunU vUTdsdHz+hrNGwPcFAAzBjGYutZcoXk3saYLxaYf27NdS8RzMtGxP8Lkl Q/mh4eeWNgKwW/QA1OpkVoc228hJfOcnHpl+SN55EJI0OwfzX/LQWRbxW ksuna85SFFyLcYdgsnpE41InGdTBfBfFLZ9F/sPOG2rclAtsCP2EQt9PQ A==; X-CSE-ConnectionGUID: /lAQ3/jES/OrPyXTgKDI9w== X-CSE-MsgGUID: WlBxq9G+T7ej5IWlKizCYw== X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="46554422" X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="46554422" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2024 14:29:34 -0700 X-CSE-ConnectionGUID: YeeJv4UYSji2B4ua+Gsflw== X-CSE-MsgGUID: KrWvWV/RQBy7cpBOkeNfzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="95781598" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa002.jf.intel.com with ESMTP; 03 Sep 2024 14:29:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1D09B3C1; Wed, 04 Sep 2024 00:29:30 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH v1 1/3] iio: imu: fxos8700: Drop unused acpi.h Date: Wed, 4 Sep 2024 00:28:20 +0300 Message-ID: <20240903212922.3731221-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240903212922.3731221-1-andriy.shevchenko@linux.intel.com> References: <20240903212922.3731221-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are drivers that do not need acpi.h, drop unused inclusion. Signed-off-by: Andy Shevchenko --- drivers/iio/imu/fxos8700_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/imu/fxos8700_core.c b/drivers/iio/imu/fxos8700_core.c index 6d189c4b9ff9..281ebfd9c15a 100644 --- a/drivers/iio/imu/fxos8700_core.c +++ b/drivers/iio/imu/fxos8700_core.c @@ -8,7 +8,6 @@ */ #include #include -#include #include #include From patchwork Tue Sep 3 21:28:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13789323 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 386131946B3; Tue, 3 Sep 2024 21:29:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725398978; cv=none; b=ohgsisvQAwyiS4G9BLWBnB1sG0IOivo6282xtxgwY/YnF2smg102tyjVm4vx1Pch/xAfSyN3Ak7ngvJmcW7wosWk74NEo06GlDWd0avcFqls85Vvj4NDmGFvkGq/lg2naHmhx2qs8RLnFXEhU0xiG8Qo4zUNsHf6Rm29E3qJULY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725398978; c=relaxed/simple; bh=w54SVlVeEUFCmYJKwf/xbI5scbr67deThfvxet6SzkM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lGyiAAt6z/y4lW0OpZ525y9MOdKECOvp/6Jd6YdPR5t7WkCFNOIYfEPXxGmLvkujPV57mVE5L6KovEwavZto9OvMZTNFIcXzRj9Ir4/hWfgAAv03VfkZpsfLpr+I6gAMZ+K7g8u9wSlICS5qEE4UCfOjeOSKJjrjmRRXZF5F0AA= 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=jPonUOwC; arc=none smtp.client-ip=192.198.163.19 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="jPonUOwC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725398976; x=1756934976; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=w54SVlVeEUFCmYJKwf/xbI5scbr67deThfvxet6SzkM=; b=jPonUOwCn8QOtGXydHe9SWcfpztGJE3/4Ew4SNV4gGnMQeT59ix0oWVr Rcrzs1m1b/HX0OdnIDaWSpx4NPKeieWM/jO5woH6zUzNC7XVkMkn3SEJ/ o+6nYbCUZ7p3GScVE6RJ5H/3l1GXwHeBPoy2AKF3Ik8CISJdLgPU6spys oB6JT0/+cZxnGTF/mREteVxtILFTdqjQrC1lFKrLkaPNjtatzu+4CnlJ7 CzyAQEGqeqmb6VQjomxCbL0+2LYzo4SxgAMDMV57h75sr1itZmi/oKD0I 2WEqdVpPcWLYNVecFrzPbbDjGk6J8wq3F+HxQJjGH5lI3Z377NonfEsbh w==; X-CSE-ConnectionGUID: dGhnz31KTcCVcyWssgCrsw== X-CSE-MsgGUID: qbzVrMFTT1609Tgrzdu2vw== X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="23588418" X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="23588418" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2024 14:29:35 -0700 X-CSE-ConnectionGUID: WsUSqZhfRgKSV+PIpyIzQg== X-CSE-MsgGUID: 82p4Z4PdSTecbPZZgM781w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="102459367" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 03 Sep 2024 14:29:33 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8143A48D; Wed, 04 Sep 2024 00:29:32 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH v1 2/3] iio: proximity: sx_common: Unexport sx_common_get_raw_register_config() Date: Wed, 4 Sep 2024 00:28:21 +0300 Message-ID: <20240903212922.3731221-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240903212922.3731221-1-andriy.shevchenko@linux.intel.com> References: <20240903212922.3731221-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 sx_common_get_raw_register_config() is used in a single driver, move it there. Signed-off-by: Andy Shevchenko --- drivers/iio/proximity/sx9324.c | 20 ++++++++++++++++++++ drivers/iio/proximity/sx_common.c | 21 --------------------- drivers/iio/proximity/sx_common.h | 3 --- 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/drivers/iio/proximity/sx9324.c b/drivers/iio/proximity/sx9324.c index 629f83c37d59..40747d7f6e7e 100644 --- a/drivers/iio/proximity/sx9324.c +++ b/drivers/iio/proximity/sx9324.c @@ -868,6 +868,26 @@ static u8 sx9324_parse_phase_prop(struct device *dev, return raw; } +static void sx_common_get_raw_register_config(struct device *dev, + struct sx_common_reg_default *reg_def) +{ +#ifdef CONFIG_ACPI + struct acpi_device *adev = ACPI_COMPANION(dev); + u32 raw = 0, ret; + char prop[80]; + + if (!reg_def->property || !adev) + return; + + snprintf(prop, ARRAY_SIZE(prop), "%s,reg_%s", acpi_device_hid(adev), reg_def->property); + ret = device_property_read_u32(dev, prop, &raw); + if (ret) + return; + + reg_def->def = raw; +#endif +} + static const struct sx_common_reg_default * sx9324_get_default_reg(struct device *dev, int idx, struct sx_common_reg_default *reg_def) diff --git a/drivers/iio/proximity/sx_common.c b/drivers/iio/proximity/sx_common.c index 71aa6dced7d3..bcf502e02342 100644 --- a/drivers/iio/proximity/sx_common.c +++ b/drivers/iio/proximity/sx_common.c @@ -421,27 +421,6 @@ static const struct iio_buffer_setup_ops sx_common_buffer_setup_ops = { .postdisable = sx_common_buffer_postdisable, }; -void sx_common_get_raw_register_config(struct device *dev, - struct sx_common_reg_default *reg_def) -{ -#ifdef CONFIG_ACPI - struct acpi_device *adev = ACPI_COMPANION(dev); - u32 raw = 0, ret; - char prop[80]; - - if (!reg_def->property || !adev) - return; - - snprintf(prop, ARRAY_SIZE(prop), "%s,reg_%s", acpi_device_hid(adev), reg_def->property); - ret = device_property_read_u32(dev, prop, &raw); - if (ret) - return; - - reg_def->def = raw; -#endif -} -EXPORT_SYMBOL_NS_GPL(sx_common_get_raw_register_config, SEMTECH_PROX); - #define SX_COMMON_SOFT_RESET 0xde static int sx_common_init_device(struct device *dev, struct iio_dev *indio_dev) diff --git a/drivers/iio/proximity/sx_common.h b/drivers/iio/proximity/sx_common.h index 101b90e52ff2..175505eaae7b 100644 --- a/drivers/iio/proximity/sx_common.h +++ b/drivers/iio/proximity/sx_common.h @@ -150,9 +150,6 @@ int sx_common_probe(struct i2c_client *client, const struct sx_common_chip_info *chip_info, const struct regmap_config *regmap_config); -void sx_common_get_raw_register_config(struct device *dev, - struct sx_common_reg_default *reg_def); - /* 3 is the number of events defined by a single phase. */ extern const struct iio_event_spec sx_common_events[3]; From patchwork Tue Sep 3 21:28:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13789322 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 42339197A67; Tue, 3 Sep 2024 21:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725398977; cv=none; b=Cm7jghVgrzO3YScidOewR57Lc0wH5jBJdS2QU/fb19gQeVmy4i9a9Nkln9o3DQXTJbETRDtGVg2rgvDMs6Bepn2jBJT/SV7dVQBtVmEsROUp0ZSTp9jfZelmcfXNDuHoEnByQgllaMBhfQT6nJ5g7sH3+NvEWNP4Vxy91ChgSp8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725398977; c=relaxed/simple; bh=ajPdL3zT44Mb1wkT/fu2AjjJ6krZ4DWIeQlZ9MsHEkQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VaGtXmB8nXdEFPr3Mz1dEbXot+Tke7j1ov+ck1UXJ6m6ZrGXi0BsFudIN/OtzdEluqZ/NsFzatccd2d2FyMK/8y008QrxHI/SuItmFFdyqsfrUPCaqeqRxXYux2UaM6wKtOLYAaVfZ78eXB3vgCWHW0JKtD2mjptGYgnyv0U5do= 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=h3bTyG1q; arc=none smtp.client-ip=198.175.65.9 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="h3bTyG1q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725398977; x=1756934977; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ajPdL3zT44Mb1wkT/fu2AjjJ6krZ4DWIeQlZ9MsHEkQ=; b=h3bTyG1qPHEFn5ztzwOyvJiZbrwxyWjkPywEqnniH/k6Y4UuxfGTHxh/ LxoCEVgD37ceNlAxTKV7FcXEA0iArcgZ9LkG0sWr0CTl5ctwBn/N9yzo9 rh73cIWLe187VveWAr+NgMspqMB55EK0rF6bHSLQsigrEWy6oMOmmPU4z 4ZIxqtqGTWENmiHDNz0MU52LsbKSf8V9WtPtoEgvXn1y8Gdea+Eu/HRWW 8PXhWofJhdxqzW8tOtziTDlMBpiJZA9oEAY8rXcZMf9AXg3RYVq7auu96 jZUk34+taMGmcpSrWnhgo5cgzOirGO2cUNDj1bXc+mh/RMatlJEK5nUeJ w==; X-CSE-ConnectionGUID: 7LeeOghHTSy/YXOdAJGQug== X-CSE-MsgGUID: VW05yyJCRXiHsqzy+NjwCQ== X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="46554428" X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="46554428" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2024 14:29:37 -0700 X-CSE-ConnectionGUID: zq/GWJZSTFyIkkvkDuUv8g== X-CSE-MsgGUID: 1VM+E7nQSp6WCVpvKV6FWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="95781600" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa002.jf.intel.com with ESMTP; 03 Sep 2024 14:29:35 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5D6B9AF3; Wed, 04 Sep 2024 00:29:33 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH v1 3/3] iio: proximity: sx_common: Drop unused acpi.h Date: Wed, 4 Sep 2024 00:28:22 +0300 Message-ID: <20240903212922.3731221-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240903212922.3731221-1-andriy.shevchenko@linux.intel.com> References: <20240903212922.3731221-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are drivers that do not need acpi.h, drop unused inclusion. Signed-off-by: Andy Shevchenko --- drivers/iio/proximity/sx9360.c | 1 - drivers/iio/proximity/sx_common.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/iio/proximity/sx9360.c b/drivers/iio/proximity/sx9360.c index 2b90bf45a201..07551e0decbd 100644 --- a/drivers/iio/proximity/sx9360.c +++ b/drivers/iio/proximity/sx9360.c @@ -7,7 +7,6 @@ * https://edit.wpgdadawant.com/uploads/news_file/program/2019/30184/tech_files/program_30184_suggest_other_file.pdf */ -#include #include #include #include diff --git a/drivers/iio/proximity/sx_common.h b/drivers/iio/proximity/sx_common.h index 175505eaae7b..da53268201a9 100644 --- a/drivers/iio/proximity/sx_common.h +++ b/drivers/iio/proximity/sx_common.h @@ -8,7 +8,6 @@ #ifndef IIO_SX_COMMON_H #define IIO_SX_COMMON_H -#include #include #include #include