Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1252367imm; Tue, 2 Oct 2018 05:27:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV61fs+AJpJmDkLufHACAn2zsmFWCr4tYDXG2M0p97fKG7TLI/I7lxVpp0eOJ6R6jQzWN8kfo X-Received: by 2002:a63:e645:: with SMTP id p5-v6mr13756997pgj.218.1538483247922; Tue, 02 Oct 2018 05:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538483247; cv=none; d=google.com; s=arc-20160816; b=ERsZNg2v+BiyvYAGJX/WwqkzVGPyke1fuXf1ZX8Tvw5i4qdiC4c0Tuo4nSASXXumBn MBqwoZSd/LkOBjbvEg35L9VPQBRiXKZfI+3cbTmrdolc9hMfq61WWfKDX6kMIPxe7e0/ hpjQRcV+tFLJWbUdAMXgroywi1dXVPdia5YL+/avNcRlflDeHCA2aSijHGySCl1JDlYa 1YBW3rDMKc/KKb2F5Vqh1zFVCY/amSYzrlkgrLJzOMr1UsXjXXXLrdiRhW2h99w5u5t9 jzE6rHnYS3XauS7C/lfigZb3Kxh/GDQ8nnINxeiD/Gj1zE3THYb4SY4HE3BohCzXYRge qtNQ== 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=AOfOaf7f8/7CoQ4HMjU/KszPYuOJ2rNaR5HMpDQQZpE=; b=qt2awK5yUfUUkNgbXMsn+Xce4u5WT5d5kn9fVSuc4Rt/aL7FfkOMv9/gvzgwrt3oeF zZw7yXVpjchM2R38zm3SaLVoQbZEoecJIyghh7vdFU6RN/vn+44wsAu872d406zdByHV nrlk7BcNf5f+Edmdx5lWflEj6VXbfQXcbj+luCwOgaivYywfRZ9TxngoWM6OPC/e2HC5 Gd3YeOPfWm3sIXNslx7PgdOoG48nykVcFLoMFZw6qQykfTfz/Hg/PuBc7Et70MZaxcH9 RsRKR1eemLS1SGKSlp8g9F8XqCzlHR2IjKRH2r/WpbnVEwdYVzPeRWVkGzepHGfgAm1l Y6HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QnOqPQbM; 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 r3-v6si15396152plb.221.2018.10.02.05.27.12; Tue, 02 Oct 2018 05:27:27 -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=QnOqPQbM; 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 S1727748AbeJBTJy (ORCPT + 99 others); Tue, 2 Oct 2018 15:09:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:54434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727629AbeJBTJy (ORCPT ); Tue, 2 Oct 2018 15:09:54 -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 254972064E; Tue, 2 Oct 2018 12:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538483208; bh=DPyJ5hfP17nbOqx7v6oCLONH/bQ/7PyL1E43dSVuaMo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=QnOqPQbMO+ogQ1K37YryQKl1q8ddD7oCi2scqoRdGZf5xow36T/nuS6mCyoQQZj6H Nc0Qd/+E8V0q0tV1seDS4qGW+2Rc8kGEL46RWCET7cWbvIT+u0uDbZ/pzCekf5xA7B ka1GDjVwI6p2HCVUY9KAmAshkTiXHCigeeS9ZZR4= Subject: Re: [PATCH v2] gpiolib: Show correct direction from the beginning To: Linus Walleij , Ricardo Ribalda Delgado Cc: jhugo@codeaurora.org, Stephen Boyd , "linux-kernel@vger.kernel.org" , "open list:GPIO SUBSYSTEM" References: <20180921103604.13361-1-ricardo.ribalda@gmail.com> <20180921103604.13361-2-ricardo.ribalda@gmail.com> <153803107307.119890.10052910965015646333@swboyd.mtv.corp.google.com> <3e07cab8-0f3e-7474-8f6d-e6bb16e8f998@codeaurora.org> <5aea282d-6fc9-cd70-cec4-10f28aa819b9@codeaurora.org> From: Timur Tabi Message-ID: Date: Tue, 2 Oct 2018 07:26:47 -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 10/2/18 2:38 AM, Linus Walleij wrote: >> But as today the only driver that seems to be using valid_mask is msm, >> so perhaps a hack is something better and then when we have a second >> driver that requires it we figure out the real requirements. But it is >> definately your decision;) Please note that MSM is supposed to be the *first* driver, not the only, driver that needs valid_mask. So let's not make any code changes that limit this feature to the MSM driver. > I would just add some exported function to gpiolib to do what you > need so you can set up the valid_mask before calling > gpiochip_add*. I think that should be okay. Drivers should know pretty early whether they need valid_mask or not.