Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp791521rwb; Mon, 26 Sep 2022 06:02:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4pO2pe16JdIhtX+7MZ6oTxBdJDQGIlyYREZRJY3uoxfHYFNOISLpTYapVYo/6xyOnAjtU4 X-Received: by 2002:a05:600c:43d3:b0:3b3:2f1c:f01c with SMTP id f19-20020a05600c43d300b003b32f1cf01cmr22088677wmn.152.1664197367339; Mon, 26 Sep 2022 06:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664197367; cv=none; d=google.com; s=arc-20160816; b=tV3A2d6mQUl8i1q3uAu5g7uaCL29NuvxPfVhpFifxPOJBiAu+Sc8Ml51zm8dsoRkPc wm+MmqIz+2wJtc//rwwDZ/rDj2K5M9Pmt8A0uOJoMNJk77+Bgoxao2wl5Venf2j5rAzm TXpK1yMVadY5ezWESFkKSydPrKS3B4AYsuOvrjZlu5Hi4PsT3e9Ry5siShQXO9Sx2rY/ kvrV+2w1BYPXxKQwSB5P9U1Cvo17jxzucEiBNdaA934mhi8jKDn/Hd4CNs5hbqD/TRkp wvRu2KjY5SNvZAU7lO+ShrJpcR3AvMKrG7VL6+LT5AIpHb9LOSq2me5b/KOYpU0qqTvI T+gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S1PJJjDvaAtzI/Rd2He7IGhsiwhpzcK+qG/6RnlULwY=; b=wfuB42if+k28SIWogAjE5Q36Pz5RsNznTaHJ35K+KZRcSi3rcYMGzhurQhnlw4QSWz L7lqkIYv6naON5MaTMO6Ba2cw+c8u2wiG0QlUYcaZBp2R6etDFyOXJAClKLgedNPPVX/ IXvrhF/pP+p6+f22Mho5CZcIexfzRkvNNSPplaN8M76NVv1+C8j8q0Er8GN+TXySq1MQ 0FyE11yTtM2HTJU7SkHoKCB1epFD3ThSncx/h7TMsjTnf+gEEuzdtO9oInJusJI+l9ht bisfX7OXdMCbQwR3u1q1z//nLRSrDjE2hxfqq+7sf6hqe1pX3EVB+/AOnssbicSHmNg3 ch5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RgkcZ7RC; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne35-20020a1709077ba300b007814ff4ce25si16583722ejc.285.2022.09.26.06.02.20; Mon, 26 Sep 2022 06:02:47 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=RgkcZ7RC; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236087AbiIZKhK (ORCPT + 99 others); Mon, 26 Sep 2022 06:37:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236313AbiIZKeu (ORCPT ); Mon, 26 Sep 2022 06:34:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D00285245D; Mon, 26 Sep 2022 03:21:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B565960BB7; Mon, 26 Sep 2022 10:21:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE4F8C43148; Mon, 26 Sep 2022 10:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187696; bh=2eD7QGliI3wXPdxG3FW/UmNFLlJHY7urDvH1z6VQP54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RgkcZ7RC8EVztKZ7tV0bbJNLUb3M1jQCWtjNbA6oVtGsxFl2WcCuelcl5a0lri+Yl 3EzWe0tCGfsBPXD86G6XOG2be/z55Ky+FRJ0voUudq/QWmcu9+PhbtrsdfppYtEsib 7/eTx+4SAY5yHZYsL3TOgfZcT3NzTexJ1VsrqJyc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.4 003/120] gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx Date: Mon, 26 Sep 2022 12:10:36 +0200 Message-Id: <20220926100750.666778118@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100750.519221159@linuxfoundation.org> References: <20220926100750.519221159@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Rohár [ Upstream commit 279c12df8d2efb28def9d037f288cbfb97c30fe2 ] Commit e39d5ef67804 ("powerpc/5xxx: extend mpc8xxx_gpio driver to support mpc512x gpios") implemented support for IRQ_TYPE_LEVEL_LOW flow type in mpc512x via falling edge type. Do same for mpc85xx which support was added in commit 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio"). Fixes probing of lm90 hwmon driver on mpc85xx based board which use level interrupt. Without it kernel prints error and refuse lm90 to work: [ 15.258370] genirq: Setting trigger mode 8 for irq 49 failed (mpc8xxx_irq_set_type+0x0/0xf8) [ 15.267168] lm90 0-004c: cannot request IRQ 49 [ 15.272708] lm90: probe of 0-004c failed with error -22 Fixes: 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio") Signed-off-by: Pali Rohár Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index d72a3a5507b0..f3bf82efea8e 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -190,6 +190,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, unsigned int flow_type) switch (flow_type) { case IRQ_TYPE_EDGE_FALLING: + case IRQ_TYPE_LEVEL_LOW: raw_spin_lock_irqsave(&mpc8xxx_gc->lock, flags); gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR, gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR) -- 2.35.1