Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1588068imm; Fri, 28 Sep 2018 23:24:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV62DEEV/b7R7zItw451dE/JQx3XZKC9Ev8LzscCwPGIiNqNY2mEB+rWVXurG/moy4bQSo8js X-Received: by 2002:a17:902:b787:: with SMTP id e7-v6mr1769063pls.252.1538202253636; Fri, 28 Sep 2018 23:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538202253; cv=none; d=google.com; s=arc-20160816; b=pMjvtuWt2Waej04e15VuHL5olUySYRu4H5cHYQ2g1q/80NiIqjX6hf6yT/DfTyJ5vo ZZcowUjjJ1Esxp1DDR0J5oWNZlV3Fzj5U4sMZVmD6CKCip7tjCcLi5rwMbA6DTG/9ljI 24BgHhJcAG6w0C1FLBxzf8gdUZ8N96QhlKgLSbj9f+o2TUMOu0jbDHOCvR/gf+dl1pan gmR1mzxB4+h8k5qicejUpaZkhDr2GTzfMd5SBIfa8t842h8d+EPtwkdB1h7Kma8mohj9 M6onLAe8xPECCCSxFkhn0BqlENUshi8TY9prbkT3ixbCE+hASafF2lIBggRMEyd6lI5r N4Kw== 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=lBxV963YowKNHBSl/NMunB8Ge7rssnhPBxcoJQdXyRU=; b=W7SGdaJDoDHB9I1Fd0kIPk77FSSS84KQmp+fnydt+yxp42QsPy8rFCt00KO4kaf2hF LTziC14l4WwjznEyFToqc5e+/FpFmMuPMpFifxXXla3XE3zoKuVBgpyljzhLKtR/6fKb MM9UDo9IJhBaewLivrwYwADZ1/c0L11vQBHcEKAjXFt60a3SoV6OvFY0U0RMiPaDtSrR 2c4S2IHWSKt4IgsPRlRlsVVO8T9DnIQ+JLQWZaWSTYC3WXXU4nk0qwTSNTjVhpRFFcrd SHsqY6oc4Ik2udIXZGVP1P2+dxU2gQqcBAe8bT/thxGLWrmTNdjEkkJl5oF9ytXuifjf tcKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CwjN+05u; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q22-v6si5332225pgc.393.2018.09.28.23.23.58; Fri, 28 Sep 2018 23:24:13 -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=@gmail.com header.s=20161025 header.b=CwjN+05u; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727493AbeI2MvC (ORCPT + 99 others); Sat, 29 Sep 2018 08:51:02 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:37827 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727427AbeI2MvC (ORCPT ); Sat, 29 Sep 2018 08:51:02 -0400 Received: by mail-lf1-f66.google.com with SMTP id a82-v6so6523987lfa.4; Fri, 28 Sep 2018 23:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lBxV963YowKNHBSl/NMunB8Ge7rssnhPBxcoJQdXyRU=; b=CwjN+05uapvlb3cgn6isD2zWTtMymnpU2c+g6xANRjSY+tQVjSQzhJvOsxv394YGm5 mB8cl1vzx5P0wJKN3SkhImQmBvhIB2eZcinyoJisrrlKyf/YQbQXQVw+TyOlbWNRRIly vtKoeerqvUPZK1LGDZwbsTJBB4e3XMzxlx9yKBAPHmsvXz3hH6qMGKAlF+nnqFsfV+vS mG82YKYKNjkKbwIu2iR0VyipxiSclCEfNDb5bnfzrzfC3wSGv8EkrypCQQ2A9dTaWh5y DIObBLUieuLss3cP8u+t7erCNcrHLFEobuWn1jQPZBvtiGafCb1tyhUpZ4QQ08BJT9nQ AgFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lBxV963YowKNHBSl/NMunB8Ge7rssnhPBxcoJQdXyRU=; b=ddLb2VCKkPE/8ype3NJmrc4pKfP23iREFtT58uoZx5Jl84Nv9bCOGRKiO+syrN2Y3N lnG4A+PBq+fbKZycUtIfpo4JSReN58nrLR0zFHXO4DZmm6024Wc6Ul7RYdjnVSrVbWa1 VYWe+asOk/zEI8MuksZNxOdyhQrjQqEi1k3APY0AjbeRjuOWFU7UEE2KdAjzd1aE2hZp +TlpviwwAYqiSLxTGim1oqyhnpf5WFkC5/ZHlniaJMCjJeUvXqGsqqGzVKZAWHo9hhWI R5e5i2nkXf0rVFUsOnRW3KnkCeV2h2iP4m6YJ7d6g6V/kSstYTLfWmYHPV74GsZiKj0k l4LA== X-Gm-Message-State: ABuFfojsXCnI30b3QjeNIxwrbtJivyuHgztppDLvd29j4c9Ojw1rzYQE Y3RH/ISGoLtEBUv7Lu3JkvOauV7uj3mdY6KTals= X-Received: by 2002:a19:dd8a:: with SMTP id w10-v6mr874571lfi.97.1538202229888; Fri, 28 Sep 2018 23:23:49 -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: From: Ricardo Ribalda Delgado Date: Sat, 29 Sep 2018 08:23:32 +0200 Message-ID: Subject: Re: [PATCH v2] gpiolib: Show correct direction from the beginning To: timur@kernel.org Cc: jhugo@codeaurora.org, swboyd@chromium.org, LKML , Linus Walleij , linux-gpio@vger.kernel.org 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 Hi Timur In fact gpiochip_init_valid_mask is called some lines after in the same function. We could reorder the function. Would that work for you? The driver breaking is upstream? Is it possible to access the hardware? Thanks [Sorry for the two html mails in a row, I did not try to work with my phone before :) ] On Fri, Sep 28, 2018 at 9:23 PM Timur Tabi wrote: > > 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. -- Ricardo Ribalda