From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751632AbdH2CEV (ORCPT ); Mon, 28 Aug 2017 22:04:21 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:45570 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbdH2CEQ (ORCPT ); Mon, 28 Aug 2017 22:04:16 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 999C1607EB Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=fenglinw@codeaurora.org Subject: Re: [PATCH V1] pinctrl: qcom: spmi-gpio: Add support for qcom,gpios-disallowed property To: Shawn Guo Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, Linus Walleij , Rob Herring , Mark Rutland , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, collinsd@codeaurora.org, aghayal@codeaurora.org, wruan@codeaurora.org, kgunda@codeaurora.org References: <20170719071804.3816-1-fenglinw@codeaurora.org> <20170828145435.GJ3685@dragon> <20170829015112.GK3685@dragon> From: Fenglin Wu Message-ID: <0446a53f-3d78-39be-8cea-d39e39453910@codeaurora.org> Date: Tue, 29 Aug 2017 10:04:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170829015112.GK3685@dragon> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/29/2017 9:51 AM, Shawn Guo wrote: > On Tue, Aug 29, 2017 at 09:03:02AM +0800, Fenglin Wu wrote: >> I agree the GPIO's ownership is configurable and it always configured at >> the very beginning of the device boot up which is not visible by linux >> kernel drivers/image. Normally, this configuration is fixed in one >> platform and it's been protected and not allowed to be configured in >> linux kernel driver. So from linux driver point of view, this is a >> hardware configuration. I agree the coming patch "spmi: pmic-arb: Move >> the ownership check to irq_chip callback" would fix the pinctrl- >> spmi-gpio driver probe failure caused by the ownership mismatch, but >> this is just hiding the mistake of the kernel configured the GPIOs which >> not owned by APPS processor. > > The kernel does everything just right, using the GPIO that device tree > tells to use. If there is something wrong about ownership check, it > should be fault of that device tree specifies the wrong GPIO, or > firmware doesn't configure ownership as needed. > > Shawn > If you thought that the driver registers pins for the GPIOs not owned by APPS processor is correct, then this patch is no needed. I agreed with others. Thanks Fenglin >> And these GPIOs will be registered >> successfully as pinctrl pins and any APPS processor consumer drivers >> could use this pins. This is not correct even the select_state operation >> for these pins would failed due to the mode protection in spmi write_cmd >> calling. I am thinking that not allowing these pins to be register as >> pinctrl pins should be more straightforward and easy understanding. So I >> think this patch still have value even the probe failure has been fixed >> by the coming spmi patch. -- Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.