Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6486990rwd; Mon, 19 Jun 2023 08:00:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4NmHJwko6AGURhJC5aQBXeUkMvUHGfrTCOUWPtFD0khSbviMPuJLbq2hrgVXN1caUfqvOW X-Received: by 2002:a05:6a00:234c:b0:668:8b43:8df0 with SMTP id j12-20020a056a00234c00b006688b438df0mr1278375pfj.33.1687186837530; Mon, 19 Jun 2023 08:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687186837; cv=none; d=google.com; s=arc-20160816; b=yqyW33kG/e9MLFBqPCSvxb3lkndhtf/YD7WQUc8APGmYkySLga6j2dwtOVOYS4bY9U ikM8/RZthkDj2ZYUgvJjflHkWkCyUHxgw3/1Sv7rF/y068PUoJXOkVOk7ZByZm5e9XK5 LZ6P6BrYIVWEEZI8Omuho19i6puuEo81cSSYyjSLbIEoRQi2q16AilAvI0Pl78i4ey3o TDTrtaEsE3OwuOSbIfcWlJXuYUC8q8d71i6JMZjWQsjrmJvt9Kp1mO9wDkzHsatcTH4N Bj7WPpOSrBV+pqfaf/OByTX4PmR3/Zz3kKtyeaMF4r3NJM5REspucU+2q9AY/Sfqq9uC KIYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=cdvdZc1XBtu7GSZPktQLdJjAq5f8weyxwcqQX3iLhs0=; b=GVyBpyZhWeYWwBNpqPUhqaeOEHd2a/ugC+n3/7pTW3WY1CYYIke2/Lw2C19ucfUqBo uAbQr+6E6WTZct7OuMhqxIdXogGgZbMLyutbu75QGODmrm0xXaINnYfFglZljeMVKiBC wMs+fqXIUn78KiCkk0/4cKwBJCNJNECnwiXdx/Ufkev5kKxcDTnTPFaUTP0N4rSNFbwg d8fwwT1kgnhwg/q8ffaA0g/5w6lu1aOn80fT/+jUx45ufE2vQ5ARicMa12Gu54ZQSymZ 1V6KIEpKlUd7KIi8xQfqP8/Z+g4Uj7+kSlRp4SuqHOrjPtQXGGm8Vwty1n46KgMKfPRf KSJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OkdaLAj4; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020aa79a09000000b0066882f939e4si1437176pfj.169.2023.06.19.07.59.56; Mon, 19 Jun 2023 08:00:37 -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=@linaro.org header.s=google header.b=OkdaLAj4; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232197AbjFSOqI (ORCPT + 99 others); Mon, 19 Jun 2023 10:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbjFSOqD (ORCPT ); Mon, 19 Jun 2023 10:46:03 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5F4910D3 for ; Mon, 19 Jun 2023 07:45:56 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9881b9d8cbdso357632366b.1 for ; Mon, 19 Jun 2023 07:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687185955; x=1689777955; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cdvdZc1XBtu7GSZPktQLdJjAq5f8weyxwcqQX3iLhs0=; b=OkdaLAj4ZOWqderFYyGn4GoPZk6dcmqg1xpJun/ubGVnxaswXXGCm7C4KS2hJlN7Hi k+44vxUz9fBlE58wSc6uHaF28GOVFyNTt1+0Waxorzscoipv9LhjexVL13uDV8oFHuEL viSawuIT5SC92ofY1pzJG9AWv6t0l3OsUlQ02WSSgIhwupbrcOhJ6Od/VsVoyxO3KhhR p9xSjoprmJjNtJ4//2L/gdv0RTUN0+s3JKYwOEP77Kc/aexGSpnoOpDu+g3cto4qMrH6 CIdXAGRYFYluC3vYHVyaH2TOAX/YbmSdM+Xc59o261TgbOReyuQORccGmB8eAE3U7xsV jLog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687185955; x=1689777955; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cdvdZc1XBtu7GSZPktQLdJjAq5f8weyxwcqQX3iLhs0=; b=NTxf7QEhEU85jzmHKdbmTYjvVuLA0e/E6qNxfN2QmBFXw6mpZ9m7He4eZl8sT1rucX oJ1v7gvlvDcMB2fOGU/PG4SfIqHLJT/XUOPe0Za7U0npV0kCgZ0tq3xoAKVvg/dYUJ8Z AlOJ9rzwxZV/mLAxAZzQIcRKWtnqmMupBJD/cV2iw/c50H6IULOeuIHfKCI348+HarN7 tTO8tMs96Mjabn8+2EqP0bBWuQTpPlTBmonwQrfaCyANl5WMAGX57hwuKolJsOy+BGNg FJY9f5W62Y3iT22X5QIfn2j+wxWzSGeuSsLWoVRZVhL343QqVXOvD7dtjr6d5SvUmRmh OrBw== X-Gm-Message-State: AC+VfDzU6PhPTz85ZvOwUy5Gh6SDH8DgRMEPsZZAwGeL/hAj+TaxVFdl tRg6Oapivl53MyM9LZa8hdzMUtxBZRqAcDnp4Uo= X-Received: by 2002:a17:907:3e27:b0:978:8685:71d5 with SMTP id hp39-20020a1709073e2700b00978868571d5mr9076379ejc.30.1687185955295; Mon, 19 Jun 2023 07:45:55 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id gq19-20020a170906e25300b009884b9da1f7sm2849226ejb.106.2023.06.19.07.45.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jun 2023 07:45:54 -0700 (PDT) Message-ID: Date: Mon, 19 Jun 2023 16:45:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v1 1/2] dt-bindings: i2c: add binding for i2c-hotplug-gpio Content-Language: en-US To: Svyatoslav Ryhel , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wolfram Sang , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230619143611.24482-1-clamor95@gmail.com> <20230619143611.24482-2-clamor95@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <20230619143611.24482-2-clamor95@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 19/06/2023 16:36, Svyatoslav Ryhel wrote: > Document device tree schema which describes hot-pluggable via GPIO > i2c bus. > > Signed-off-by: Svyatoslav Ryhel > --- > .../bindings/i2c/i2c-hotplug-gpio.yaml | 68 +++++++++++++++++++ > 1 file changed, 68 insertions(+) > create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml b/Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml > new file mode 100644 > index 000000000000..74544687a2b8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml > @@ -0,0 +1,68 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/i2c/i2c-hotplug-gpio.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: GPIO detected hot-plugged I2C bus > + > +maintainers: > + - Michał Mirosław > + > +description: | Do not need '|' unless you need to preserve formatting. > + Driver for hot-plugged I2C busses, where some devices on a bus > + are hot-pluggable and their presence is indicated by GPIO line. > + > +properties: > + $nodename: > + pattern: "^i2c-(.*)?" Drop > + > + compatible: > + items: > + - const: i2c-hotplug-gpio > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + interrupts-extended: > + minItems: 1 > + > + detect-gpios: > + maxItems: 1 > + > + i2c-parent: > + maxItems: 1 I don't understand this part. You built it as a complimentary device to the I2C controller, but there is no such device as "hotplug I2C", right? The GPIO is part of the controller and this is imaginary (virtual) device? Otherwise, where does the "detect-gpios" go? To the SoC? Then it is not a real device... > + > +required: > + - compatible > + - "#address-cells" > + - "#size-cells" Use consistent quotes (' or "). > + - interrupts-extended > + - detect-gpios > + - i2c-parent > + > +unevaluatedProperties: false > + > +examples: > + - | > + /* > + * Asus Transformers use I2C hotplug for attachable dock keyboard > + */ > + #include > + #include > + > + i2c-dock { > + compatible = "i2c-hotplug-gpio"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + interrupts-extended = <&gpio 164 IRQ_TYPE_EDGE_BOTH>; > + detect-gpios = <&gpio 164 1>; You forgot define. > + > + i2c-parent = <&{/i2c@7000c400}>; Use normal phandles/labels like entire DTS, not full paths or node names. > + }; > +... Best regards, Krzysztof