Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2438075rwr; Sat, 6 May 2023 10:55:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72KM9nH4heg/QMGnOBMpnmjk8pGkromwCVtwsdkVShnhj/Ib+2BxJ8XhK7t1/+JKmBF8Op X-Received: by 2002:a17:902:c951:b0:1ab:893:ba28 with SMTP id i17-20020a170902c95100b001ab0893ba28mr6671064pla.45.1683395702622; Sat, 06 May 2023 10:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683395702; cv=none; d=google.com; s=arc-20160816; b=f5tVizNmHUqdodI4ZvsRe/MOCVJqnJRcAqL8btGqcbddM4Jddbv7nBI6inxD3KeTae 869oANteKXfQapbAUuKsiPgPy72eRePHHyfblCFK/BYgM/IF2DHBpckUsaL775VLgx7A NUAWEAeT6qu+Ew4pCS/+3QKEZCU54Jcw8SQ4x7K3gbM/OtCjsAz/YkMzgVuM8TbCZPK+ aU0szs0GMsHGXiMyqxeok+aJaoSANYIew6TvYSYeeyiGR97tHMkVmNP06K705AhP5Nw8 7uOeQ8huLEYUz3KQso4fL6tJDo1aBcYMZZzx1S7jAd6deL7m+0wHZcrNtWx9AS0l4iT4 3J7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=15QfSNec7qsFAiat5XSXFilsfD4+ZhjB98+zi1vJ10o=; b=k1InI031aptoG4eh2fjqbwJpt8Ywlk0CDzw02HhWu/tFZ/uJkGH4cfu42coAKjQiEb ecjvJAKGxdtX4xJBtO1NPZ5+XbpiuLq5AgW0S9gTd7ZLe7yQRW31toUXT79jfjdBd3uD MYLMgnK++NB0WKQt53B6qEW0QfhAwf5BPFCJTzYmc61+nTKdSuIhLoeGdf3aITI8rzHq fiKqKCwhE/8Olzba+n+2T69ekvIGZFwt02BFCmNXdgM4qo4APaPWseQT35DCE0IEipPT cheaoeNwafX56Mvmk4lt/9lkWvO9ylo7sdHg2PqT/QjYg6uftMcGP/5wp3yDJxhn4j+w cfXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e4GRKIBv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x14-20020a63b20e000000b005131739af72si4572629pge.755.2023.05.06.10.54.48; Sat, 06 May 2023 10:55:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e4GRKIBv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbjEFRbh (ORCPT + 99 others); Sat, 6 May 2023 13:31:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjEFRbf (ORCPT ); Sat, 6 May 2023 13:31:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E02911608D; Sat, 6 May 2023 10:31:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7CE6560677; Sat, 6 May 2023 17:31:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDADFC4339B; Sat, 6 May 2023 17:31:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683394293; bh=amJno4QQ+jgFZXOzLKev1VatVyFZZh6AJVwPxwidzCQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e4GRKIBv7AReNH3O3yt+BylmGeICX1l0+Vm/AIQ0FwIeH20fBKOq9BlBcARXl7TtX K0/yajora7/QBt14gcsWvJO80xgvhORu/jY9zWAZzUhQT+B9vZNTXlt2pssGuijG6k G+LmIRSkQEfhzysmUCdcC9bFMxrDd9cXXa0VWSxdJPYJvioNfb7Aw+6IBUdrEK9BBH F2lxjVFd3TQg7aRBdF4bNoxWOff3sW+ZoWviZjINTfpx3zvwR9iGcMqiuHkhrjc/C8 ZejZKtRapaNBjoRlkjsNcDA5NUzruJ+mpW2IK1F3MKBCnenw++MuaphUYa1t4alELl oDkJskRI77u8g== Date: Sat, 6 May 2023 18:47:27 +0100 From: Jonathan Cameron To: Matti Vaittinen Cc: Matti Vaittinen , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/3] ROHM Sensor async probing Message-ID: <20230506184727.344086c5@jic23-huawei> In-Reply-To: References: X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 May 2023 10:56:13 +0300 Matti Vaittinen wrote: > Devices which may take a while to initialize during probe and which have > no strong reason to probe synchronously can request asynchronous probing > as default probe strategy. This can speed-up start times on some > platforms. > > There is however some caveats listed for asynchronous probing for > example here: > https://lore.kernel.org/all/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk/ > > I don't know how tolerant IIO users are what comes to asynchronous > probing but I _guess_ this is (and should be) handled pretty well. > Still, guessing could be said to be somewhat sub-optimal when doing > kernel development :) Hence this RFC - if someone has better > understanding on async probing when using IIO, please let me know! > > As far as I know these drivers do not currently have in-tree users. > Furthemore, they are so new they don't probably have many user-space > users either. In fact, the BU27034 is not yet in any official releases > and BU27008 is not merged in any official trees yet. Thus, testing out > async probing with them should not break existing users. KX022A is also > relatively new and I don't think it has yet been widely used either. > > Finally, if asynchronous probing does break things, then: > a) We should try fix the thing preventing async probe. > b) We can pretty easily revert back to synchronous probing. > > Please note that the patch 2 depends on > https://lore.kernel.org/lkml/cover.1683105758.git.mazziesaccount@gmail.com/ > which is not yet in-tree. If the feed-back from this RFC is positive, > then I will squash this change to that series when re-spinning it next > time. > > Please note that the patch 3 depends on bu27034 series which is expected > to land on 6.4-rc1. Generally it should be fine, but given that weird things sometimes happen we don't apply a blanket policy and it's up to individual driver maintainers to give it a go. Also it's only worth doing if a driver is significantly slow for some reason.. I've hit problems with async probe before (usually showing up bugs that weren't visible before), but not in IIO drivers. So I've applied patches 1 and 3. Plenty of time for people to shout if they can see a problem though. Jonathan > > --- > > Matti Vaittinen (3): > iio: bu27034: Probe asynchronously > iio: bu27008: Probe asynchronously > iio: kx022a: Probe asynchronously > > drivers/iio/accel/kionix-kx022a-i2c.c | 1 + > drivers/iio/accel/kionix-kx022a-spi.c | 1 + > drivers/iio/light/rohm-bu27008.c | 1 + > drivers/iio/light/rohm-bu27034.c | 1 + > 4 files changed, 4 insertions(+) >