Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933526AbdC3IQr (ORCPT ); Thu, 30 Mar 2017 04:16:47 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:36683 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933481AbdC3IPI (ORCPT ); Thu, 30 Mar 2017 04:15:08 -0400 MIME-Version: 1.0 In-Reply-To: References: <1490368934-12494-1-git-send-email-jacopo+renesas@jmondi.org> <1490368934-12494-4-git-send-email-jacopo+renesas@jmondi.org> From: Linus Walleij Date: Thu, 30 Mar 2017 10:15:05 +0200 Message-ID: Subject: Re: [PATCH v3 3/7] arm: dts: dt-bindings: Add Renesas RZ pinctrl header To: Chris Brandt Cc: Jacopo Mondi , Bjorn Andersson , Geert Uytterhoeven , Laurent Pinchart , Rob Herring , Mark Rutland , Russell King , Linux-Renesas , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "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: 1643 Lines: 46 On Wed, Mar 29, 2017 at 4:55 PM, Chris Brandt wrote: > On Wednesday, March 29, 2017, Linus Walleij wrote: >> On Fri, Mar 24, 2017 at 4:22 PM, Jacopo Mondi >> wrote: >> >> > Add dt-bindings for Renesas r7s72100 pin controller header file. >> > >> > Signed-off-by: Jacopo Mondi >> >> > +/* >> > + * Pin is bi-directional. >> > + * An alternate function that needs both input/output functionalities >> > +shall >> > + * be configured as bidirectional. >> > + * Eg. SDA/SCL pins of an I2c interface. >> > + */ >> > +#define BI_DIR (1 << 3) >> >> Any specific reason why this should not simply be added to >> include/linux/pinctrl/pinconf-generic.h >> as PIN_CONFIG_BIDIRECTIONAL and parsed in drivers/pinctrl/pinconf- >> generic.c from the (new) DT property "bidirectional" simply? > > I see your point. It would cut down from every driver out there > inventing some new property or config instead of everyone just sharing > a fixed set. > Maybe someone else out there will end up having a need for a > "bidirectional" option. I was thinking about that one. It is a bit weird electrically, like what kind of electronics is really bidirectional? It seems like a fancy name for open drain/open source, what we call "single ended" configuration. (See docs in Documentation/gpio/driver.txt) It would be great if you could check if that is what they mean, actually. > But, what do we do for Ethernet? All the pins are "normal" except just > the MDIO pin needs to be bidirectional. I see Geert clarified what we could do here. Yours, Linus Walleij