From: Timur Tabi Subject: Re: [PATCH] gpiolib: Show correct direction from the beginning Date: Thu, 20 Sep 2018 07:25:17 -0500 Message-ID: References: <20180914070839.4667-1-ricardo.ribalda@gmail.com> <20180914070839.4667-2-ricardo.ribalda@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Ricardo Ribalda Delgado Cc: Linus Walleij , swboyd@chromium.org, linux-gpio@vger.kernel.org, LKML List-Id: linux-gpio@vger.kernel.org On 9/19/18 10:27 AM, Ricardo Ribalda Delgado wrote: > "The get_direction callback normally triggers > a read/write to hardware, but we shouldn't be touching the hardware > for an individual GPIO until after it's been properly claimed." is > an statement specific for your platform That is definitely not true. > and should be fixed in your > driver. There is no bug in my driver. The driver reports only a subset of the GPIOs, because that's all that are available. Attempting to access an invalid GPIO generates an XPU violation. The original code was attempting to access GPIOs that the driver said don't exist. The code that we have today is the result of months of discussion, negotiation, and trial-and-error.