Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1904709imm; Sat, 29 Sep 2018 06:25:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV61VKyx+VuWVjzBdCnb94fNbA75WS1xgaGSlvqX05EfHFeAWP5HMiNzpW87Rnsod/Xkzn+te X-Received: by 2002:a17:902:aa42:: with SMTP id c2-v6mr3220717plr.119.1538227552725; Sat, 29 Sep 2018 06:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538227552; cv=none; d=google.com; s=arc-20160816; b=NKUvu0RPEn0k3wkfp/A4Zpz1611g0VoUcyD30JdqPXu/t6DdNL7ZKx/X+5CW3lmwp6 KsZ+/w65EnC1yMGgHuw6DXal1jCZrKwS6V8kkQ2xtLAzo8EXTR34DUjdfdmDz+sJohQ8 eBW7UBmmkPpmCk2EmfbNYHZxdrSpcv2q88x9udC4kCX42scT0cngYyWBY9GCP4pojHKP /Fr8IPK4oAeuWIne96SpAp4eXVpsrgduq3+8tn3fQE6g7Wo+1pkkge5dAEL/PkN5FxeX HCp6M/ZziPMdNmE+D5udWVHnKMroTwJJhwYdB8pPdU7mNcCrNWQMshKGQvfybLDr3qfX VwUQ== 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:references:cc:to:from:subject:dkim-signature; bh=++9hXaW1yvWzpNcp/WVIh8wio2o7WCdjcbsIccpDN4I=; b=OGuc/9xbXQbG6fJhQNKMfZ9N3IC2K9jUguvY35cmNOm/XvTOLXT+zg7JMByOO9CbRR osU63ZY1ngJq2lWvIYwbZzzee1yCHv803q34KgmzhNxO8LvAvEu7cmtikvXW4fb59Mbh iU5aMPijmVyElBaFqHHzvIrufdgHp6h+8BkmtI/AGh854YbQcXGZlaIQct5amHS2OGsR xgLCG2GvdAee7zjs77AwBwNn2y7BLXHtczlmH+8JuR/JdaqJCEvBCpgEwtkrBP2WU7v5 5WPVNKFVwqvDfy529yeUj2at1XCNwLaBDxDV10esFXyqTdUObCqLgaMdicyNBvXVyAfT FgUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=etyeaefE; 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 c10-v6si7202018plr.155.2018.09.29.06.25.37; Sat, 29 Sep 2018 06:25:52 -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=etyeaefE; 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 S1728274AbeI2Tx7 (ORCPT + 99 others); Sat, 29 Sep 2018 15:53:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:52698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728077AbeI2Tx6 (ORCPT ); Sat, 29 Sep 2018 15:53:58 -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 2C847206B2; Sat, 29 Sep 2018 13:25:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538227531; bh=+cJR0VnpRJ1Z59/fYsownE5L5SjIOJ4yjJVn3kbUuRw=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=etyeaefENyIx/EHTiw/FZJklDXbrdVjPNRdI9yFS/13e8BBtIKOxb8VwgnskgDyI0 hwp7eosPaWkFm4brdYgnbLBR1GHclV69L+AmnH+aISxCddFFYFu9vdu/nmGTsE7XIG b/pjW9WaJoVXtbJLFejfa3DuqRibCbDArLyiPP0o= Subject: Re: [PATCH v2] gpiolib: Show correct direction from the beginning From: Timur Tabi To: Ricardo Ribalda Delgado Cc: jhugo@codeaurora.org, swboyd@chromium.org, LKML , Linus Walleij , linux-gpio@vger.kernel.org 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> <9df3f61f-ac54-f5b1-6b86-db539e07c5bd@kernel.org> Message-ID: Date: Sat, 29 Sep 2018 08:25:30 -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: <9df3f61f-ac54-f5b1-6b86-db539e07c5bd@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/29/18 8:21 AM, Timur Tabi wrote: > >> Is it possible to access the hardware? > > Linaro and some Linux OSVs should still have systems, but I usually just > ask Jeff to test code for me. Alternatively, you can just add valid_mask support to your driver, and add a check to your get_direction() function to see if it ever is asked to access an invalid GPIO.