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=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 67EA5C48BE6 for ; Mon, 14 Jun 2021 20:56:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5010B6120E for ; Mon, 14 Jun 2021 20:56:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234520AbhFNU6r (ORCPT ); Mon, 14 Jun 2021 16:58:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:39004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233438AbhFNU6q (ORCPT ); Mon, 14 Jun 2021 16:58:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5531D6128A; Mon, 14 Jun 2021 20:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623704203; bh=E1qZ+2Ke4P/ssD7Vsx+wfQ8T0WTXGzCGKuvQKbgQf+8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hFzecTgqr4WHAiH4iAbmbmyw8fvFcuy2xUNVlSpSP1bxPxPzPjMBSmj9B18bsVxj1 O0zkWtcJcIwg7hfklwkIB77R6H9/SXCDmy2FB/+QFIASp91Q4B7A5Yl7bFiFt4xYtO wWOd+wV0lSiEzzQyrraoYvJf9UXhv6dkJXYQM7ZBMhiFqvCiL/4W6W/3MRoz+UvDcJ PC9maYM6CsTLOCS/gUiS/up+IvYZdZInonSFDVkuYaXdMQ0rNZl4sk15zjNtHfmKsg Y/IvPrfD9CXyIeKHtnAD8fUQQCWkAcuSwPEDumjx4a4bigeopmhUncFbiV80vau9FP x7mKEFhtV7qIQ== Received: by mail-wr1-f51.google.com with SMTP id r9so15920824wrz.10; Mon, 14 Jun 2021 13:56:43 -0700 (PDT) X-Gm-Message-State: AOAM530BM+EfPP2NH3sqf5+CLloyXEl5shMOdyZMokExyJ0t1Gwnkpo2 xomZscBm7uq6YYRkPtbUk9eOGZTOVs6hCrrfCpA= X-Google-Smtp-Source: ABdhPJyS6ZvM6TWKj9v+SDxahX4oGQrEvfPKU9E67fPz08XeIGZePXDDDposyCthauq0Sf7fAc0gQdSrNRWqWXDqWk8= X-Received: by 2002:a5d:4050:: with SMTP id w16mr20973530wrp.99.1623704201928; Mon, 14 Jun 2021 13:56:41 -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: Arnd Bergmann Date: Mon, 14 Jun 2021 22:54:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Stratos-dev] [PATCH V3 1/3] gpio: Add virtio-gpio driver To: Vincent Guittot 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-kernel@vger.kernel.org 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. 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. Arnd