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=-15.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 7AA0BC433E2 for ; Mon, 31 Aug 2020 10:26:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5897520936 for ; Mon, 31 Aug 2020 10:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598869565; bh=zfzkGqestFs9nQQhhaXsXXtCtxEXnknSCGnOjZBBgfk=; h=Subject:To:From:Date:List-ID:From; b=S+UTbW8lZ60mlUoVdD9cxNduC+ABP2h176GZpkCg+40LVR00PlZeMGfOrCbDAPbQ9 w7ArMSZYa8dtZEYl/KA/asc0am1Mgm32nIYqiig62PCZfF68GYEU3l11/xuLFpyWW2 k3eQ8qxZUf8qIU/MGaFPVawm0FlkqqC6a+2Rho/c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726253AbgHaK0E (ORCPT ); Mon, 31 Aug 2020 06:26:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:54186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbgHaK0E (ORCPT ); Mon, 31 Aug 2020 06:26:04 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1466F2072D; Mon, 31 Aug 2020 10:26:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598869563; bh=zfzkGqestFs9nQQhhaXsXXtCtxEXnknSCGnOjZBBgfk=; h=Subject:To:From:Date:From; b=H21fud3lRhzBXAUnTmNKhRQk40xfNw3h0UwL2BrvMocUaNPWmAYJyZl/b1mzesqlK y88r373+vgzflK3R0rBOHa7eh5mdxHN7E/D0JppzYIsOP2vVoAg9maU4qRF4ENrrwe qUeUKvIOhPiq68t3sw8xYLhzGW6RLo9l6RJUZLKg= Subject: patch "iio: cros_ec: Set Gyroscope default frequency to 25Hz" added to staging-linus To: gwendal@chromium.org, Jonathan.Cameron@huawei.com, Stable@vger.kernel.org, enric.balletbo@collabora.com From: Date: Mon, 31 Aug 2020 12:26:11 +0200 Message-ID: <159886957119230@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled iio: cros_ec: Set Gyroscope default frequency to 25Hz to my staging git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git in the staging-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 336306790b2bbf7ce837625fa3b24ba724d05838 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Tue, 28 Jul 2020 13:48:25 -0700 Subject: iio: cros_ec: Set Gyroscope default frequency to 25Hz BMI160 Minimium gyroscope frequency in normal mode is 25Hz. When older EC firmware do not report their sensors frequencies, use 25Hz as the minimum for gyroscope to be sure it works on BMI160. Fixes: ae7b02ad2f32d ("iio: common: cros_ec_sensors: Expose cros_ec_sensors frequency range via iio sysfs") Signed-off-by: Gwendal Grignou Reviewed-by: Enric Balletbo i Serra Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c index ea480c1d4349..1bc6efa47316 100644 --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c @@ -72,10 +72,13 @@ static void get_default_min_max_freq(enum motionsensor_type type, switch (type) { case MOTIONSENSE_TYPE_ACCEL: - case MOTIONSENSE_TYPE_GYRO: *min_freq = 12500; *max_freq = 100000; break; + case MOTIONSENSE_TYPE_GYRO: + *min_freq = 25000; + *max_freq = 100000; + break; case MOTIONSENSE_TYPE_MAG: *min_freq = 5000; *max_freq = 25000; -- 2.28.0