From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH 1/2] [v5] pinctrl: qcom: disable GPIO groups with no pins Date: Fri, 13 Oct 2017 18:35:59 -0500 Message-ID: <2be95dec-5e53-71b4-1b08-3e8dd45ca30c@codeaurora.org> References: <1504798409-32041-1-git-send-email-timur@codeaurora.org> <1504798409-32041-2-git-send-email-timur@codeaurora.org> <20171002174414.GL1165@minitux> <9f28c9dd-6277-6c75-1186-a834e15c5346@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:34036 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752942AbdJMXgB (ORCPT ); Fri, 13 Oct 2017 19:36:01 -0400 In-Reply-To: Content-Language: en-US Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Linus Walleij Cc: Bjorn Andersson , Andy Gross , David Brown , anjiandi@codeaurora.org, "linux-gpio@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-arm-msm@vger.kernel.org" On 10/07/2017 06:07 AM, Linus Walleij wrote: > I mean that you add > unsigned long *line_valid_mask; > to struct gpio_chip using the same type of logic > as .irq_valid_mask. The mask should be optional. Hmmm okay > Then the operation gpiod_get[_index]() will FAIL if the > line is not valid. Just to be clear, you want gpiod_get_index() to check line_valid_mask (if present) and return -ENODEV if not valid? > There is no need to check on every operation, there should > be no way to get a handle on the pin any other way. > > All new code should be using descriptors at this point so we > only need to design for that case. Ok, I will check this. -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.