Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757358AbcDGSBv (ORCPT ); Thu, 7 Apr 2016 14:01:51 -0400 Received: from mail-ob0-f177.google.com ([209.85.214.177]:36490 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757315AbcDGSBq (ORCPT ); Thu, 7 Apr 2016 14:01:46 -0400 MIME-Version: 1.0 In-Reply-To: References: <1459424685-26965-1-git-send-email-irina.tirdea@intel.com> <20160404225200.GA1615@svinekod> <5704519F.5030906@redhat.com> <20160406104900.GA2820@xora-haswell.xora.org.uk> Date: Thu, 7 Apr 2016 20:01:45 +0200 Message-ID: Subject: Re: [RFC PATCH 0/4] Add ACPI support for pinctrl configuration From: Linus Walleij To: Octavian Purdila Cc: Graeme Gregory , ahs3@redhat.com, Charles Garcia-Tobin , Mark Rutland , Irina Tirdea , "Rafael J. Wysocki" , Len Brown , Mika Westerberg , "linux-gpio@vger.kernel.org" , "linux-acpi@vger.kernel.org" , Rob Herring , Heikki Krogerus , Andy Shevchenko , Cristina Ciocan , "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: 1449 Lines: 34 On Thu, Apr 7, 2016 at 4:17 PM, Octavian Purdila wrote: > On Wed, Apr 6, 2016 at 1:49 PM, Graeme Gregory wrote: >> Why has there been no attempt in ASWG to make these sort of features a >> 1st class citizen of ACPI so they can interact correctly with the other >> features? > > IMO having an ASWG pinctrl specification and using _DSD for Linux are > orthogonal approaches. The latter is very specific to Linux and we > want it so that we can support the Linux pinctrl model as best as > possible and I doubt it is a common denominator for all OSes that ACPI > supports. Sob, I tried so hard to implement pin control referring to generic concepts that everyone should be able to reuse. E.g. stressing SI units to be used all over the place, neutral scientific terms for all config options and what not. The multiplexing with groups and functions is a simple (aehm, OK, super-complicated) matter of mapping disjunct sets onto each other, so that comes from logic. Not even the GPIO ranges that map GPIOs to pin ranges are very Linux-specific: it is a property of the hardware that sometimes GPIO is "behind" the pin, in a distinct hardware unit. (See pinctrl.txt for the GPIO pitfalls.) If I was to rewrite pin control and GPIO from scratch I would make it one subsystem instead of two. This is more of an architectural choice. GPIO would still be a stand-alone part of it. Yours, Linus Walleij