Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp677656imm; Fri, 5 Oct 2018 09:55:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV618fEf7YAm7TEW22okgaHrpxBlI49y1/NN5nqszS2U5ki6rVDeIRfZbxHozjp3LSvgco8sf X-Received: by 2002:a65:62d5:: with SMTP id m21-v6mr11186750pgv.243.1538758523143; Fri, 05 Oct 2018 09:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538758523; cv=none; d=google.com; s=arc-20160816; b=FVErw/kNTLzgE7RwdklycXNwTST4A8iRjI3c1N5QnITvSbqu9xDC3EwcC0X7PK43tn QP+JvkiOCcPRwLwhi5xUBLJoIBNrK+wH742J6btGNK2wxOq5fh6u7xYz+BnSPaDOWR3r jR8Gwj4YU6mslmhoLgbN55syGbyKl92MsR4PRpfG8XL1Xm3PTjIsnZaAiXbyRFTapfgO l5vC6kUxmRz4005+KDyBflKOiauGgx2ANOagYfI1TIjQa9BChdJq8vRyBr+7XJoULDAf 4dx8S59XbY9n94kggYSHay0YgBktk+Z6npVfQp/gX5TjeFwn2kP1G0/mRmrIvjpOlQZD oLZw== 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=yDR6l7zL75EU59CqmFYRTP8JmQmLc72WTh5+Eku9XCY=; b=hg9GQ6RSxbnFX7+exDkDw3mhJ8TzCSD05S3U6MnTCfStG35lkIVrnbAIhV0ArmaI9a B9O7FbCt+uYFskHK2zoVMCuWyKOtAtiBquz9VnUYHfX84QrrRWbRaXHDLqlfSeMcOrud SV8TW5b4zbqRLviGzLm6isyiHdmCUQFjobkwXnmFngMdIMvsyhomkzcr6r2Eq1Vj7+JA D/K/kd2+7vQyZWBeq14/MExCX1IhUvSGgAYqFecNZ05v8m4rKRa7LAItIDqzfoV2UOjy jMdYfeNHeNsnh8XwJ8fdgcoyZUI3UZs87OgsBvI2sVuRyuklu1RRnO7lSrLLuKzbM/ew rfgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="P1wGc/3O"; 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 h11-v6si7733545pgi.241.2018.10.05.09.55.07; Fri, 05 Oct 2018 09:55:23 -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="P1wGc/3O"; 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 S1728630AbeJEXyO (ORCPT + 99 others); Fri, 5 Oct 2018 19:54:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:37112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbeJEXyO (ORCPT ); Fri, 5 Oct 2018 19:54:14 -0400 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (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 614AE2098A; Fri, 5 Oct 2018 16:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538758481; bh=YKij32Qs7N10hpTTQO/qICFK6FswWYMCh1aT+XaWnFI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=P1wGc/3Oy1ZdY8jdX1lnaFLHmduwO2CjVC/WXC6++Qk5XhMXm+hx460d4QizDpj/+ Bfx7tw65Bt4Q9VXEWX8HkUa8pDyy4KM/37GeMZ/cBFtDv7VdSoXNiR2DTQG+mwjkOT rI205RRpPbJIqcIwTEvgrouCRRyoTaYOHcYntT4k= Received: by mail-oi1-f170.google.com with SMTP id w81-v6so10919509oiw.9; Fri, 05 Oct 2018 09:54:41 -0700 (PDT) X-Gm-Message-State: ABuFfojV5/5XAJkSSuT+2fpvHG5YrZR02jIJrp4alifYecYN6hJIYTFl 1Gf5tnc0RpC0RwyHLl3WeXJWH3mDD45MmstYym0= X-Received: by 2002:aca:e804:: with SMTP id f4-v6mr6145023oih.38.1538758480634; Fri, 05 Oct 2018 09:54:40 -0700 (PDT) MIME-Version: 1.0 References: <20181005065300.22882-1-ricardo.ribalda@gmail.com> <20181005065300.22882-3-ricardo.ribalda@gmail.com> <8d10f9b4-7ea9-7d27-478a-39982ba49587@codeaurora.org> In-Reply-To: <8d10f9b4-7ea9-7d27-478a-39982ba49587@codeaurora.org> From: Timur Tabi Date: Fri, 5 Oct 2018 11:54:03 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 3/3] gpiolib: Show correct direction from the beginning To: Jeffrey Hugo Cc: Ricardo Ribalda Delgado , Linus , Timur Tabi , Stephen Boyd , linux-gpio , lkml 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 10/05/2018 11:17 AM, Jeffrey Hugo wrote:> > Looks like the driver is initing just fine to me. Is setting up the > jumpers and running gpio-test warranted? Well, that test only makes sure that input/output is actually working on the hardware level, but it also makes sure that the GPIOs are numbered correctly. If you want, just put a printk(... offset) in msm_gpio_get() and read from a GPIO that you know you have access to, and make sure the 'offset' is correct. Then try reading from a GPIO that you don't have access to, and make sure you get a failure before msm_gpio_get() is called.