From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2D57C3176E4; Wed, 8 Apr 2026 18:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775674765; cv=none; b=tWw/uZWNTlheS+QkU2eRIvkVJHjwy/zdtO7t6n5a+yfDp56NJCQlyTakK7NQhov4FqbmkBe+c+w2uH+ViqXGi3et8IgEiF5zo/9wYmMvdDMh64TMeIOxwkU4SUa2X2wgS+BgOps+mBe1UQPNzMy43waLCk/pB7QlqT+AhLPr0xM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775674765; c=relaxed/simple; bh=aj/DozRDyJFM5gQs+/5JwqhQqMRv03Qn/1kU2PO47y4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QCQ6vYkUOn77rbhz09ZtVrivDexTd3XTXl2AJwN0B7LLSz3zn2R8DXXIXioJ1AI5qZ9TgzQIa+dD28H3ZILv5AVWws9DgcMSKNJbekjDcxg/+bOPZWKSwSp8LyB4yYzARkb+LGSURSKOkgiDXAm9/gbFXJ9ZI5wL68UytxErxys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CAuzzZ/Z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CAuzzZ/Z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B803CC19421; Wed, 8 Apr 2026 18:59:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775674765; bh=aj/DozRDyJFM5gQs+/5JwqhQqMRv03Qn/1kU2PO47y4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CAuzzZ/ZbLXy0m3HYtBexWZGmPwjTapwO/Ya86uqV/AlClcwz5yZL7zrUxEzEYMZ3 pN76vAj8BhY7UUvvgRSQX8/jIOphVYSOT+kpP17q3JJ5OOsiCg4PMS2S0WLaGcqjJ0 IXsBRx0oZsbmxz7XqWcqwgqA80PY/OW/F0phaKDQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Antoniu Miclaus , Robert Budai , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 6.19 225/311] iio: imu: adis16550: fix swapped gyro/accel filter functions Date: Wed, 8 Apr 2026 20:03:45 +0200 Message-ID: <20260408175947.801899524@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408175939.393281918@linuxfoundation.org> References: <20260408175939.393281918@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Antoniu Miclaus commit ea7e2e43d768102e2601dbbda42041c78d7a99f9 upstream. The low-pass filter handlers for IIO_ANGL_VEL and IIO_ACCEL call each other's filter functions in both read_raw and write_raw. Swap them so each channel type uses its correct filter accessor. Fixes: bac4368fab62 ("iio: imu: adis16550: add adis16550 support") Signed-off-by: Antoniu Miclaus Acked-by: Robert Budai Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/imu/adis16550.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/iio/imu/adis16550.c +++ b/drivers/iio/imu/adis16550.c @@ -643,12 +643,12 @@ static int adis16550_read_raw(struct iio case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY: switch (chan->type) { case IIO_ANGL_VEL: - ret = adis16550_get_accl_filter_freq(st, val); + ret = adis16550_get_gyro_filter_freq(st, val); if (ret) return ret; return IIO_VAL_INT; case IIO_ACCEL: - ret = adis16550_get_gyro_filter_freq(st, val); + ret = adis16550_get_accl_filter_freq(st, val); if (ret) return ret; return IIO_VAL_INT; @@ -681,9 +681,9 @@ static int adis16550_write_raw(struct ii case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY: switch (chan->type) { case IIO_ANGL_VEL: - return adis16550_set_accl_filter_freq(st, val); - case IIO_ACCEL: return adis16550_set_gyro_filter_freq(st, val); + case IIO_ACCEL: + return adis16550_set_accl_filter_freq(st, val); default: return -EINVAL; }