From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755259AbbLJRbS (ORCPT ); Thu, 10 Dec 2015 12:31:18 -0500 Received: from smtp11.smtpout.orange.fr ([80.12.242.133]:33026 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755208AbbLJRbK (ORCPT ); Thu, 10 Dec 2015 12:31:10 -0500 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 10 Dec 2015 18:31:09 +0100 X-ME-IP: 92.156.1.80 From: Robert Jarzmik To: Linus Walleij Cc: Alexandre Courbot , Haojian Zhuang , "linux-gpio\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" , Daniel Mack Subject: Re: [PATCH 0/4] gpio: pxa: integrate with pincontrol References: <1448746665-13422-1-git-send-email-robert.jarzmik@free.fr> <87lh92kbjg.fsf@belgarion.home> X-URL: http://belgarath.falguerolles.org/ Date: Thu, 10 Dec 2015 18:31:08 +0100 In-Reply-To: (Linus Walleij's message of "Thu, 10 Dec 2015 16:02:12 +0100") Message-ID: <87d1uejjmr.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Walleij writes: >> - the GPDR (gpio direction register) shared access bothers me a bit > > How is it shared and between what users? It's shared between the pin controller and the gpio controller. The odd thing with the pxa architecture is that the GPDR bit selects between 2 different alternate functions, even when the pin is not a GPIO. Strange design, isn't it ? As a consequence, both the gpio driver and pinctrl have to modify it, for different purposes : - pinctrl will modify it to select a specific alternate function - gpio driver will modify it when the pin is a GPIO, to modify its direction. Cheers. -- Robert