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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 F3EB8C433E0 for ; Fri, 29 May 2020 13:33:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8CC7208B8 for ; Fri, 29 May 2020 13:33:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726638AbgE2Nd4 (ORCPT ); Fri, 29 May 2020 09:33:56 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:46728 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726549AbgE2Nd4 (ORCPT ); Fri, 29 May 2020 09:33:56 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id C71731C0388; Fri, 29 May 2020 15:33:54 +0200 (CEST) Date: Fri, 29 May 2020 15:33:46 +0200 From: Pavel Machek To: Jonathan Albrieux Cc: linux-kernel@vger.kernel.org, Andy Shevchenko , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Greg Kroah-Hartman , Hartmut Knaack , Jonathan Cameron , Lars-Peter Clausen , Linus Walleij , "open list:IIO SUBSYSTEM AND DRIVERS" , Peter Meerwald-Stadler , Steve Winslow , Thomas Gleixner , Jonathan Cameron Subject: Re: [PATCH 3/3] iio: magnetometer: ak8975: Add gpio reset support Message-ID: <20200529133346.GC1339@bug> References: <20200518133645.19127-1-jonathan.albrieux@gmail.com> <20200518133645.19127-4-jonathan.albrieux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200518133645.19127-4-jonathan.albrieux@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Hi! > AK09911 has a reset gpio to handle register's reset. If reset gpio is > set to low it will trigger the reset. AK09911 datasheed says that if not > used reset pin should be connected to VID and this patch emulates this > situation > > Signed-off-by: Jonathan Albrieux > --- > drivers/iio/magnetometer/ak8975.c | 21 +++++++++++++++++++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > > /* > - * According to the datasheet the power supply rise time i 200us > + * According to the datasheet the power supply rise time is 200us > * and the minimum wait time before mode setting is 100us, in > - * total 300 us. Add some margin and say minimum 500us here. > + * total 300us. Add some margin and say minimum 500us here. > */ > usleep_range(500, 1000); I'd assume that datasheet added some safety margin too, and there's another one in usleep... So I believe usleep..(300) should be okay.. Best regards, Pavel