Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp846580lfv; Tue, 12 Apr 2022 06:56:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyetGpB84zLn53ks79IIQrbzmX5Sv4DhVGDJD6GDIeZfsvJr/+vYwqJmGVi/fV7XyyA5jNW X-Received: by 2002:aa7:8256:0:b0:4e0:78ad:eb81 with SMTP id e22-20020aa78256000000b004e078adeb81mr38187547pfn.30.1649771801332; Tue, 12 Apr 2022 06:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649771801; cv=none; d=google.com; s=arc-20160816; b=WUFfr4tDM7lPmXvbXZ766iVQZlv4xhfhzLW/unc7ORWk4FGtfMbDjASruEZFsEu4u8 bJC/3B9U3x1enkgIFJmL82ooX/KXU3E5iGhVx4mklZikxJNIYLAlsHLiecgLzALT0W0M Buwujn9Vv21lJ0rMA3F5LxjP7IbhSrFNtUswPnrWZNhgHxMSnUo5cUSUxtLwlennYdp1 RzZmi/JF4DA/3r5Fo+gAwq5q/w1V3wEA6wST1nY649f9f3gxqRa7dj0UyLjQaL8KnRID bVh8soKYWBDpbvuiy18/HjO9UIi7U23pSMaBZA24oxHupvMp38rODKNIpgymTKOCDHQY AV8g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=m7ImfCfxJIsEMM5gANs7JbpEv6ku2oKMej68m8jLN2A=; b=NwmyELo7o1R7I0cb7GlisSAdRYoKENwoPmHypN5Du6fKegK6JmDx2URp8mDxrBNp18 RVkhUda+Rixy+XuwotLsucm4l+9k+2AvPdm3pHhghD89gBGyQU8OFxqFXtEhT5kBcAiF MB5i+mbY4U9NZN1q6GQnwK0ce17YbiBo1x9VaLhmgziJrsdj5DV0GB18cJghWqY56hiu 7ozxHDLJ+kQiuOuI7kSxIjQWEcbapZaA/AXWYAVPumw4N4RZz/MS569OQOxQ9ABW2RJC q57BR4NnW1Pr2d+G7Hs6u7oxOyyh8DqfWjRDmYov6N4p3HeQB7//7ALii4x8QkIlJe/h 1xKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=WkwK7RDK; 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=axis.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d19-20020aa78e53000000b004fe0ecc07acsi10873284pfr.106.2022.04.12.06.56.26; Tue, 12 Apr 2022 06:56:41 -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 (test mode) header.i=@axis.com header.s=axis-central1 header.b=WkwK7RDK; 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=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377463AbiDLJtl (ORCPT + 99 others); Tue, 12 Apr 2022 05:49:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351665AbiDLJmd (ORCPT ); Tue, 12 Apr 2022 05:42:33 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AD6552B17; Tue, 12 Apr 2022 01:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1649753455; x=1681289455; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=m7ImfCfxJIsEMM5gANs7JbpEv6ku2oKMej68m8jLN2A=; b=WkwK7RDKsReVLoTLNkeBcj3WXipVJKxJfbYw7cFEWYTbVSxCo3a5Yyhz 4d1H30sJdFmVUm9U5YdJ/3YLo/D//nq4DHCYQQsEjNnRREeSmuePDi1EE uaPzDSAbDX54DFbGwfwcwqqdbLIUqE2nIrVxhOJdh7OE4NirAqoja41Pp lYxETcMe7PIj7qWLE7azvE6J3cnexNUD6NzW7E0a15lihjWbt+QJxYpnL yCMeQpB6Mp1nfKUCkeTjU3NhAJlEMSCltGDcn9Co0Zz6YGUBF3yl56f29 GOwbwRPCayLl4OcfSjLBGRgd7x/1dFpnLUnR9A7lM4cFjKv4lj3YWVAJP A==; From: Vincent Whitchurch To: CC: , Vincent Whitchurch , , , , , Subject: [PATCH v2 0/2] i2c: Allow disabling auto detection via devicetree Date: Tue, 12 Apr 2022 10:50:44 +0200 Message-ID: <20220412085046.1110127-1-vincent.whitchurch@axis.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, 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 v2: - Change subject prefix of bindings patch - Reword description of property in bindings patch When a driver with a ->detect callback (such as lm75) is loaded, the i2c core performs I2C transactions on the bus to all the addresses listed in that driver's address_list. This kind of probing wastes time and as Documentation/i2c/instantiating-devices.rst says, this method is not recommended and it is instead advised to list all devices in the devicetree. However, even if all the devices are listed in the devicetree, there is currently no way to prevent the core from attempting auto detection short of patching controller drivers to not pass the I2C_CLASS* bits in adap->class. The latter is not always possible since generic drivers like i2c-gpio set these bits. To avoid this unnecessary probing and reduce boot time, this series adds a property to the devicetree and support in the I2C core to allow this feature to be disabled. Cc: linux-i2c@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: krzk+dt@kernel.org Cc: robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org Vincent Whitchurch (2): dt-bindings: i2c: add property to avoid device detection i2c: core: support no-detect property Documentation/devicetree/bindings/i2c/i2c.txt | 4 ++++ drivers/i2c/i2c-core-base.c | 8 +++++++- include/linux/i2c.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) -- 2.34.1