Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969023AbdD1Ici (ORCPT ); Fri, 28 Apr 2017 04:32:38 -0400 Received: from mail-it0-f53.google.com ([209.85.214.53]:37238 "EHLO mail-it0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968799AbdD1IcV (ORCPT ); Fri, 28 Apr 2017 04:32:21 -0400 MIME-Version: 1.0 In-Reply-To: References: <1493281194-5200-1-git-send-email-jacopo+renesas@jmondi.org> <1493281194-5200-2-git-send-email-jacopo+renesas@jmondi.org> From: Linus Walleij Date: Fri, 28 Apr 2017 10:32:19 +0200 Message-ID: Subject: Re: [PATCH v5 01/10] pinctrl: generic: Add bi-directional and output-enable To: Andy Shevchenko Cc: Jacopo Mondi , Geert Uytterhoeven , Laurent Pinchart , Chris Brandt , Rob Herring , Mark Rutland , Russell King - ARM Linux , Linux-Renesas , "linux-gpio@vger.kernel.org" , devicetree , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1406 Lines: 39 On Thu, Apr 27, 2017 at 4:56 PM, Andy Shevchenko wrote: > On Thu, Apr 27, 2017 at 11:19 AM, Jacopo Mondi > wrote: >> Add bi-directional and output-enable pin configuration properties. >> >> bi-directional allows to specify when a pin shall operate in input and >> output mode at the same time. This is particularly useful in platforms >> where input and output buffers have to be manually enabled. >> >> output-enable is just syntactic sugar to specify that a pin shall >> operate in output mode, ignoring the provided argument. >> This pairs with input-enable pin configuration option. > > For me it looks like you are trying to alias open-drain + bias or > alike. Don't actually see the benefit of it. Andy is bringing up a valid point. And I remember asking about this before. What does "bi-directional" really mean, electrically speaking? Does is just mean open drain and/or open source actually? (See Documentation/gpio/driver.txt for an explanation of how open drain/source works.) When you set an output without setting a value, what happens electrically? Isn't this bias-high-impedance / High-Z? Hopefully you can find the answer from Renesas hardware dept. You can certainly call it whatever the datasheet calls it in your driver #defines but for the DT bindings we would ideally have the physical world things. Yours, Linus Walleij