Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp633033pxj; Thu, 10 Jun 2021 09:02:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgyEiAqzUsaMkPXqAkTNBJ2OFpZagApP8R3Qpx7S+aYN4JldS2JuNPQHdyplPJnH0EZkcD X-Received: by 2002:a05:6402:2378:: with SMTP id a24mr133741eda.161.1623340933462; Thu, 10 Jun 2021 09:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623340933; cv=none; d=google.com; s=arc-20160816; b=p1X8YW9IoMKthWGUCC9LEX7qSoTZkTxA63/F2wJKxjpclrIUmGviuV/Q9t+2Z2+QbZ cgb6Lrnz1dqcQ0IRcD1WhbNe5qgUVoMoeG9k9mU7cu1R7/dfE6H0CTOVaRuJAENsHgna ouFxPcstV8Ne2G1BiY/O1kTvsT6YO2W6k2AIOl+oiDm4bPgn90QARVVKRQNNIKDProXA L+2mboCW3JPoVhfEm8ejASnoHEl7EXTYq8UJHD9dZ/5nBvEcbneXITgf59qJJeV2159K KAp+fRbQOJnqRXXb1offe8UyiZxCRk1yiBY5sePRXH3lUx1JEiAJFIkKJ5Ic/LZvm0Dr V+bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=0kIftJWcHI1/otCkYNzMeiX7IKVcmPKuhY6LNThkdHk=; b=eEJgLRuu98ToFZTu8aO3whf6DccltpU0p5TkF8ZEYqcKQHwFRtzx18AbheF0tBwsE+ PdEYGiHaKbccTqZkl15xT68rMFlEP989qKdHEHEBHr71rO1mS1Oh/vWHzLipFH8m7se7 oHNX06lrQGwU45EKhXohX+aujh80gQxwKuield9fthLdmGleVj5ROlgak++FH6ph7NnU IrdbboIU46NE0uoc82oS6bEb5zu/Sj7yZNmOayEQNPThqb5EtWZHmjhN8yKDxwX0s7vt exl7mHDUqewE3/km5anRqmjkVMerWvpsOVgMl5de64CxvdQ1loQoCPRRvoEAhPo7D17s rA1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si3071333eje.551.2021.06.10.09.01.49; Thu, 10 Jun 2021 09:02:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbhFJQC1 (ORCPT + 99 others); Thu, 10 Jun 2021 12:02:27 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:44295 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229990AbhFJQC1 (ORCPT ); Thu, 10 Jun 2021 12:02:27 -0400 Received: from [192.168.1.155] ([95.115.39.199]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MuDPh-1l4MO33oXV-00uYtt; Thu, 10 Jun 2021 18:00:23 +0200 Subject: Re: [PATCH V3 1/3] gpio: Add virtio-gpio driver To: Arnd Bergmann , Viresh Kumar Cc: Bartosz Golaszewski , Linus Walleij , "Enrico Weigelt, metux IT consult" , Viresh Kumar , "Michael S. Tsirkin" , Jason Wang , Vincent Guittot , Bill Mills , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Stratos Mailing List , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Stefan Hajnoczi , "Stefano Garzarella --cc virtualization @ lists . linux-foundation . org" , virtualization@lists.linux-foundation.org References: <10442926ae8a65f716bfc23f32339a6b35e51d5a.1623326176.git.viresh.kumar@linaro.org> From: "Enrico Weigelt, metux IT consult" Message-ID: <82bdf2e6-35fb-74e8-1b2c-198fe8d528e6@metux.net> Date: Thu, 10 Jun 2021 18:00:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: tl Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:KQsiXSBnL3Xwtzh+4csb7zDCBty4K8v8NkMMz18y2IgJxDpNr5Y CrCUFSbcYjjTQ5O21EC7wncPD4V+Gk6ezpYjgVNL9/GfLyBGPjPgnkXjpXfg7/s51ztQj+7 pFW9cNiVl/uYL2WzCges8+QrQCn47OK5jsGlrL9xl8jnLMLVaexqcraEC5OcyrsDvL64Yu4 tvhi+Zn62xFEIV+m3UjKA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:16ZCoke447c=:LBGHWn9Vn6ARMF7jtXetBG rzMAW5C+Q7RmicndoG9vv77U7RlNn0FxWoYH8+AMP5xE83oxq7wGVOkkHP9bQRAEGIhGjb4YS fyr029xkSMxaUHvCiwM+941JVgC5g98zZbLUE6NaV1b1JkePkrJY82CdHUvvy3FxMFBurTQHr 4dAoKQFZN+OjBx234+uU2YrZcclQ9EWrLWVSE2FjkuDJ1PFBakQJDZ8fLZFZ37zl71px+S/Q3 LG4/7SKCmKOlNCTm2ss/r7OLEFXofAJ2J9bi4dft/VpcyoISQC9qudw4kJv8fEjiTpQTMxxSw Alos9axtXZa080xASTQGT7KkgPMafcuTLiSyVm1yFd6EDsFI5mZI9eyk6O2YJceftZr4dGdGl d9R4eoNBgAbgEfwXMrIbTYCseX6rZOcTrTN+Yp81605SYBw6mPisuaOppWZtEUiaCNCFZD0fF cixXsh9fuKHLs+llJ4OB5QRpjJl+JuuCsvoUp85pTkkCBQoWN1xK/pHIDBdGad6JIy609WflN +NPQwd0bQFWnpP4bvEfJi0= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10.06.21 15:22, Arnd Bergmann wrote: > Can you give an example of how this would be hooked up to other drivers > using those gpios. Can you give an example of how using the "gpio-keys" or > "gpio-leds" drivers in combination with virtio-gpio looks like in the DT? Connecting between self-probing bus'es and DT is generally tricky. IMHO we don't have any generic mechanism for that. I've made a few attempts, but nothing practically useful, which would be accepted by the corresponding maintainers, yet. We'd either need some very special logic in DT probing or pseudo-bus'es for the mapping. (DT wants to do those connections via phandle's, which in turn need the referenced nodes to be present in the DT). > From what I can tell, both the mmio and pci variants of virtio can have their > dev->of_node populated, but I don't see the logic in register_virtio_device() > that looks up the of_node of the virtio_device that the of_gpio code then > tries to refer to. Have you ever successfully bound a virtio device via DT ? --mtx -- --- Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren GPG/PGP-Schlüssel zu. --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287