Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1938406imm; Thu, 20 Sep 2018 05:25:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYuAVYo/k3f6RaTnguIjK2HfdIGKU4mfEP0T+0G8UGwbb3N1hxgb80SFY+vxmzVgFxKX0sX X-Received: by 2002:a63:9619:: with SMTP id c25-v6mr37279219pge.23.1537446341222; Thu, 20 Sep 2018 05:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537446341; cv=none; d=google.com; s=arc-20160816; b=OH2PytjdMa7RMjiE6B3ByjuguUXAZradjJAY73Iv8bnKeccH2WQmD0xf2SzqhASN/u YPhmMre0hmW3mJtCGNX9RRyjD7kZ8rqRBGl2vATY/k7oZ2/MObYdCTUjRnuHLymXF/YM 8uX++b8DPtKQPjsb1HQry5DS47v2+jyraA02ZO8qSzfaIXqzTZNMp4u7GSN/9xIJ4QD4 WpChx2JLnCo9qBmMJS/00OtMwUMcgs2V70XTnr+0L70LY5+8e3HVCi5siOnzMhm+12ow bGL7VypqDGRI2D2CCqzknl3Sp3hqQkgm9MiT7gq1y139X/ipHPMmfNRblvZ/PsUjieif LNoA== 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=8wp5c5Js2KTMo0WUTUau47NAOhm5iurVb74TfOQL/Ng=; b=qZ1wUzlVUj5SpyjUj62bGiXX/AOyi2TzW3Ak5HYIGAt4Axrm1nHrc0I0enFeulytA5 XKC9/+QhKLYVlNK/0YgZsj8QqiJZ37sS5620kQcE+J8fwgqk2oJp0N+6x8QDN9ecFDj5 fWd8yare7PeK56pLwsXln/GaSSIyzMNP1epHBtWBHQhg2hRLCGeEMtMSG2j18dytJtjl yfa0AXhTwR5qK4JdjmEgaKUJsJDiU/OWdsdL5co5qcZZl4SfpW0eu9tTErGrKnzyTpWh KjpSifciZtPKxZwefJePRwrrWbQBpPf/bYWPGICxbGq00xE3afZED2bSaUQDybx4RbO7 Nu0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DMvpEBva; 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 t1-v6si23732049plb.177.2018.09.20.05.25.24; Thu, 20 Sep 2018 05:25:41 -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=DMvpEBva; 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 S1732584AbeITSIf (ORCPT + 99 others); Thu, 20 Sep 2018 14:08:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:45024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726177AbeITSIe (ORCPT ); Thu, 20 Sep 2018 14:08:34 -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 504A420671; Thu, 20 Sep 2018 12:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537446319; bh=U73pkOvAPrx9zmElSX46ox5xEYNnNYQ/PvD0oI91cqI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=DMvpEBva+wuyP4WplUbpyZuNVpC1QohEQ510WFUjKZtaEiaOqCFDBBam2RWcuvILe AyCG1L09lF6he1+WBme1AFSZ0y6/f0Ej1GimrBZ7fACYDF8Kpn/YOybxRZ7pz+G9mh JNf0d5xU8LZUUlFeptI3k5NshbbDHmMVEFwphl1M= Subject: Re: [PATCH] gpiolib: Show correct direction from the beginning To: Ricardo Ribalda Delgado Cc: Linus Walleij , swboyd@chromium.org, linux-gpio@vger.kernel.org, LKML 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:25:17 -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/19/18 10:27 AM, Ricardo Ribalda Delgado wrote: > "The get_direction callback normally triggers > a read/write to hardware, but we shouldn't be touching the hardware > for an individual GPIO until after it's been properly claimed." is > an statement specific for your platform That is definitely not true. > and should be fixed in your > driver. There is no bug in my driver. The driver reports only a subset of the GPIOs, because that's all that are available. Attempting to access an invalid GPIO generates an XPU violation. The original code was attempting to access GPIOs that the driver said don't exist. The code that we have today is the result of months of discussion, negotiation, and trial-and-error.