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 144DC12D1E9; Tue, 14 May 2024 11:37:22 +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=1715686642; cv=none; b=rI4q9Qil3pC1fqk6SSi4SKY8UGnXvxVzd7Rx3kkxNdYqvKLgV6uRjQPp5onoc96OPz7Rzn8yYiTIQ4M/d7O+FND+nspdwXxTegjLlj8fp4wpJGa74rjI4RyVWChMtAr4s9eONkzy6QnkaIUcYxDurClXeTJl9Kzt4ebzNDXPo2Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715686642; c=relaxed/simple; bh=YFc3bLApVy4b9FWvtMQV9c+O6ANiWvAP0Hq7LUuNDUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s7by+oeA04+FgBFCftjOc2w7hqiKUbL2k3a/omfG/x10Ux6UDU8Ywufuaw22HaRpI3yn7FDNkhqWkLbiY97FkXmpxBr53v5BBvElLiK/Hex9aQP14mrfsVFd6u1/oeRLBplHwa/8M4Wfb9sECxKtXrFnO6KLgMZeP4+mSBImqis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=w+vx3AQ7; 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="w+vx3AQ7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 904FFC2BD10; Tue, 14 May 2024 11:37:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715686641; bh=YFc3bLApVy4b9FWvtMQV9c+O6ANiWvAP0Hq7LUuNDUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w+vx3AQ7jXOH4AqnuhbPa0yTfj5fKvxhMZQQTDAmh6Y4mx+cm09wBapkCovRZ0A1d lxqX2wlNDxJJpTfzx+n/HJAqv4RFAAp2Q85viGWkziGV96zWMUUKl1PjrKM07IymJ4 lDnko+hpKz47Qmk2s9honkhrXMO6l17U7GnIq36g= 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.1 208/236] iio:imu: adis16475: Fix sync mode setting Date: Tue, 14 May 2024 12:19:30 +0200 Message-ID: <20240514101028.258467412@linuxfoundation.org> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240514101020.320785513@linuxfoundation.org> References: <20240514101020.320785513@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.1-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 @@ -1126,6 +1126,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; @@ -1187,8 +1188,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;