From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8BCFC433B4 for ; Mon, 10 May 2021 05:25:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CB6161432 for ; Mon, 10 May 2021 05:25:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbhEJF1A (ORCPT ); Mon, 10 May 2021 01:27:00 -0400 Received: from first.geanix.com ([116.203.34.67]:50496 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbhEJF1A (ORCPT ); Mon, 10 May 2021 01:27:00 -0400 Received: from [192.168.100.10] (unknown [185.233.254.173]) by first.geanix.com (Postfix) with ESMTPSA id 5A1B4466CBC; Mon, 10 May 2021 05:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1620624354; bh=9zEQACqcJ257x5CVo/4KL+IiFiOAUTmjj174QiiWF1s=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=W1Bgumat5t+THj1f4MdgfhTiqNRJ/oZDoDt0n9oNP/PllV7U9BLLxN/rBOn+mXkx4 L5mjVBX5ytUNc73IJhIaKVXUTRCpCFEmbZoGLYBBposbClEVyqDiCY4VEXX7LfoLWo yNgh17txm7vsm9z9KayDTvqiyDp10DL8yeD6y6dMgimT0HP1jkqV91DNiB3oekePbD erIKLJeAI97fS32h5kI7b+fxixmHHuObLwA7lfDQV17XM5iikBdEkJqrmBDsMUPdnd nE1TuA6U5LikDcBSuh0bsai+2Uo8tWVD3QgFm+5lNfWojso/l6C19Th/PUG0XkBWyn N756ylhCYbkAQ== Subject: Re: [PATCH] iio: imu: st_lsm6dsx: do not roundup set samplerate To: Lorenzo Bianconi Cc: lorenzo.bianconi83@gmail.com, jic23@kernel.org, linux-iio@vger.kernel.org References: <20210507103220.2194009-1-sean@geanix.com> From: Sean Nyekjaer Message-ID: Date: Mon, 10 May 2021 07:25:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On 07/05/2021 13.02, Lorenzo Bianconi wrote: >> The correct way to set the sampling rate to 12.5 Hz before >> commit f8710f0357bc ("iio: imu: st_lsm6dsx: express odr in mHZ") >> was to write 13 Hz to sampling_frequency. >> Before this patch writing 13 to samplerate results in sample rate set >> to 26 Hz. >> Now we return EINVAL if the sampling rate is not in table. >> >> Signed-off-by: Sean Nyekjaer > > I think this patch is breaking i2c-master support available in st_lsm6dsx, have you tested it? > I have not tested with i2c-master. But it's not nice to round up sample rate from user space without any notice. /Sean