Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1950095imm; Thu, 20 Sep 2018 05:36:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYRs0uS+arZvtP+URYfEAl1S8kDGU/4GQnlcPavIukmT0FI2Pion0LXjgBzrQuDnRfNQF7X X-Received: by 2002:a63:ab0c:: with SMTP id p12-v6mr37571031pgf.190.1537446984653; Thu, 20 Sep 2018 05:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537446984; cv=none; d=google.com; s=arc-20160816; b=pgJvj5py5IEIS3zdwT1k7H7wP56zg68X8CKW5Rk/I7+/whi0Imx9774IM0pWdwl5Vn 3uSE384G62BgIHWBMNR7jYVspkPHP8S9bo5NvCyLfoUN0Bel6F7NCMgPxmzSEnD5Pp6L DSmeRSt0h968B6yE31kpTpTw3i8TdOAI+4+ilNYwMss8YLDMaxpZCaQ47/KH2poTti3g Ju+3KtPgFcYBY11PJZqT0tZchBC/PqtL7q1ZXZ0xjttkxFoFUMivP6vUEENTqy+rwMy2 SRs5Fmp19qdR5KU1EAQO9aHAdXpMgdxqhkh5ncC+2GXyBbrJcAT5QJ26DpaKhaMni7zo y3ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=784yjzVCRsm+GUoO1+xomqSfQpg2DvCLLZ5niSaiiac=; b=bb4nb2l3qt+jNqtsGtIbvNiyYZC1X9LwKWJPVjJZQj2rs94KJtRS2gwtpvf9DqWDL/ k5+zHAJp2YxnKlL9frTlWnt7Wu0NHtnxzNvodSOMhmoEIQX3pm93GLn5HKHj7Lbq08Jr LiIBkvO06teipei8V72+hzZIEwlXAuvIVEEcv1U697W0ju1GmCE+gc28F7GPo+2TpHXV 4I3Bcjguaw++1VSBCSVUw4/mz7IwQC9FwDYWsE0bGcgJNYzU7g1+xorGVCvly8EMAX9n cdI2cGlPozCbdl+wVY2Bi30iCSgFXNM1w//vRzlyx0KZFhbOUuV82Zj1jLYtb4YvzVJO e16g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=atnc0Nzr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4-v6si23207793pgf.193.2018.09.20.05.36.08; Thu, 20 Sep 2018 05:36:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=atnc0Nzr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387552AbeITSTM (ORCPT + 99 others); Thu, 20 Sep 2018 14:19:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:48456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727633AbeITSTL (ORCPT ); Thu, 20 Sep 2018 14:19:11 -0400 Received: from [192.168.1.75] (cpe-24-28-70-126.austin.res.rr.com [24.28.70.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C1BF421529; Thu, 20 Sep 2018 12:35:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537446954; bh=LBduy/MitbhYvvPT9XFTDK0L3FQ6kLzKm5fBXNm0J0A=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=atnc0Nzrpji03499bodxTwdFEidawq8c5o7hKVUvn33cJZCC/uep3Nx5992kxNbB+ GFT+yjLq2TXeUDWfgr6DAdzayYsaCd6jgtSp1dgywrSl8SASYOwv5Y5prY/Apne2Nx WfqajKRehjVk0bFb3zQLgTBCBgIe2llIY8NkqPNQ= Subject: Re: [PATCH] gpiolib: Show correct direction from the beginning To: Linus Walleij Cc: Ricardo Ribalda Delgado , Stephen Boyd , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" References: <20180914070839.4667-1-ricardo.ribalda@gmail.com> <20180914070839.4667-2-ricardo.ribalda@gmail.com> From: Timur Tabi Message-ID: Date: Thu, 20 Sep 2018 07:35:52 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/20/18 12:23 AM, Linus Walleij wrote: > I think most gpiochips easily survives calling the .get_direction() > early, Qualcomm's stand out here. > > Now that we have .valid_mask in the gpiochip could we simply just > add this back, resepecting valid_mask and avoid checking the > direction of precisely these GPIOs? Can you be more specific? One of the proposals made previously was to add a check in msm_gpio_get_direction(), but that was rejected because the consensus was the valid_mask checks in gpiolib are sufficient.