From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34540 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751525AbeBWLL3 (ORCPT ); Fri, 23 Feb 2018 06:11:29 -0500 Subject: Patch "iio: proximity: sx9500: Assign interrupt from GpioIo()" has been added to the 4.14-stable tree To: andriy.shevchenko@linux.intel.com, Jonathan.Cameron@huawei.com, alexander.levin@verizon.com, gregkh@linuxfoundation.org, mika.westerberg@linux.intel.com Cc: , From: Date: Fri, 23 Feb 2018 12:10:32 +0100 Message-ID: <1519384232186122@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled iio: proximity: sx9500: Assign interrupt from GpioIo() to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iio-proximity-sx9500-assign-interrupt-from-gpioio.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Feb 23 11:45:09 CET 2018 From: Andy Shevchenko Date: Fri, 3 Nov 2017 15:03:36 +0200 Subject: iio: proximity: sx9500: Assign interrupt from GpioIo() From: Andy Shevchenko [ Upstream commit e53111ad5deaef98d8c18a9933ef1f5624c5979d ] The commit 0f0796509c07 ("iio: remove gpio interrupt probing from drivers that use a single interrupt") removed custom IRQ assignment for the drivers which are enumerated via ACPI or OF. Unfortunately, some ACPI tables have IRQ line defined as GpioIo() resource and thus automatic IRQ allocation will fail. Partially revert the commit 0f0796509c07 to restore original behaviour. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/iio/proximity/sx9500.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -871,6 +871,7 @@ static int sx9500_init_device(struct iio static void sx9500_gpio_probe(struct i2c_client *client, struct sx9500_data *data) { + struct gpio_desc *gpiod_int; struct device *dev; if (!client) @@ -878,6 +879,14 @@ static void sx9500_gpio_probe(struct i2c dev = &client->dev; + if (client->irq <= 0) { + gpiod_int = devm_gpiod_get(dev, SX9500_GPIO_INT, GPIOD_IN); + if (IS_ERR(gpiod_int)) + dev_err(dev, "gpio get irq failed\n"); + else + client->irq = gpiod_to_irq(gpiod_int); + } + data->gpiod_rst = devm_gpiod_get(dev, SX9500_GPIO_RESET, GPIOD_OUT_HIGH); if (IS_ERR(data->gpiod_rst)) { dev_warn(dev, "gpio get reset pin failed\n"); Patches currently in stable-queue which might be from andriy.shevchenko@linux.intel.com are queue-4.14/pinctrl-denverton-fix-uart2-rts-pin-mode.patch queue-4.14/iio-proximity-sx9500-assign-interrupt-from-gpioio.patch queue-4.14/brcmfmac-avoid-build-error-with-make-w-1.patch