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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC585C48BE5 for ; Tue, 15 Jun 2021 07:30:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6FF8600CD for ; Tue, 15 Jun 2021 07:30:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230313AbhFOHc1 (ORCPT ); Tue, 15 Jun 2021 03:32:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230074AbhFOHc0 (ORCPT ); Tue, 15 Jun 2021 03:32:26 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63C43C061767 for ; Tue, 15 Jun 2021 00:30:22 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id c11so23655164ljd.6 for ; Tue, 15 Jun 2021 00:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4byd1Dk2m0bIGpNxLD6eAHBG7Y25yTaDEnQlvjF1Zdc=; b=K0Y4uaRKlTe9bD7p/ynZX2uKJVkiiBpfk+SgKt5vGiCWcoQOX9XJ0ivBfWxt3jtiAh ++0V6U4ObgYdunpMP36P1hQHeGC0iY1IPkAkOnzntkf82faltK8uByibgnbrNBlZ/7wz V07ZKXEzErCHHdvsj5ZSAQbehQEH82uF/hEKsWkPFRwL3tCMafNKnLaKQWQaklqiloeT FCnwa2EUKdxjqGPM1tLa4e0ztnxMIUu/0jp8EAdCK0bBdeXg7aS5Vb72mQS7fze2XBVO GJpTzJULDdeVasxfBe5VPbqe/DP+QLLMIHZIeUYd/XkjNGBVC4DKTqsdydkp6bO5Ja8P gnTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4byd1Dk2m0bIGpNxLD6eAHBG7Y25yTaDEnQlvjF1Zdc=; b=LMrQBMP+qYO62IIpeHWbeWF63Sn8BFy3FrorA3RxYUf6mVom2s31uTRAvpn87nTE+t HU18ndjIQCxSSoYLKe0AyLkWFdSW8yE08AttbiyrXA4IQtOuhtk9wG8j1UxsMA0opssJ 9z+BbEdtAQEZ9KzOxmsHSk+pkFQz9RaXmtiOXOnRbknhqtYTq7DfYf8haziOADbJcUAJ eFU8h1UM8gA7jJ32GE7Dfz+Q4R2ZIKsyU3zMkKiiF/OyeGeguNe7BYC58tDoURrsBICV pB4BiPMsm3Wyya8e38FOSFsjWxWo8a7Mwfn87netSSS/DiahLmuIE2JJX6YTwiC7/X4n VkqA== X-Gm-Message-State: AOAM532WkVhX9OVetYuXramJ4ao3C4gOXFrnIOjwXfdYzI2o7LT0p7nk zQvLsp+bbKT8q4zX7o2g37mhhP825fRLvVrYo2BtIQ== X-Google-Smtp-Source: ABdhPJxpMjRoPyGeUPqwD/dVoDByW0MDQB60HJBouvwSs62fSq0v9vJxpy/IOQk2n48ZlUYvztjAInD9WBzdbB4niOE= X-Received: by 2002:a2e:8046:: with SMTP id p6mr9470415ljg.401.1623742220641; Tue, 15 Jun 2021 00:30:20 -0700 (PDT) MIME-Version: 1.0 References: <10442926ae8a65f716bfc23f32339a6b35e51d5a.1623326176.git.viresh.kumar@linaro.org> <20210614102119.qifm5sj7fpg54iqo@vireshk-i7> <0100017a0a9264cc-57668c56-fdbf-412a-9f82-9bf95f5c653e-000000@email.amazonses.com> In-Reply-To: From: Vincent Guittot Date: Tue, 15 Jun 2021 09:30:09 +0200 Message-ID: Subject: Re: [Stratos-dev] [PATCH V3 1/3] gpio: Add virtio-gpio driver To: Arnd Bergmann Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Linus Walleij , Linux Kernel Mailing List , virtualization@lists.linux-foundation.org, Bartosz Golaszewski , "Stefano Garzarella --cc virtualization @ lists . linux-foundation . org" , "open list:GPIO SUBSYSTEM" , Viresh Kumar , Stratos Mailing List , "Enrico Weigelt, metux IT consult" , Jason Wang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, 14 Jun 2021 at 22:56, Arnd Bergmann wrote: > > On Mon, Jun 14, 2021 at 3:24 PM Vincent Guittot > wrote: > > On Mon, 14 Jun 2021 at 15:00, Arnd Bergmann wrote: > > > On Mon, Jun 14, 2021 at 2:50 PM Vincent Guittot via Stratos-dev wrote:> > > > > > > But this example seem to be completely different from the ones I mentioned: > > > The scmi node that you have here looks like it shows up under the root of the > > > device tree, not below the virtio device that implements the scmi transport. > > > > I was thinking of something like below: > > > > deviceX: deviceX@YYYYYYY { > > ... > > gpio = <&virtio_gpio 0>; > > ... > > }; > > > > virtio_mmio@a000000 { > > dma-coherent; > > interrupts = <0x0 0x10 0x1>; > > reg = <0x0 0xa000000 0x0 0x200>; > > compatible = "virtio,mmio"; > > > > virtio_gpio: protocol@22 { > > reg = <0x22>; > > }; > > Encoding the device ID as "reg" seems somewhat odd, especially since there > can only be one child for each virtio device. The other bus types use the > "compatible" property instead of "reg" for this purpose. This is still > redundant, > since the type is also known from the contents, but it seems less unusual. At least this ensures to match directly the protocol id instead of mapping a compatible string with the protocol id. > > The gpio node in the example is usually called "gpio" or "gpio-controller", and > it would then need the "gpio-controller" and "#gpio-cells" properties so other > nodes can refer to it by phandle. yes, This short example is just to show what I mean. > > Arnd