Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1122548imm; Fri, 28 Sep 2018 12:23:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV63q5q55pF5sOlDmbMNV2Va2vDBjyVS/SjuOQzpJMveOvltpVQpc+46iMxfUK1t1VEJ5/q2n X-Received: by 2002:a65:6249:: with SMTP id q9-v6mr49386pgv.392.1538162625443; Fri, 28 Sep 2018 12:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538162625; cv=none; d=google.com; s=arc-20160816; b=i/ogoBvlvwvDlKCaapG7Acx+NINoEQJ0nTUSFyZ3a2YHKlUkN8Ldh3CFxI+RQ13Nrm jGQeTBW71qY1LAK/xbVlngpIJ0c/+7alS1wAvzdtOHLDmKi3GWKv0/Q0m4AO7eqTgVgJ 6fGIvL6EsxmCE+OOURcO2OvEajmgjn1Hi+AHDfi60EWYljWxsbF+vhRoesA8NXSGwfEj oh1hknJhwLNNiKSSvbahEmgXi/J6dYs6hfReZx8lxoxagtE29jZHoVCttF+Idpig+Hlz FHcf+tNAhg5D+bGwgCrfiSm5OLY6P5yRg84TGFfgl+pqw15zdkdFIKanZKeaTyNy6pZx aZ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fPPFjXHt+FRiG3ZWgpW1l9YkT08JmEFN9NN3i/gnEGg=; b=ma9Ytb5Q11a5/rBgr+N+n5WyYhG7P8CoxNZPzR6+KAt9sDI9lpMmhYMPkHgWK/eoWe +/ZJbRIapU9eIgD5x5XyrzRSpO8hzkVXwuMwZHZz5xrgHHsNqHSEuduDcnYjAWkxMkFx yomRelLcbciEfAdo5B2mXFKUMuLexRB9s4V/ptdvoMGaLVtJvpjw4Ftj1Uxbf9ZhuNMF q5PUr1tF8Dr9IIctkVgV/xFCAdrUgKfZyEYoxOs5BKwqTbHjCMaukD8m3Crwqo1v1uAZ dvzQ7abHw7fqvNG6wU7m1pW3RWc/9SjG2sXS0nivnyiwazS6PQJyMxqngPEDQ19SKpc6 Cs2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RGFbDKuv; 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 c12-v6si1033078pgj.70.2018.09.28.12.23.30; Fri, 28 Sep 2018 12:23:45 -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=RGFbDKuv; 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 S1726496AbeI2Bsh (ORCPT + 99 others); Fri, 28 Sep 2018 21:48:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:59040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbeI2Bsh (ORCPT ); Fri, 28 Sep 2018 21:48:37 -0400 Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (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 3488C206B2; Fri, 28 Sep 2018 19:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538162605; bh=YMvozbtkC/oW1nUWRK3qqS7vmZC2HjGwzNVE4ZzZq9g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RGFbDKuv7E8FLrsH32OAT/BKOREUQuxV0O27XZnFOhvN4AukrHKBYpBJinAaUWde4 OMD97H7wwhei10gSj57Ja7YnD297ytyxJ3Uz+svd1TK96bsutyfWrfJKEX+CPUiHMy s/YkuAP//vsyBGbpzivySZh87YBghMtOkfb5Jacc= Received: by mail-ot1-f52.google.com with SMTP id b43-v6so2644032otd.12; Fri, 28 Sep 2018 12:23:25 -0700 (PDT) X-Gm-Message-State: ABuFfogd2JOxDAF84nB2yLMCRttkIJHT9xUqpwL3J3jaD4tvIeIObLWV Pa+BxDOTQzznKtjaZ+Gw3gCHHEq4GrhL1epB9Tg= X-Received: by 2002:a9d:4e10:: with SMTP id p16-v6mr21623otf.131.1538162604517; Fri, 28 Sep 2018 12:23:24 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <5aea282d-6fc9-cd70-cec4-10f28aa819b9@codeaurora.org> From: Timur Tabi Date: Fri, 28 Sep 2018 14:22:46 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] gpiolib: Show correct direction from the beginning To: Jeffrey Hugo Cc: Timur Tabi , Stephen Boyd , lkml , Linus , ricardo.ribalda@gmail.com, linux-gpio Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 28, 2018 at 2:14 PM Jeffrey Hugo wrote: > Nack. Causes a XPU violation to the GPIO config registers. That doesn't surprise me at all. I believe that the problem is that gpiochip_line_is_valid() is being called before gpiochip_irqchip_init_valid_mask() is called, which means that gpiochip_line_is_valid() always returns true.