Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1890278pxb; Mon, 8 Mar 2021 08:45:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvPHppGE6EcBp6aZ/4ktGdxgm9ZUUcmsvleEU0WH2xNKusgQKgvespZGEFgyya0KwKXOOe X-Received: by 2002:a50:fe08:: with SMTP id f8mr22846491edt.217.1615221951825; Mon, 08 Mar 2021 08:45:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615221951; cv=none; d=google.com; s=arc-20160816; b=qYZcy+5cqWgDixfr5LQCVQ547Qpedyofkv6Su5qIQB8CbHUSuhunMlsm5KMLi3iNTx pt7gSUwzy3m/ciRHdAwX4MsjJ7foLAHe1rK7NH7nMA5Apje5dyRNj9JGxraeLFCpcALR U+z5ylmU53aej42HdITEQV7XA2OniJMdqGgmOJjvP/94pNYFVeaUUmwNF3o4RExn5H+2 xZlz79jDAbEIi3HpJkcFIeYePYVfohNOhlgIvSKGCDVOh1YTklbXKbJNXaLx3u1jZ3Gn nuKGww/On18CqUufSfFP4Coiimeo5tBqqc5Cd/tB5dHcL06nohhtScAdEiO20/zvWdwR Uy5A== 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=iGxmjsIAakhmO1Hbo5Yb6Y5dOSTb27I2CbUQX1758Ts=; b=AfO+CG3s6jMfJrbwuh8e2TCTeVP4sbNKiz5E7E10/VmM9ASgqzv8Y6lNGEYekstVRX /44uQI4QEXEohVJMK+quBUQh5b88oDU7YmLdv46IbOoLAmVHKnjLY0N5t+i73y+k2B+D xbguRdHSivm4IfiJPgRbbrSQFQ2PO3/OvPkRCiEVVVTBjK9r9AxWNnyQUNMCUV45CgVW vRgx2+6ouJRQAVOM594zcjRXT8mEbbJXcZ7ivYU9k7sewE5KH4i9lJIj1HkwRmpg7m8c iuQTGu7GcJoKYLAGOWIwR/V6rsx2oL0Ez09Z8R0Ok5lRJUCUeyqxOZYwy5BgWZSUyad6 q5/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ry1e2Rf3; 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 do3si6993009ejc.486.2021.03.08.08.45.19; Mon, 08 Mar 2021 08:45:51 -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=Ry1e2Rf3; 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 S229757AbhCHQn7 (ORCPT + 99 others); Mon, 8 Mar 2021 11:43:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbhCHQne (ORCPT ); Mon, 8 Mar 2021 11:43:34 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A41ACC06174A; Mon, 8 Mar 2021 08:43:33 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id v13so15674127edw.9; Mon, 08 Mar 2021 08:43:33 -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=iGxmjsIAakhmO1Hbo5Yb6Y5dOSTb27I2CbUQX1758Ts=; b=Ry1e2Rf3a8g1vzMPXYIQOL1BU6bl/06FtiosR2eBVJYYK5QQY6rQ7fvlCXq0TXLvUR 7//Oo2Myji89onUWloaBWZN94O+lgV0bZdybia5Y+dO9BKQQxbgQ+1sBWjFuZqU4xkKe LOzsJqtee1cDZg/k2Df4IfIJkpa6Nwo0/aeZvxpFAGhk2z9jXEt3gi8DAmgoq2BZDWc+ L8Ch1vH90jo+ewcYvFKQ6OHqH1zXI1guRj8aGbzCABKYJzwsGNhNxZ5lmK1cmboKTYZD ynIHrDLvmFaV24lAa+tHswN+8plMdXr0x6o4qZp0j7MQeI4/v6TQnKL5X5RQASHMnz2K 7odQ== 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=iGxmjsIAakhmO1Hbo5Yb6Y5dOSTb27I2CbUQX1758Ts=; b=Sr4xjs2pq2cHhLQsozqgQgU39gvBBd0hsJ3JEtos++yxq8OvdbPBDeIcLmolyapsa4 yJA8d8b4ToWEgIYAHlFhEY0zXdRMGjfrWCUyMUUWQIqsMr5StpF1NhcT9XlZv4LZ6ISI xfKCH57a/1tf3jJo5aTwyCdRV8NPR4od15gyeU9lvNd6qRz4xLtTU3TbQJbgvChXDwQ+ fs7tgZVe/pBhVrjXDadW5qxqPwTi3ScINol7dLY8SSm2W0n25/u9yFvew3OWUJGjP8ge l9cC3S2YRU4c5KBpUfFBMkCUy1BGFzCZjEMuAhRG+1HuavY4d5YwHDhOIvUboD6/DcST ykOw== X-Gm-Message-State: AOAM532Cu0Ezhla4p3z27nVT7P1eg444kZOcYtj+TRqNzepGuDl3xX/0 8Gxn7OlCEPQhbp281Rz/KgXIF1UtXKBKvQ== X-Received: by 2002:a50:fc94:: with SMTP id f20mr23166663edq.370.1615221812090; Mon, 08 Mar 2021 08:43:32 -0800 (PST) Received: from [10.17.0.16] ([37.58.58.229]) by smtp.gmail.com with ESMTPSA id l1sm6764823eje.12.2021.03.08.08.43.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Mar 2021 08:43:31 -0800 (PST) Subject: Re: [PATCH] Revert "pinctrl: intel: Split intel_pinctrl_add_padgroups() for better maintenance" To: Andy Shevchenko Cc: Mika Westerberg , Linus Walleij , Daniel Scally , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210308152505.3762055-1-luzmaximilian@gmail.com> From: Maximilian Luz Message-ID: <241a8d75-c0d7-0045-49ee-22072e8588b8@gmail.com> Date: Mon, 8 Mar 2021 17:43:30 +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: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! Regards, Max