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 4899A1E4B0; Tue, 14 May 2024 11:23:20 +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=1715685800; cv=none; b=nQoX1re/KwB7sYhkHXop93BLGjUfaKYxUc5RumRKdytfuhE4o+5h7MTdi2l/ZQFqlipJJS8O84IYqxXz6+9/RCI4BFToF1ROOXMd2JAaQ9rPMXJLRE4E4p4NpCnQURWickaHT6P8WTOs3znM4uVYnmwzx7WJNi9hxQpvlqF1uTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715685800; c=relaxed/simple; bh=oKOdWckBLNl+IGwj8lDgtLLlkH4YQeL+trcFHWC0vy8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=udmfFLAn3sGjmJq2Ux4C04H5cRwmCXrIhUNW0A7QRCMw3Euhl1nhPCdjdezCqj5vpyY7dypSMko00Ldj7tyAejshNt9fjJgMKRvtpWFOlmuiKbn6GvLiFHxC4Q96mcNBPNrsdUQ1U0nRYaryzx7uEYtlBgVz7KDQKHlJNaXev10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=D9lci6FU; 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="D9lci6FU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A53FAC2BD10; Tue, 14 May 2024 11:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715685800; bh=oKOdWckBLNl+IGwj8lDgtLLlkH4YQeL+trcFHWC0vy8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D9lci6FUZ6AKKTUZsepIm2cyk/7cbMQlNmPA5WkInnnxoOx0rszFPk5VIeTjixgbe IwkXCLPNyObUMvzisEaqIwNdloyIiynQr53Nn3NLfmxXhjpLqSw6z38qu0otUA49tD 8hye20nyO/XOKnR0dy2ppyk08l4CsfeXR0eLeia8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ramona Gradinariu , Nuno Sa , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 6.6 249/301] iio:imu: adis16475: Fix sync mode setting Date: Tue, 14 May 2024 12:18:40 +0200 Message-ID: <20240514101041.658607090@linuxfoundation.org> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240514101032.219857983@linuxfoundation.org> References: <20240514101032.219857983@linuxfoundation.org> User-Agent: quilt/0.67 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.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ramona Gradinariu commit 74a72baf204fd509bbe8b53eec35e39869d94341 upstream. Fix sync mode setting by applying the necessary shift bits. Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475") Signed-off-by: Ramona Gradinariu Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240405045309.816328-2-ramona.bolboaca13@gmail.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/imu/adis16475.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/iio/imu/adis16475.c +++ b/drivers/iio/imu/adis16475.c @@ -1127,6 +1127,7 @@ static int adis16475_config_sync_mode(st struct device *dev = &st->adis.spi->dev; const struct adis16475_sync *sync; u32 sync_mode; + u16 val; /* default to internal clk */ st->clk_freq = st->info->int_clk * 1000; @@ -1188,8 +1189,9 @@ static int adis16475_config_sync_mode(st * I'm keeping this for simplicity and avoiding extra variables * in chip_info. */ + val = ADIS16475_SYNC_MODE(sync->sync_mode); ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL, - ADIS16475_SYNC_MODE_MASK, sync->sync_mode); + ADIS16475_SYNC_MODE_MASK, val); if (ret) return ret;