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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 6FA50C433E6 for ; Mon, 20 Jul 2020 07:38:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49AC62073A for ; Mon, 20 Jul 2020 07:38:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=aruba.it header.i=@aruba.it header.b="Q/sM94Yq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726893AbgGTHiK (ORCPT ); Mon, 20 Jul 2020 03:38:10 -0400 Received: from smtpweb146.aruba.it ([62.149.158.146]:50332 "EHLO smtpweb146.aruba.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726890AbgGTHiK (ORCPT ); Mon, 20 Jul 2020 03:38:10 -0400 Received: from [192.168.1.134] ([93.146.66.165]) by smtpcmd05.ad.aruba.it with bizsmtp id 5Ke52302y3Zw7e501Ke679; Mon, 20 Jul 2020 09:38:07 +0200 Subject: Re: [RFC v2 GPIO lines [was: GPIO User I/O] To: Andy Shevchenko Cc: Linus Walleij , Geert Uytterhoeven , Geert Uytterhoeven , "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" References: <01afcac0-bd34-3fd0-b991-a8b40d4b4561@enneenne.com> <1c4f1a83-835a-9317-3647-b55f6f39c0ba@enneenne.com> <87efe96c-3679-14d5-4d79-569b6c047b00@enneenne.com> <070fa558-6e20-0fbf-d3e4-0a0eca4fe82c@enneenne.com> <80bf1236-aacd-1044-b0e5-5b5718b7e9f0@enneenne.com> From: Rodolfo Giometti Message-ID: Date: Mon, 20 Jul 2020 09:38:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1595230687; bh=GKkOGIGhCBY9lAbMSnioB/xi0FLqCI9XkJzBUYXRyq8=; h=Subject:To:From:Date:MIME-Version:Content-Type; b=Q/sM94YqyKWgCxRnrE8kZTBHfBp7DrbVkIe8dGc2dqp7GkLb36bDj6rhpHPJPjtYg p3LadMsQnWhia+OtJAprGIfs5RNfqqhkvzXzd/Nz/E2/qjyaF9lIuA99IMm6UbzpTa 1AUQC58YoGbKhjJiFE8cxLNJkM90wyrCudQ9FMejb3rMQRTfEpQAUlFe5OfWeP4X8P fDw49wU3AvzJBlbezlQ51OYvgZSwuITnZScrpZTL4XNEF9IILZq4S0XkPX2ClivjHz G6BWEpyDid/J5XohaUPlaf94stQDK7X0rYDEHTVB/3grsdBTYQb74GSEw9iyzbPADQ rZCdCMQmI3GUw== Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 19/07/2020 20:35, Andy Shevchenko wrote: > On Thu, Jul 16, 2020 at 6:17 PM Rodolfo Giometti wrote: >> On 16/07/2020 15:38, Linus Walleij wrote: > > ... > >> I see but this interface is not designed for such complex usage nor to compete >> with the current character interface! It is designed to allow boards >> manufactures to "describe" some I/O lines that are not used by any driver in the >> device tree, > > Why are they not in firmware tables? Platform is a set of hardware > that makes it so. > If something is not in DT, then there is no possible way to know what > is that line? > > Or in other words how does the OS know that the certain line is > connected to a relay? I'm sorry but I'm not sure to understand you. I think that within the DT the board developer should describe his/her hardware in the most detailed manner for drivers and, as last step, for the userspace. The OS should only knows such IO lines whose are driver related while other ones (such as a relay or a generic digital input such as a lock/unlock signal) should be described for the userspace. At the moment the only way to "describe" a digital output/input not related to any driver is by using the led or uinput interface that are not designed for such purposes! My suggestion is to give a proper/dedicated description of such IO lines. Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti@enneenne.com Linux Device Driver giometti@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti