From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670AbdE3OMf (ORCPT ); Tue, 30 May 2017 10:12:35 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:55211 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751552AbdE3OMb (ORCPT ); Tue, 30 May 2017 10:12:31 -0400 X-IronPort-AV: E=Sophos;i="5.38,418,1491231600"; d="scan'208";a="244714842" From: Chris Brandt To: jmondi , Linus Walleij CC: Dong Aisheng , Andy Shevchenko , Jacopo Mondi , "Geert Uytterhoeven" , Laurent Pinchart , Rob Herring , "Mark Rutland" , Russell King - ARM Linux , Linux-Renesas , "linux-gpio@vger.kernel.org" , devicetree , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v5 01/10] pinctrl: generic: Add bi-directional and output-enable Thread-Topic: [PATCH v5 01/10] pinctrl: generic: Add bi-directional and output-enable Thread-Index: AQHSvy8kW/T8jbNXV0G/jE8WsCEqd6HZTneAgAEnEICAACrhkIAAE36AgAAKEjCAACHsAIANr5WAgAIa0gCAAAIDAIAAFXEAgABBdACAFtd9gIAAjjyAgAjIoACAACCfgIABwsdQ Date: Tue, 30 May 2017 14:12:25 +0000 Message-ID: References: <20170508160120.GB25206@w540> <20170508172516.GC25206@w540> <20170523183735.GC13664@w540> <20170529104229.GB21347@w540> In-Reply-To: <20170529104229.GB21347@w540> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: jmondi.org; dkim=none (message not signed) header.d=none;jmondi.org; dmarc=none action=none header.from=renesas.com; x-originating-ip: [75.60.247.61] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SG2PR06MB1167;7:jMz5wfN+ZAXHl4WOHNk4Fb4ET8Z5v8+NtNQiXvUcFRgHvnCGUkVrNlNHovuDHrD8XonN3RlfEsLQnqEConoq1RQ4n0rINucEl6tVcqCXtsPeeyL7tymxQzhtX3qPLBTRkj+4MufvTwyeVLHdS6EXlSJthkai4FilcrHskQb8jg7pHmsJCcVS0WfagYnXJUBaiDzMzHSG+kZPU4uEBaTTH+w5+y/8XMLR022otSqgdLI4kjgCGDqZygD8z6BAd3AjSGJDJRqP3MPOIVfP9UuqF5UHLcK2UVzjzyJFLkOe31vjbUDwCz3jk0F8QIKkjr1XVgWxJ8tIFkqtdzxCX8EVMA==;20:bcMoh6h8NdyljrQVSwLRmF1Ng2dgxJSxn4ZF0MfXEw/A8HvehHuI+qOrLBqAhHaapAtWhamzkR1AtBAcu+mogg9QvUIpv2ttjiWTFhoCmBgFOQGGIzo98ySuSpUeDTsDQNUDBRuEPNGyjHTgYK+cScYVeUuHxgU6xxe90FC5zBw= x-ms-traffictypediagnostic: SG2PR06MB1167: x-ms-office365-filtering-correlation-id: be74aebf-6024-46c1-477f-08d4a765e5bc x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:SG2PR06MB1167; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703073)(100105400095)(6055026)(6041248)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(6072148)(100000704073)(100105200095)(100000705073)(100105500095);SRVR:SG2PR06MB1167;BCL:0;PCL:0;RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095);SRVR:SG2PR06MB1167; x-forefront-prvs: 032334F434 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39850400002)(39840400002)(39450400003)(39410400002)(39860400002)(39400400002)(24454002)(66066001)(33656002)(6116002)(5250100002)(5660300001)(8936002)(102836003)(93886004)(478600001)(25786009)(2906002)(6506006)(3846002)(2950100002)(229853002)(6436002)(86362001)(7416002)(3280700002)(38730400002)(6246003)(81166006)(53936002)(2900100001)(8676002)(7736002)(3660700001)(99286003)(4326008)(72206003)(55016002)(76176999)(54356999)(54906002)(9686003)(39060400002)(7696004)(189998001)(50986999)(305945005)(14454004)(74316002)(41533002);DIR:OUT;SFP:1102;SCL:1;SRVR:SG2PR06MB1167;H:SG2PR06MB1165.apcprd06.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2017 14:12:25.2377 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1167 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v4UEED7J027729 Hello Jacopo and Linus, On Monday, May 29, 2017, jmondi wrote: > > > We can handle 'bi-directional' pins with static tables in our pin > > > controller driver and not have it anywhere in DT. > > > > This sounds like a viable approach. > > > > I just want to know if "output-enable" is the right name? > > "output-buffer-enable"? > > Great! Thanks! > > On naming: if we need "output-buffer-enable" should we add > "input-buffer-enable" as well? > > Currently we are using "input-enable" to pair with "output-enable", > but as you said, just "output-enable" when "output-high" and > "output-low" are there already seems a bit confusing. > At the same time "input-buffer-enable" seems to actually be just > electrically equivalent to "input-enable", so adding it is a bit of a > waste as well. Here is what I think: In the case of this driver, after we remove the 'bi-directional' properties and hide the other odd-ball pin configurations in an internal table, we are left with the MTU2 timer pins that can be either input or output depending on what you want to do with them. * If you want to use a MTU2 channel as a PWM, you set the pin as an output. * If you want to use a MTU2 channel as a input capture, you set the pin as an input. They are simply "direction-input" and "direction-output" properties that don't really need to talk about "buffers". But, instead of making any new properties, for the Renesas driver, let's just stick with what already exists today: * If you want a MTU2 channel as a PWM: select "output-low" * If you want a MTU2 channel as a input capture: select "input-enable" Side Note: You can also use output-high in addition to output-low because it doesn't matter (the driver can't set the pin level anyway because as soon as you assign the pin to MTU2, the MTU2 controls the pin, not the PFC). So the Renesas driver can check for both. Chris