Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp465518imm; Wed, 19 Sep 2018 01:40:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYoT4ljsdLC7WwIpU+HSFJWFwOAPJkJSBXP5Q1lfSAmHOvdA7JJeU0ZL4rWuhb+CpAgih9g X-Received: by 2002:a62:cc41:: with SMTP id a62-v6mr34884605pfg.131.1537346450314; Wed, 19 Sep 2018 01:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537346450; cv=none; d=google.com; s=arc-20160816; b=0xZX3u8cFVHBgZlZ7UQB8fr85XHmnpM82I9IVoVNslB36cJcdfo/wpa5J1H8CXpsAM CTw82s4+bOLIg7LOz75Tz9BQW2d9VpSDAwU017uw7AgPjs+jziBloIEco6tfURVSwwTN l2Mfz2AHhn1kyp41tdDuMAGWA88DJfND+pL6f8Yosl9TJhkYkdevO3G9MP/dKuQgpmQd a7ktDna56lK/PMIxcY+liUJr++h0vhNe2j2euBisdKVCI4cibx1rrRfXzrsWxSeY5pFD vxC783ZG0BrrORo1+whmvCl0ovmv68uImtyukSJ3UjZMFXmOAaE8EhEj/SHwbUYNkHvn 3qcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cAIIu8hAcK2TvAm38tKljakj7M0WC2Gfvm2CAe/Ljwc=; b=W1ij3T7znpALI54UkMBtGweukLC1AdGN/XsvePe27i6NRYUqYBg8suwvMybeDgMSHS wqLsPTf3/5Gh14gKlofOaXgGhsBfmSYb5K+al5ZC/3sCSsq4Crlcb46XTxf3DaODgjlh CuhkcbZiWoIv2jhNgxwu7UTQZFsaLMt20DkWI+WwePFt0ErbIwHkCFqPOM59rV3fRLvk Qq4QFuVwAAKsrPkiJ6qgQnYPZ1zxostQBJvoF3o097U5Q0gzPXbPO2v4pYvySp9ZsObL icnCQZBjL0x72d/hPMj3bCmy639aYjKhH3Z57KnHFh8U3PeIQUgrahFWnRpx0vUsT8wb MbdQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2-v6si20366433pgj.391.2018.09.19.01.40.04; Wed, 19 Sep 2018 01:40:50 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730987AbeISOQc (ORCPT + 99 others); Wed, 19 Sep 2018 10:16:32 -0400 Received: from mga03.intel.com ([134.134.136.65]:39493 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726972AbeISOQb (ORCPT ); Wed, 19 Sep 2018 10:16:31 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2018 01:39:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,393,1531810800"; d="scan'208";a="75530286" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by orsmga006.jf.intel.com with SMTP; 19 Sep 2018 01:36:13 -0700 Received: by lahna (sSMTP sendmail emulation); Wed, 19 Sep 2018 11:36:12 +0300 Date: Wed, 19 Sep 2018 11:36:12 +0300 From: Mika Westerberg To: Rajat Jain Cc: Andy Shevchenko , Linus Walleij , casey.g.bowman@intel.com, "Atwood, Matthew S" , linux-gpio@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH] pinctrl: intel: Do pin translation in other GPIO operations as well Message-ID: <20180919083612.GQ14465@lahna.fi.intel.com> References: <20180918153621.71984-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 18, 2018 at 03:04:23PM -0700, Rajat Jain wrote: > On Tue, Sep 18, 2018 at 8:36 AM Mika Westerberg > wrote: > > > > For some reason I thought GPIOLIB handles translation from GPIO ranges > > to pinctrl pins but it turns out not to be the case. This means that > > when GPIOs operations are performed for a pin controller having a custom > > GPIO base such as Cannon Lake and Ice Lake incorrect pin number gets > > used internally. > > > > Fix this in the same way we did for lock/unlock IRQ operations and > > translate the GPIO number to pin before using it. > > > > Fixes: a60eac3239f0 ("pinctrl: intel: Allow custom GPIO base for pad groups") > > Reported-by: Rajat Jain > > Signed-off-by: Mika Westerberg > > Tested-by: Rajat Jain > > This has fixed the issue for me. Thanks for testing! > One question, may not be related: I see this line in my logs everytime > I export a pin (GPIO40 = pin 16 in this case). Is that an indication > of a problem? > > "gpio gpiochip0: Persistence not supported for GPIO 40" It seems to be debug print if the underlying GPIO chip does not support PIN_CONFIG_PERSIST_STATE (pinctrl-intel.c does not). I would not worry about it.