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=-5.5 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=no 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 656C1C433E0 for ; Sun, 24 Jan 2021 13:24:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CBC122CB9 for ; Sun, 24 Jan 2021 13:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbhAXNYe (ORCPT ); Sun, 24 Jan 2021 08:24:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:43622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbhAXNYa (ORCPT ); Sun, 24 Jan 2021 08:24:30 -0500 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (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 0CEE722511; Sun, 24 Jan 2021 13:23:47 +0000 (UTC) Date: Sun, 24 Jan 2021 13:23:44 +0000 From: Jonathan Cameron To: Linus Walleij Cc: Mike Looijmans , linux-iio , Dan Robertson , =?UTF-8?B?R2HDq3RhbiBBbmRyw6k=?= , Jonathan Bakker , Lars-Peter Clausen , Peter Meerwald-Stadler , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 2/2] iio: accel: Add support for the Bosch-Sensortec BMI088 Message-ID: <20210124132344.7181bd06@archlinux> In-Reply-To: References: <20210119124622.9490-1-mike.looijmans@topic.nl> <20210119124622.9490-2-mike.looijmans@topic.nl> <20210123153511.1802a15a@archlinux> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 24 Jan 2021 00:21:13 +0100 Linus Walleij wrote: > On Sat, Jan 23, 2021 at 4:35 PM Jonathan Cameron wrote: > > [Me] > > > Next, I think it is better to let suspend/resume, i.e. system PM > > > reuse runtime PM since you're implementing that. This is why > > > we invented PM runtime force resume and force suspend. > > > > Here the driver is turning more off for full suspend than in the > > runtime path. If that results in significant extra delay then > > it's not appropriate to have that in the runtime suspend path. > > I see the point. > > The resume path calls bmi088_accel_enable() which incurs > a 5ms delay. > > The runtime resume path incurs a 1 ms delay. > > The runtime autosuspend kicks in after 2 ms. > > > Maybe the simplification of not doing the deeper power saving > > mode is worth the extra power cost or extra delay, but > > I'm not yet convinced. > > I would personally set the autosuspend to ~20ms and just use > one path and take a hit of 5 ms whenever we go down between > measures if it is a system that is for human interaction, but for > control systems this more complex set-up may be better for > response latencies. > > The current approach may be better tuned to perfection and > we are all perfectionists :D > > I'm just worrying a little about bugs and maintainability. Fully understood. Though for things like this I like to leave it at the discretion of the driver author as fairly safe they are a user of the device. May well make sense to go with the longer times as you suggest though! Over to you Mike :) Jonathan > > Yours, > Linus Walleij