Message ID | 20230309-fix-acpi-gpio-v1-1-b392d225efe8@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp300719wrd; Thu, 9 Mar 2023 05:53:49 -0800 (PST) X-Google-Smtp-Source: AK7set9KIOSA6842KJqcOLblHT9v3oyO5wzln5N4cyqaTA2HJvR+wcFNlSrRYPvERseL6IaKJFrb X-Received: by 2002:a05:6a20:3d87:b0:d0:212d:ead0 with SMTP id s7-20020a056a203d8700b000d0212dead0mr10956429pzi.26.1678370028935; Thu, 09 Mar 2023 05:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678370028; cv=none; d=google.com; s=arc-20160816; b=WDS5Bv6AaMeiRhed3IuIWhaw9PPkrT1C2u3pv/AevHGZZy/SKFRpN9i0g9C+I+f+rj t8rQGHob9fTrFoAxSvSd9u6NFnjbcbqRv10ez7OVGYytdx4IWWy5KhFL3/fmyvF0HbO9 vfdUY6q7PYwpxWlRMjRSvR4morh3b20dTgZIrLrYCfKlW0jwaQn7UYUbO/t3ZddYuU6F Mfhj8yb851M11910x+b7Wn8RaobMREfMYcKEvwJu/tRi5UPL+ug3iTIqp8bbdXOgzEwB VLjqSBTx/x6fQ+K068xOcGLIhwYUzBUXUBspY05mz4/uAuIE+gJ8DJImjqp79fB/LsMp liiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=OJclciNwKVwJw6IIzt5prbM3eWs+xgxvHsGVYny+uR0=; b=rbc6WCdZ7QkCK4cjJ/1KGhFYyltx+72fWbqKi4yihG5gQyAq5KMs7F+Zy3Nx1cgrFp JiXwMpgG0vCQ8ByrOOMIeK1BtmpC6J31mks3J4lZ5h6pfdwlgiBUcNkflHsI4LXnxSQW 8yGcL+uMioxGtLjZtzk7EcyI4NFSDXnlCJcoT+//07TxKDOEJ/bDoRYCLOcPt4BK7s/T layKPmQsedvxwj693MdJhS3/WUVml1QicM0p/8EmWlSLuI1UZPcAdVEiWqT2aIj326rG pCXZfeJR2/lK9YFt3FcpPwQ68Ctq4fLkk40pJEvKEAV++YnhbHAtDmMV2NrzlhLs7xIu 6TjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=axLY14E3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p6-20020a63f446000000b004fb98a13f1csi17148077pgk.140.2023.03.09.05.53.33; Thu, 09 Mar 2023 05:53:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=axLY14E3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbjCINmO (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Thu, 9 Mar 2023 08:42:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230440AbjCINmC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Mar 2023 08:42:02 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69461ED6B4 for <linux-kernel@vger.kernel.org>; Thu, 9 Mar 2023 05:41:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678369269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OJclciNwKVwJw6IIzt5prbM3eWs+xgxvHsGVYny+uR0=; b=axLY14E352wwMGB7hnwFj+YWeu5Oq6ZoBkwkHjYtyaciJgn2UPlCOnkabQpOSTYS0UZYiD Gpj71aasmTwR7T28RS+Xg4PM1O6826I8hzARO7VH1rPd8wW6h4SHglTrYxmuBJ8rrLnIUN dX0e8mTjhsNfuUn03bSj+wvuFG567jk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-391-8quo7QNoMjGx7a4H28IlRQ-1; Thu, 09 Mar 2023 08:41:06 -0500 X-MC-Unique: 8quo7QNoMjGx7a4H28IlRQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C2841857A84; Thu, 9 Mar 2023 13:41:05 +0000 (UTC) Received: from xps-13.local (unknown [10.39.194.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DB77C15BA0; Thu, 9 Mar 2023 13:41:04 +0000 (UTC) From: Benjamin Tissoires <benjamin.tissoires@redhat.com> Date: Thu, 09 Mar 2023 14:40:51 +0100 Subject: [PATCH] gpiolib: acpi: use the fwnode in acpi_gpiochip_find() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230309-fix-acpi-gpio-v1-1-b392d225efe8@redhat.com> X-B4-Tracking: v=1; b=H4sIAOPhCWQC/x3NQQqDMBCF4avIrB1IE6HUqxQXk3TUWRjDjEghe PfGLn8eH6+CsQobjF0F5VNM9tzi0XeQVsoLo3xag3c+uOBeOMsXKRXBpciOFD3NIQwDPyM0E8k Yo1JO6602soP1Hopyk/+j93RdP0HQIKx4AAAA To: Mika Westerberg <mika.westerberg@linux.intel.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl> Cc: Daniel Kaehn <kaehndan@gmail.com>, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires <benjamin.tissoires@redhat.com> X-Developer-Signature: v=1; a=ed25519-sha256; t=1678369264; l=2531; i=benjamin.tissoires@redhat.com; s=20230215; h=from:subject:message-id; bh=XR4WGpf39AuZ6vh9qE6GCktK9QBOCoYIsi5+VzFHgXA=; b=JRt/hGs0iewIH7p/jE1XmlWVicVopazOpWn0zmGWmHFgOlpdGeudrtsopI/xAXi0MBVDKA5vj MNYxPdZ5776C1wKGq3pddnc6qY1/S+PAa36wOKrywqL3BolLEAFwlvp X-Developer-Key: i=benjamin.tissoires@redhat.com; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759898531329511957?= X-GMAIL-MSGID: =?utf-8?q?1759898531329511957?= |
Series |
gpiolib: acpi: use the fwnode in acpi_gpiochip_find()
|
|
Commit Message
Benjamin Tissoires
March 9, 2023, 1:40 p.m. UTC
While trying to set up an SSDT override for a USB-2-I2C chip [0],
I realized that the function acpi_gpiochip_find() was using the parent
of the gpio_chip to do the ACPI matching.
This works fine on my icelake laptop because AFAICT, the DSDT presents
the PCI device INT3455 as the "Device (GPI0)", but is in fact handled
by the pinctrl driver in Linux.
The pinctrl driver then creates a gpio_chip device. This means that the
gc->parent device in that case is the GPI0 device from ACPI and everything
works.
However, in the hid-cp2112 case, the parent is the USB device, and the
gpio_chip is directly under that USB device. Which means that in this case
gc->parent points at the USB device, and so we can not do an ACPI match
towards the GPIO device.
I think it is safe to resolve the ACPI matching through the fwnode
because when we call gpiochip_add_data(), the first thing it does is
setting a proper gc->fwnode: if it is not there, it borrows the fwnode
of the parent.
So in my icelake case, gc->fwnode is the one from the parent, meaning
that the ACPI handle we will get is the one from the GPI0 in the DSDT
(the pincrtl one). And in the hid-cp2112 case, we get the actual
fwnode from the gpiochip we created in the HID device, making it working.
Link: https://lore.kernel.org/linux-input/20230227140758.1575-1-kaehndan@gmail.com/T/#m592f18081ef3b95b618694a612ff864420c5aaf3 [0]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
Hi,
As mentioned on the commit, I believe there is a bug on
the gpiolib-acpi matching. It relies on the parent of the gpiochip
when it should IMO trust the fwnode that was given to it.
Tested on both the hid-cp2112 I am refering in the commit
description and my XPS on Intel Icelake.
Cheers,
Benjamin
---
drivers/gpio/gpiolib-acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
base-commit: 6c71297eaf713ece684a367ce9aff06069d715b9
change-id: 20230309-fix-acpi-gpio-ab2af3344e7b
Best regards,
Comments
On Thu, Mar 09, 2023 at 02:40:51PM +0100, Benjamin Tissoires wrote: > While trying to set up an SSDT override for a USB-2-I2C chip [0], > I realized that the function acpi_gpiochip_find() was using the parent > of the gpio_chip to do the ACPI matching. > > This works fine on my icelake laptop because AFAICT, the DSDT presents Ice Lake > the PCI device INT3455 as the "Device (GPI0)", but is in fact handled > by the pinctrl driver in Linux. > The pinctrl driver then creates a gpio_chip device. This means that the > gc->parent device in that case is the GPI0 device from ACPI and everything > works. > > However, in the hid-cp2112 case, the parent is the USB device, and the > gpio_chip is directly under that USB device. Which means that in this case > gc->parent points at the USB device, and so we can not do an ACPI match > towards the GPIO device. > > I think it is safe to resolve the ACPI matching through the fwnode > because when we call gpiochip_add_data(), the first thing it does is > setting a proper gc->fwnode: if it is not there, it borrows the fwnode > of the parent. > > So in my icelake case, gc->fwnode is the one from the parent, meaning Ice Lake > that the ACPI handle we will get is the one from the GPI0 in the DSDT > (the pincrtl one). And in the hid-cp2112 case, we get the actual > fwnode from the gpiochip we created in the HID device, making it working. Thinking more about it. In ACPI we have those nodes defined as devices, right? So, strictly speaking the platform tells us that they _are_ devices. The question here is what this device node in ACPI means: 1) the physical device or subdevice of the physical device OR 2) the physical device even if it's a part of combined (Multi-Functional) device. Second question is, does Device Tree specification allows something that is not a device node, but can be enumerated as a subdevice of a physical one? P.S. I don't have objections against the patch, but I would like to have a clear picture on what the semantics of the two specifications WRT possibilities of device enumeration. It might be that we actually abuse ACPI specification in cases of Diolan DLN-2 or other way around trying to abuse it with this patch.
On Thu, Mar 09, 2023 at 04:03:19PM +0200, Andy Shevchenko wrote: > On Thu, Mar 09, 2023 at 02:40:51PM +0100, Benjamin Tissoires wrote: > > While trying to set up an SSDT override for a USB-2-I2C chip [0], > > I realized that the function acpi_gpiochip_find() was using the parent > > of the gpio_chip to do the ACPI matching. > > > > This works fine on my icelake laptop because AFAICT, the DSDT presents > > Ice Lake > > > the PCI device INT3455 as the "Device (GPI0)", but is in fact handled > > by the pinctrl driver in Linux. > > The pinctrl driver then creates a gpio_chip device. This means that the > > gc->parent device in that case is the GPI0 device from ACPI and everything > > works. > > > > However, in the hid-cp2112 case, the parent is the USB device, and the > > gpio_chip is directly under that USB device. Which means that in this case > > gc->parent points at the USB device, and so we can not do an ACPI match > > towards the GPIO device. > > > > I think it is safe to resolve the ACPI matching through the fwnode > > because when we call gpiochip_add_data(), the first thing it does is > > setting a proper gc->fwnode: if it is not there, it borrows the fwnode > > of the parent. > > > > So in my icelake case, gc->fwnode is the one from the parent, meaning > > Ice Lake > > > that the ACPI handle we will get is the one from the GPI0 in the DSDT > > (the pincrtl one). And in the hid-cp2112 case, we get the actual > > fwnode from the gpiochip we created in the HID device, making it working. > > Thinking more about it. In ACPI we have those nodes defined as devices, right? > So, strictly speaking the platform tells us that they _are_ devices. > > The question here is what this device node in ACPI means: > 1) the physical device or subdevice of the physical device OR > 2) the physical device even if it's a part of combined (Multi-Functional) > device. > > Second question is, does Device Tree specification allows something > that is not a device node, but can be enumerated as a subdevice of > a physical one? > > P.S. I don't have objections against the patch, but I would like to > have a clear picture on what the semantics of the two specifications > WRT possibilities of device enumeration. It might be that we actually > abuse ACPI specification in cases of Diolan DLN-2 or other way around > trying to abuse it with this patch. I have read the ACPI specification and it doesn't tell that Device is allowed to describe non-hardware entity. It means that in the Linux driver model, whenever we use Device() in the ACPI, we have an accompanying struct device. For GPIO chip case, we have physical device (parent) and GPIO device, which is Linux internal representation. So, physical device should have a description in the ACPI table, or other way around: any Device() in ACPI has to be considered as physical. That said, I think that Daniel was right and we need to have parent properly assigned (to the Device(GPI0) node). Another way, is to drop children from the descripton and use a single device node for entire box. TL;DR: if Device() is present we must use it as a parent to Linux representation. I would like also to hear Mika's opinion on this.
Hi, On Thu, Mar 09, 2023 at 04:47:30PM +0200, Andy Shevchenko wrote: > On Thu, Mar 09, 2023 at 04:03:19PM +0200, Andy Shevchenko wrote: > > On Thu, Mar 09, 2023 at 02:40:51PM +0100, Benjamin Tissoires wrote: > > > While trying to set up an SSDT override for a USB-2-I2C chip [0], > > > I realized that the function acpi_gpiochip_find() was using the parent > > > of the gpio_chip to do the ACPI matching. > > > > > > This works fine on my icelake laptop because AFAICT, the DSDT presents > > > > Ice Lake > > > > > the PCI device INT3455 as the "Device (GPI0)", but is in fact handled > > > by the pinctrl driver in Linux. > > > The pinctrl driver then creates a gpio_chip device. This means that the > > > gc->parent device in that case is the GPI0 device from ACPI and everything > > > works. > > > > > > However, in the hid-cp2112 case, the parent is the USB device, and the > > > gpio_chip is directly under that USB device. Which means that in this case > > > gc->parent points at the USB device, and so we can not do an ACPI match > > > towards the GPIO device. > > > > > > I think it is safe to resolve the ACPI matching through the fwnode > > > because when we call gpiochip_add_data(), the first thing it does is > > > setting a proper gc->fwnode: if it is not there, it borrows the fwnode > > > of the parent. > > > > > > So in my icelake case, gc->fwnode is the one from the parent, meaning > > > > Ice Lake > > > > > that the ACPI handle we will get is the one from the GPI0 in the DSDT > > > (the pincrtl one). And in the hid-cp2112 case, we get the actual > > > fwnode from the gpiochip we created in the HID device, making it working. > > > > Thinking more about it. In ACPI we have those nodes defined as devices, right? > > So, strictly speaking the platform tells us that they _are_ devices. > > > > The question here is what this device node in ACPI means: > > 1) the physical device or subdevice of the physical device OR > > 2) the physical device even if it's a part of combined (Multi-Functional) > > device. > > > > Second question is, does Device Tree specification allows something > > that is not a device node, but can be enumerated as a subdevice of > > a physical one? > > > > P.S. I don't have objections against the patch, but I would like to > > have a clear picture on what the semantics of the two specifications > > WRT possibilities of device enumeration. It might be that we actually > > abuse ACPI specification in cases of Diolan DLN-2 or other way around > > trying to abuse it with this patch. > > I have read the ACPI specification and it doesn't tell that Device is allowed > to describe non-hardware entity. It means that in the Linux driver model, > whenever we use Device() in the ACPI, we have an accompanying struct device. > > For GPIO chip case, we have physical device (parent) and GPIO device, which > is Linux internal representation. So, physical device should have a description > in the ACPI table, or other way around: any Device() in ACPI has to be > considered as physical. That said, I think that Daniel was right and we need > to have parent properly assigned (to the Device(GPI0) node). > > Another way, is to drop children from the descripton and use a single device > node for entire box. > > TL;DR: if Device() is present we must use it as a parent to Linux > representation. > > I would like also to hear Mika's opinion on this. Agree with the patch. We should be using whatever the gc->fwnode points to.
On Fri, Mar 10, 2023 at 08:43:08AM +0200, Mika Westerberg wrote: > On Thu, Mar 09, 2023 at 04:47:30PM +0200, Andy Shevchenko wrote: ... > Agree with the patch. We should be using whatever the gc->fwnode points > to. Thank you for looking into it, can you provide a formal tag?
On Thu, Mar 09, 2023 at 02:40:51PM +0100, Benjamin Tissoires wrote: > While trying to set up an SSDT override for a USB-2-I2C chip [0], > I realized that the function acpi_gpiochip_find() was using the parent > of the gpio_chip to do the ACPI matching. > > This works fine on my icelake laptop because AFAICT, the DSDT presents > the PCI device INT3455 as the "Device (GPI0)", but is in fact handled > by the pinctrl driver in Linux. > The pinctrl driver then creates a gpio_chip device. This means that the > gc->parent device in that case is the GPI0 device from ACPI and everything > works. > > However, in the hid-cp2112 case, the parent is the USB device, and the > gpio_chip is directly under that USB device. Which means that in this case > gc->parent points at the USB device, and so we can not do an ACPI match > towards the GPIO device. > > I think it is safe to resolve the ACPI matching through the fwnode > because when we call gpiochip_add_data(), the first thing it does is > setting a proper gc->fwnode: if it is not there, it borrows the fwnode > of the parent. > > So in my icelake case, gc->fwnode is the one from the parent, meaning > that the ACPI handle we will get is the one from the GPI0 in the DSDT > (the pincrtl one). And in the hid-cp2112 case, we get the actual > fwnode from the gpiochip we created in the HID device, making it working. > > Link: https://lore.kernel.org/linux-input/20230227140758.1575-1-kaehndan@gmail.com/T/#m592f18081ef3b95b618694a612ff864420c5aaf3 [0] > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
On Fri, Mar 10, 2023 at 12:42 PM Mika Westerberg <mika.westerberg@linux.intel.com> wrote: > > On Thu, Mar 09, 2023 at 02:40:51PM +0100, Benjamin Tissoires wrote: > > While trying to set up an SSDT override for a USB-2-I2C chip [0], > > I realized that the function acpi_gpiochip_find() was using the parent > > of the gpio_chip to do the ACPI matching. > > > > This works fine on my icelake laptop because AFAICT, the DSDT presents > > the PCI device INT3455 as the "Device (GPI0)", but is in fact handled > > by the pinctrl driver in Linux. > > The pinctrl driver then creates a gpio_chip device. This means that the > > gc->parent device in that case is the GPI0 device from ACPI and everything > > works. > > > > However, in the hid-cp2112 case, the parent is the USB device, and the > > gpio_chip is directly under that USB device. Which means that in this case > > gc->parent points at the USB device, and so we can not do an ACPI match > > towards the GPIO device. > > > > I think it is safe to resolve the ACPI matching through the fwnode > > because when we call gpiochip_add_data(), the first thing it does is > > setting a proper gc->fwnode: if it is not there, it borrows the fwnode > > of the parent. > > > > So in my icelake case, gc->fwnode is the one from the parent, meaning > > that the ACPI handle we will get is the one from the GPI0 in the DSDT > > (the pincrtl one). And in the hid-cp2112 case, we get the actual > > fwnode from the gpiochip we created in the HID device, making it working. > > > > Link: https://lore.kernel.org/linux-input/20230227140758.1575-1-kaehndan@gmail.com/T/#m592f18081ef3b95b618694a612ff864420c5aaf3 [0] > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> > > Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> > Thanks to both of you for the reviews. Andy, should I resend a v2 with the rev-by from Mika and the Ice Lake changes? Cheers, Benjamin
On Fri, Mar 10, 2023 at 01:51:38PM +0100, Benjamin Tissoires wrote: > On Fri, Mar 10, 2023 at 12:42 PM Mika Westerberg > <mika.westerberg@linux.intel.com> wrote: ... > > Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> > > Thanks to both of you for the reviews. > > Andy, should I resend a v2 with the rev-by from Mika and the Ice Lake changes? Yes, please.
On Fri, Mar 10, 2023 at 2:36 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > On Fri, Mar 10, 2023 at 01:51:38PM +0100, Benjamin Tissoires wrote: > > On Fri, Mar 10, 2023 at 12:42 PM Mika Westerberg > > <mika.westerberg@linux.intel.com> wrote: > > ... > > > > > Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> > > > > Thanks to both of you for the reviews. > > > > Andy, should I resend a v2 with the rev-by from Mika and the Ice Lake changes? > > Yes, please. > Alright, v2 sent just now :) Cheers, Benjamin
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index d8a421ce26a8..5aebc266426b 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -126,7 +126,7 @@ static bool acpi_gpio_deferred_req_irqs_done; static int acpi_gpiochip_find(struct gpio_chip *gc, void *data) { - return gc->parent && device_match_acpi_handle(gc->parent, data); + return ACPI_HANDLE_FWNODE(gc->fwnode) == data; } /**