From patchwork Mon Jun 19 15:37:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 10991 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3109659vqr; Mon, 19 Jun 2023 09:13:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6S5G04LDyaJCTjyELs7fSfRLaUMhNVKFd3gidtIzcQeehrl0nYupsHgrOeA4QLXq1ZlHe+ X-Received: by 2002:a05:6a00:3926:b0:664:9579:d31c with SMTP id fh38-20020a056a00392600b006649579d31cmr13703541pfb.8.1687191213843; Mon, 19 Jun 2023 09:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687191213; cv=none; d=google.com; s=arc-20160816; b=nZJ+2UVFFQwxC3FHUiKXW5VgjRmqv4L5QWvoX/+nBTt2O++ZsoN/0nocYuHfcxXK1+ /RosUYva3aMWzd7bguSwUkcigWip/7Xv5wtFVyDYVnlIn4LBCyd1BZI8cl4stJEzRNB4 eM/mdHmzIVSDOy1sNLsxna7VstJc19cTWYp9SXDVyUlNtRby4bZm6RYxls0Xfu5cP4MI NSOEss2vMyQ+RA+d0ZAZCkKq9FHzX3JFCJ6/dT7y81j7F9/8i52bBVrJF1AiQpPI7t1Q yMlq6FTjc3QDKnNdDHEPnLdayNCwtUXfd9/YgLunu6ph14z4yont1ENBJHr4a1sxJlmy zaug== 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=LfbivNkUyRqUuO2dy5Pvjng0AOI0erWsssVVox7EkxU=; b=WMQ1Ptr+4KqPFV2rR8GPGZczVbigdVX68O3Ymq5YaGV02fTUOGqKoy3Ctg0MZMrHvW d7OTmljDqcBG9HF3DhCRKQMBWa7Ixw3cfO3OUTph+w1QjwvZ3wR3mfTsqyumlOnzFWi3 zLhsoRBTxWxUMay8K4DBqDAeKvI8shqy5xN13JHSevgtaSS74mXuIWqEqL7fR2a2+tjL RsO5zsdZzJLf3XLxaZZz9Gs5ex5tLILI5piXpxX5m1yzhihsd1TukEQ/rwcOWYBB+Cep WNBSdMNNDrXW1mMvcI2AdDiCOm+FtW71uvtyZ/uCoLwgU4JDq9WV3U+QocEdQjQ5ML9x tu2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=U7IA9um4; 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 y193-20020a6264ca000000b00666e9830c1csi6290187pfb.381.2023.06.19.09.13.18; Mon, 19 Jun 2023 09:13:33 -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=U7IA9um4; 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 S231853AbjFSPhw (ORCPT + 99 others); Mon, 19 Jun 2023 11:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230130AbjFSPhu (ORCPT ); Mon, 19 Jun 2023 11:37:50 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70E72113; Mon, 19 Jun 2023 08:37:49 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5186a157b85so5195439a12.0; Mon, 19 Jun 2023 08:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687189068; x=1689781068; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LfbivNkUyRqUuO2dy5Pvjng0AOI0erWsssVVox7EkxU=; b=U7IA9um402pom7Vfn68x9rYJsi5G8Gc8DyRp7c3g9NxHbf+4915W3HlmFO0crI5Sex 3KjLWzfA7L34zuOC/xgrHke6+1+fi7LLIa+/PUaI6ASm0rXCcfW3tqvcLpZlnMmwkXc6 s1fJHLGzn/SGlyTS52Awfld0dMKBdUu83FgeGoAOFKWwPelwi/MlAfA2DuQrzNGAWHWw yOytdQtU6cfzT+nXU+QDom6cYHvXskXmzXJH9NSG5r4dFHFqu7oOM30sWY8dnOlYncoK I24JGwvtRTwUXASmOcddfhkCh0pFxwdoknAg7QZ62ejvzJIOa6l7rNx8ICUUx+tk2ovP YqmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687189068; x=1689781068; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LfbivNkUyRqUuO2dy5Pvjng0AOI0erWsssVVox7EkxU=; b=PIHv5SCgWOYrFA6wxmMG1Wv7wkquaI2WaPSgKJwH/Tn5Ef/uChu8P6gg4Y46s4yGKO SRH3S0WZ4CeAJ4rnuE6pnYkoCRrBJK/BWKdYA+oNkbJpMfZqgYqKWnZdZPF0plnCpn5G o0ysrenIGMjNwphnRneVOtzJ2qiirjikvoL7cV29JBdQh559cYPdmZm9PPCLYP3Usan4 NF1knHy8e8xx7br25FDVNgrb3wWw0NDF3rAq5N0Kx64cIFHiglf3vSpvM3eYS/t9REmM n43em3Q3j5PwHv+d8CBje8PD6yZaeme8UygJryUX/MwTYQioYgWKlm5l9yu00HadD9EQ hJ+g== X-Gm-Message-State: AC+VfDxmQVPzvx+VlclVScPNybF45mj6A/7x39qCcRRA+tYSajPZSPDI EXq+XE1PnwmNp3dkWYWvvZg= X-Received: by 2002:a05:6402:1245:b0:51b:52fa:4448 with SMTP id l5-20020a056402124500b0051b52fa4448mr890931edw.6.1687189067841; Mon, 19 Jun 2023 08:37:47 -0700 (PDT) Received: from xeon.. ([188.163.112.79]) by smtp.gmail.com with ESMTPSA id l8-20020a056402344800b005187a42b44fsm7469043edc.58.2023.06.19.08.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 08:37:47 -0700 (PDT) From: Svyatoslav Ryhel To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wolfram Sang , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , Svyatoslav Ryhel Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] GPIO-based hotplug i2c bus Date: Mon, 19 Jun 2023 18:37:30 +0300 Message-Id: <20230619153732.46258-1-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, 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?1769142576083725005?= X-GMAIL-MSGID: =?utf-8?q?1769148214139040923?= ASUS Transformers require this driver for proper work with their dock. Dock is controlled by EC and its presence is detected by a GPIO. --- Changes in v2: - adjusted documentation --- Michał Mirosław (1): i2c: Add GPIO-based hotplug gate Svyatoslav Ryhel (1): dt-bindings: i2c: add binding for i2c-hotplug-gpio .../bindings/i2c/i2c-hotplug-gpio.yaml | 65 +++++ drivers/i2c/Kconfig | 11 + drivers/i2c/Makefile | 1 + drivers/i2c/i2c-hotplug-gpio.c | 266 ++++++++++++++++++ 4 files changed, 343 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml create mode 100644 drivers/i2c/i2c-hotplug-gpio.c