From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB690EB64DC for ; Mon, 19 Jun 2023 15:53:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229994AbjFSPxb (ORCPT ); Mon, 19 Jun 2023 11:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232046AbjFSPxa (ORCPT ); Mon, 19 Jun 2023 11:53:30 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA324188 for ; Mon, 19 Jun 2023 08:53:28 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-510d6b939bfso5169970a12.0 for ; Mon, 19 Jun 2023 08:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687190007; x=1689782007; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=V9C0eOPlOJP8V7Ip24tLQWIiF2xkZMIZCHkz9YcWfUI=; b=tX7OM+KWr4Hy4uNLPIMvteQMGvnj/szzpPKV/8dYdqBP9FcNhOOnAIh46jnOtH3vbV lzeove+AUuoKLkpeB+FD6A3nqXdGwXm2HybOzcvASy+1Eyey53EHBfjE1oz9jE0B8dDj JcDtBMs/PqBmsBr5EcWbb4i9s8NCP0MADAwt5lPS4JBJlOTPDQJQb5fO7hh55dWM4AWc uY+01hJZfPS3KAA6fsqfgxutSkaUsF+Duw3gH6lQUouOftHpojQG1zqK0arEGL6F1Hqb P/HoA9I3jf30GE4P+7uAbhux2tlLqReowHzB7BN7Z0vBus+Vtb2Ir5jH8EeCniEgGKz5 H41g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687190007; x=1689782007; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V9C0eOPlOJP8V7Ip24tLQWIiF2xkZMIZCHkz9YcWfUI=; b=Z4p3Bux4h6NGkS7aUKsH63zRhBaMCZAxmDkNrOEE1t6qRmCDChPRhtPlsBuawHSvnz U+QCYZ9cKLk5XgpZZrnHYf01rsGm/Ij/I5kqM8K8JpA2/K1Bn+7QYfvkSptESrbz0L51 p0xqu7nAt/qeC+1piwzmPENTspVOSd6CJnSUYq2HSo+OEZV2Mp0iig4m5aAQsGvEUEkO 5JWbOZ9GzniJLpsIzxbiEyDKzV+e/730DGVDX5xfleXu+/H4jzJzzxBgsnOY4bJQb2MP RThrG/RxzDgcQF0b5zf8rDBxUnlbsUFSEaBZ96dwg6gU+2CyVS2zk355s2pg2zX7w55M gLiw== X-Gm-Message-State: AC+VfDxUOJ3qvAHFYgS3uzTCBpEXW3ozZ+9+xYI60aHfHZmHzh2HWMxX 9lsDzaHIDAtolqxptNnZ2G52eiUW4fy4eF6aBrw= X-Google-Smtp-Source: ACHHUZ7EhsSON+0iDLU7SFoiPsSaaDvttIqPgPSWBnvrDoHzQm0L74fJieTmYJCW/OUCpu0ZP3K4BQ== X-Received: by 2002:aa7:d610:0:b0:51a:5993:4308 with SMTP id c16-20020aa7d610000000b0051a59934308mr2553624edr.28.1687190007394; Mon, 19 Jun 2023 08:53:27 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id j19-20020a50ed13000000b0051a216e7df7sm5193226eds.87.2023.06.19.08.53.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jun 2023 08:53:26 -0700 (PDT) Message-ID: <32b0e664-9381-19c4-de9d-9466a00b4f50@linaro.org> Date: Mon, 19 Jun 2023 17:53:24 +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 v2 1/2] dt-bindings: i2c: add binding for i2c-hotplug-gpio 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: <20230619153732.46258-1-clamor95@gmail.com> <20230619153732.46258-2-clamor95@gmail.com> Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: <20230619153732.46258-2-clamor95@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 19/06/2023 17:37, Svyatoslav Ryhel wrote: > Document device tree schema which describes hot-pluggable via GPIO > i2c bus. > > Signed-off-by: Svyatoslav Ryhel 1. Don't send new version before discussion finishes. v2 after one hour is definitely not enough. Usually one day. 2. Test the patches before sending... What changed here? > --- > .../bindings/i2c/i2c-hotplug-gpio.yaml | 65 +++++++++++++++++++ > 1 file changed, 65 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..21f2b74ca6c1 > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml > @@ -0,0 +1,65 @@ > +# 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: > + Driver for hot-plugged I2C busses, where some devices on a bus "Driver" so SW? Bindings are for hardware, not for drivers. > + are hot-pluggable and their presence is indicated by GPIO line. > + > +properties: > + compatible: > + items: Drop items. > + - const: i2c-hotplug-gpio > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + interrupts-extended: I missed last time - this is wrong. Just interrupts. > + minItems: 1 maxItems > + > + detect-gpios: > + maxItems: 1 > + > + i2c-parent: > + maxItems: 1 Discussion from v1 stands - this is a software construct, not a real device. > + > +required: > + - compatible > + - '#address-cells' > + - '#size-cells' > + - interrupts-extended > + - detect-gpios > + - i2c-parent > + > +unevaluatedProperties: false instead additionalProperties: false Anyway, don't send v3, before the discussion about the entire concept finishes. You create a software/virtual device, instead of adding these properties to bindings for a real hardware. > + > +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 GPIO_ACTIVE_LOW>; I don't think you can have both interrupt and GPIO on the same line. > + > + i2c-parent = <&gen2_i2c>; > + }; > +... Best regards, Krzysztof