Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1892417pxb; Mon, 8 Mar 2021 08:49:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvtYXmrvTOf4sdgNYuuwakIR9OmgqK7FSD062on795SiTHFdBVqW9XNBM0hKG5fUNmj6AM X-Received: by 2002:a17:906:a51:: with SMTP id x17mr16027792ejf.25.1615222146176; Mon, 08 Mar 2021 08:49:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615222146; cv=none; d=google.com; s=arc-20160816; b=nZJKAty5n5tyvPBNXOQcC0bHhPLW8Om9SBOrCG75qfv0VmCcgq1TJCFZhILC+IbXOL vPw7l+Dn1sJ5yzVM87bUZxF2qxZaef7OHBbFk07+i3zTuDaVYQYvgyD9DX00mbj/NZXw Yo43lqt00nOiEtJFXSA9l5KvdxTCy6xNGYhx2nT4nUAEIyHfhNoax6baTA7RTGhawHZp +jaVNNY3pj/UckmtJdLq9eb/eMLfuP3EZw+Xcr8ya7ad0GNZw6zEWnf4iIKi1+IeBDUg cEXuElIgcXogBIsh/yDLmZH/XJOAXl7kQTeOUC4BX1pGlT5LEOeQlIY8cfOSwd9Zfrnv kojw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=s/4y/N4tiSOfRSLnm93GupMk7xB65LEXVHEzUXVbch8=; b=uYqXiwfL8NckhV8tZpV1b1sKCuwDs/w5SNf8RhZh2cbWyZkv8xm+CqNcmujVv8cwYs Lp8xmmrBrYKaUKh6WszgUCTavautk8tmBH9ZwvYyOOwaVD4Qd+czUB3qrFnHQ7TRLN2T CXN10RdMEE98OgMLkbWi0fF9hdHq9Fx9eGI6s4LKqGnNC6ldwC9Nap0RRvHr4RvB1QdO 7IPkxI9sLvlbKXh28vskj/Fqt6S1yp0/K49oalCCcGAz6yY55zsNCN5pj778enacFXuK vok/hjso8IT96R/Kh71df4Den2Hofx6mdXGUXEQ2OHYha7nf8I7pJsZLGiSp9txy6/6B vQ0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jycUwjn/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id j13si7401992edn.369.2021.03.08.08.48.43; Mon, 08 Mar 2021 08:49:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jycUwjn/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229757AbhCHQrq (ORCPT + 99 others); Mon, 8 Mar 2021 11:47:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230184AbhCHQrW (ORCPT ); Mon, 8 Mar 2021 11:47:22 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B471FC06174A; Mon, 8 Mar 2021 08:47:21 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id v13so15691658edw.9; Mon, 08 Mar 2021 08:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=s/4y/N4tiSOfRSLnm93GupMk7xB65LEXVHEzUXVbch8=; b=jycUwjn/rNVqdo+F+mFlHiH3/Two2UJRg/ngexFQS+Gb5MITs4TfLxsAae8KmEEMzF gXg4X5pdwHpN9oOiqJQjdDfBBed+gWi3ksJ1SWf6x1oy2gP1zNfYWO1Hfy1G9QVPEeX8 MES7AZNYV8jwJjBWPDt63eCelzW5EVSP/orDGn1Ngh2ShLXaxzl07jrSrkT16M778yk+ VMo+wJkpoNkXalmucTuq97BM7ujnbL58742KimqkMgry7pgo1z4zNhYlZawVBlw0pz0N /TLIhV5uiRUKq1Hns8/lVoPC8ew3Ou64/1qL01jVtSTRr4KodtVNSQZedxA3RuO9YvqH 8XWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s/4y/N4tiSOfRSLnm93GupMk7xB65LEXVHEzUXVbch8=; b=j2FDpdUhwwNxej3Hcqjf1XJLw4tt28JkARVqABKFbtWX/jZkoxLFiA4kuzr3lwYCa/ 3LRabprU0wqTr+k3BN6LQQ0YMAjt787lVIQGKnyoaQMwFfSl6t9diU4ng4tXPFgiHqAB JEgcHmSmnz6A1cfNr8qP3UQs/RL0F5tpsh9RjmmFzVgvfjdhztn8cn4PnxzMbn8f34PK xtYT0BFRVBd6AXSI8xnzplGzVG7BZO844Ed7s7n26Nedl3BrWv+7mlCBc/H1BvyulwGH S+fHiQQ9DGFZSOkzGLh7EDAvXf5RWsv9wk11iwTyfo95OcVmw+QczE1crLpUQd9x8/SZ 8vzQ== X-Gm-Message-State: AOAM533uAsy+/+JFJ1Tsk0KkDaQcn6AoGkzg14t0fp2fjjFe7+qqfp/v y+J0vKXM1J+B02cDtn2ABSIDsE+cOKuXPw== X-Received: by 2002:a05:6402:19a:: with SMTP id r26mr9790140edv.44.1615222040232; Mon, 08 Mar 2021 08:47:20 -0800 (PST) Received: from [10.17.0.16] ([37.58.58.229]) by smtp.gmail.com with ESMTPSA id v9sm6810333ejd.92.2021.03.08.08.47.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Mar 2021 08:47:19 -0800 (PST) Subject: Re: [PATCH] Revert "pinctrl: intel: Split intel_pinctrl_add_padgroups() for better maintenance" To: Andy Shevchenko Cc: Andy Shevchenko , Mika Westerberg , Linus Walleij , Daniel Scally , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List References: <20210308152505.3762055-1-luzmaximilian@gmail.com> <241a8d75-c0d7-0045-49ee-22072e8588b8@gmail.com> From: Maximilian Luz Message-ID: <3109f0b1-a47d-47e8-cd9c-ac47d8364761@gmail.com> Date: Mon, 8 Mar 2021 17:47:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/8/21 5:46 PM, Andy Shevchenko wrote: > On Mon, Mar 8, 2021 at 6:44 PM Maximilian Luz wrote: >> On 3/8/21 5:31 PM, Andy Shevchenko wrote: >>> On Mon, Mar 08, 2021 at 05:35:59PM +0200, Andy Shevchenko wrote: >>>> On Mon, Mar 08, 2021 at 04:25:05PM +0100, Maximilian Luz wrote: >>>>> Following commit 036e126c72eb ("pinctrl: intel: Split >>>>> intel_pinctrl_add_padgroups() for better maintenance"), >>>>> gpiochip_get_desc() is broken on some Kaby Lake R devices (specifically >>>>> a Microsoft Surface Book 2), returning -EINVAL for GPIOs that in reality >>>>> should be there (they are defined in ACPI and have been accessible >>>>> previously). Due to this, gpiod_get() fails with -ENOENT. >>>>> >>>>> Reverting this commit fixes that issue and the GPIOs in question are >>>>> accessible again. >>>> >>>> I would like to have more information. >>>> Can you enable PINCTRL and GPIO debug options in the kernel, and show dmesg >>>> output (when kernel command line has 'ignore_loglevel' option) for both working >>>> and non-working cases? >>>> >>>> Also if it's possible to have DSDT.dsl of the device in question along with >>>> output of `grep -H 15 /sys/bus/acpi/devices/*/status`. >>>> >>>>> There is probably a better option than straight up reverting this, so >>>>> consider this more of a bug-report. >>>> >>>> Indeed. >>> >>> >>> Can you test if the below helps (probably you have to apply it by editing >>> the file manually): >>> >>> --- a/drivers/pinctrl/intel/pinctrl-intel.c >>> +++ b/drivers/pinctrl/intel/pinctrl-intel.c >>> @@ -1392,6 +1392,7 @@ static int intel_pinctrl_add_padgroups_by_size(struct intel_pinctrl *pctrl, >>> gpps[i].size = min(gpp_size, npins); >>> npins -= gpps[i].size; >>> >>> + gpps[i].gpio_base = gpps[i].base; >>> gpps[i].padown_num = padown_num; >>> >>> >> >> That does fix the issue! Thanks for the fast response and fix! > > I'm about to send the formal patch. I will add the > Reported-and-tested-by tag if you are okay with it. > Sure thing. Thanks, Max