From patchwork Thu May 4 07:56:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 8905 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp132025vqo; Thu, 4 May 2023 01:02:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57TtVWLyMkuMcQmIGQ/0vRebTF7zcYIuZDpGt+PCJUvtdbtCKTWwcgMf7Awyzh4DCadWgk X-Received: by 2002:a17:90a:d782:b0:246:5fbb:43bf with SMTP id z2-20020a17090ad78200b002465fbb43bfmr1401768pju.4.1683187324319; Thu, 04 May 2023 01:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683187324; cv=none; d=google.com; s=arc-20160816; b=to8l/3l6EkJRA4z7ulk93S2rPef5+puviF44662vUoZSde3ZqFyc1l473yg5sVLHl3 Z7HjKUVOjaM0KWr8+6n7OCdLu8hMHRq7qY7EwPL5kokL1Tf0aeSw6atfbiXUpS9PB2QK XvRDqkAKRyfiRtNHgoG8QFz7Y/G/2/uTAD7FVIyGRK4wyxYZibhN047M2AKuCE7XMp50 5WXTpDNjbF7iKmajv16HXAqo2liZD/6EJQqykFZKjRfXAdw8bnG5o8vwzQDADSHMaZD6 0gCUOuNu5DfyWfiBdzTiHTlibvQQ/cYQxeLrM31vL+pAyBqZ/KvTrmLFQMft519dnl+B SihQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=k7bTcKGL069SV5chj2exx/6OgP9rXCsK1lkREqDUd94=; b=h1Fpc1XH05qsr+JIm55UQjtowXG8+BRndr8BXQ5qkR2Au2QH6ks4Oe/LVARtS+4CnL StG0aRUHhs0EGbK4PDuSGrV4reoISi7DjySESpFTpzSrIm0tGq7dE/DrHJqrae7qr3lH uSY+Scb3kdoPHLMQbIModX5KmsgD5JDWwRFiTBOgBATeRNRLk8TlFaD/TiC/94QBjyIZ tS5rpAGo9TBWczprrH2F3gYkdmGzxQVVhI0HxBANFrHvkJ+EPo6Uv/3MFl9+MEgPqQbP LTZMTOF/jBoMmUDEFgvYd463lL9Zs87rZ78PqrnU7wh8OwQyQAhxJI4QIfZLtwD6EF+q xf6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=W9Dmtdln; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s61-20020a17090a2f4300b002473c8f52fcsi3352880pjd.91.2023.05.04.01.01.49; Thu, 04 May 2023 01:02:04 -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=@gmail.com header.s=20221208 header.b=W9Dmtdln; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbjEDH4k (ORCPT + 99 others); Thu, 4 May 2023 03:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjEDH4j (ORCPT ); Thu, 4 May 2023 03:56:39 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 550872728; Thu, 4 May 2023 00:56:38 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2ac7de2b72fso2053921fa.1; Thu, 04 May 2023 00:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683186996; x=1685778996; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=k7bTcKGL069SV5chj2exx/6OgP9rXCsK1lkREqDUd94=; b=W9Dmtdln7kVxUeZK0oWOLX0IRwjjID+s6UUVYH4DcuJ7V3FprETbIzGmy3KYv7a3zc cq7CxHPgrQLY/q/4wogcoU1kCkmGGiodnMMMUq9QRr6qcX1CI8Z+t3O8sa8ikMvxps7U MYUBiWZReuoLZwbEOkQ7hu5QSl2wCzHLrhSBOZvusjKm9ucLTv0mf0D4Hpp4QfS4xf3q M90Sl1pzxl4Pb7GGQM2YLjpjBXrPkO2WcY0vFC8Sc5klyWHRRr1j7z/iJEdaAK+50+Zf RenOGaglvXTQQggRUSfl2K6lyxhBaV9HLinZ/9KaR8jyJIFyFJndy7yJfXZWq80qgh6G yfqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683186996; x=1685778996; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k7bTcKGL069SV5chj2exx/6OgP9rXCsK1lkREqDUd94=; b=HOf3mp0adhOy+yTlv2+SV8nPfzWi8XvbqUaL2YMwvPqJx4IxMKcSSw4/BkbmKZVVjF MYMB7s6bC3IQUifv3TiB8gIVosvL3HzmkwzxdzA7Q6NRpx5D5MNK2M8U76Aq+fNGs37Q 6YMoeeAE5ZTp1Gpudi8EU3qUQHf8/Lxfg0VBzCHt96nEtex1UyFs+652KMNqyahDDH6C BuYzPXV1WGmoYnRngvkACiXgHpJItIYvqvMycFhshzq4FvBO2qZu7edphUbAOjEnR859 X/a/gE0C0sUXg82rNXD2uInww3OLxMOOzHwrAACzDqKOlayYtGpw+4VZ6is//kQrkvc4 c0mQ== X-Gm-Message-State: AC+VfDw+HkYVgn+3kSekWb5cs5GiXFSBu9D9jWjEdi3PKt0fpmbZm1lK E2RuyoMGjpY6lS250KZKPXqjpXFKBM8= X-Received: by 2002:ac2:43b3:0:b0:4ee:d799:eca with SMTP id t19-20020ac243b3000000b004eed7990ecamr1479225lfl.40.1683186996275; Thu, 04 May 2023 00:56:36 -0700 (PDT) Received: from fedora (62-78-225-252.bb.dnainternet.fi. [62.78.225.252]) by smtp.gmail.com with ESMTPSA id a9-20020a056512020900b004f06aa3d856sm2552895lfo.3.2023.05.04.00.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 00:56:35 -0700 (PDT) Date: Thu, 4 May 2023 10:56:13 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Matti Vaittinen , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/3] ROHM Sensor async probing Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764949831508877177?= X-GMAIL-MSGID: =?utf-8?q?1764949831508877177?= 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. --- 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(+)