From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52C9AC43331 for ; Mon, 11 Nov 2019 06:08:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21B422084F for ; Mon, 11 Nov 2019 06:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573452488; bh=QyPJxbAi4SXiSWVoyeMthn/T9gHUijTJttIGjYeB3eo=; h=Subject:To:Cc:From:Date:List-ID:From; b=L2Hbzqp40aD5t34E6iF3vZLr071ixcFPZBQQts2KKZT7ZgxGOgh7a2ArqYfdRC2gC wDZhZddUF3Z9XyEmhA+oum4ku0EVTUULhJB8Py5Rs4Zde18Nuj5V+iG1ifJnsIqE9j AUu0R98B3w76z4Dyya8brzuQJ7iMoSEU/TLLT1u4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726768AbfKKGIH (ORCPT ); Mon, 11 Nov 2019 01:08:07 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:45675 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbfKKGIH (ORCPT ); Mon, 11 Nov 2019 01:08:07 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 10B8B57F; Mon, 11 Nov 2019 01:08:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 11 Nov 2019 01:08:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=WS6mFP i3EW5i+tysy36e7flpNy9IXcF8gMbBDPxEwwc=; b=cEuHhIt3ffALqQzzhWC68s 0cQmZm4/d3FRZ2CjaFSYAq96/kR9pXK7xDV23ZecwdQopV1GihFCaf03UTu4ZDMY cQPpm4UjQ0vCY/KrZJ4Vw1zulVA9tFkKsijsiHhpqbslRejz2mEafNSzRIqvg/iK VcV7/9YvNLkZkx5/OD713ri2DTTvRuRxnIbKnM7OdPMa/+ei/fxtMMNIvghyvcJD ZgYatQZPXLWhwcW6e3LvpG/yRqFK/PvmYGgs8qJZfmiCuZQQwMY4n/2VugBQ3zYZ wfec5dEt0UUvWJ61M4r7gfTEkzbnnCyc2WRTQUFi9MGvb7ueE8La47USLqTXaqjQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddviedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id EF545306005C; Mon, 11 Nov 2019 01:08:04 -0500 (EST) Subject: FAILED: patch "[PATCH] pinctrl: cherryview: Fix irq_valid_mask calculation" failed to apply to 5.3-stable tree To: hdegoede@redhat.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com Cc: From: Date: Mon, 11 Nov 2019 07:08:03 +0100 Message-ID: <157345248387137@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 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.3-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 63bdef6cd6941917c823b9cc9aa0219d19fcb716 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 18 Oct 2019 11:08:42 +0200 Subject: [PATCH] pinctrl: cherryview: Fix irq_valid_mask calculation Commit 03c4749dd6c7 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation") has made the cherryview gpio numbers sparse, to get a 1:1 mapping between ACPI pin numbers and gpio numbers in Linux. This has greatly simplified things, but the code setting the irq_valid_mask was not updated for this, so the valid mask is still in the old "compressed" numbering with the gaps in the pin numbers skipped, which is wrong as irq_valid_mask needs to be expressed in gpio numbers. This results in the following error on devices using pin 24 (0x0018) on the north GPIO controller as an ACPI event source: [ 0.422452] cherryview-pinctrl INT33FF:01: Failed to translate GPIO to IRQ This has been reported (by email) to be happening on a Caterpillar CAT T20 tablet and I've reproduced this myself on a Medion Akoya e2215t 2-in-1. This commit uses the pin number instead of the compressed index into community->pins to clear the correct bits in irq_valid_mask for GPIOs using GPEs for interrupts, fixing these errors and in case of the Medion Akoya e2215t also fixing the LID switch not working. Cc: stable@vger.kernel.org Fixes: 03c4749dd6c7 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation") Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Mika Westerberg diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c index c6251eac8946..c31266e70559 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1559,7 +1559,7 @@ static void chv_init_irq_valid_mask(struct gpio_chip *chip, intsel >>= CHV_PADCTRL0_INTSEL_SHIFT; if (intsel >= community->nirqs) - clear_bit(i, valid_mask); + clear_bit(desc->number, valid_mask); } }