Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5557673rwb; Wed, 7 Sep 2022 04:53:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR6JnI3izVsORSas8W0uIdeCDotCaQJuEIEs1yMnGR6UVAYyKnxo3DXtyET50Nl4Gnvfmml8 X-Received: by 2002:a63:ff66:0:b0:434:df48:4c28 with SMTP id s38-20020a63ff66000000b00434df484c28mr3093519pgk.102.1662551600639; Wed, 07 Sep 2022 04:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662551600; cv=none; d=google.com; s=arc-20160816; b=SZ+UqyhHnHfA8BF4kJtieH+cSrW9G1czM/eZ1n0+sUJtmDe38CZ88GnoJR9r6A03dY +MgNZZ+9Uhy0J2hLcpMBxxwRYPG/Nv1ypO+sZ7x1yV4jtqeL3v2L3g9HoeRcIaITJ3fq eJyuu5PTeJOL9Ur/tiGl9wZZzHW+o3T9x+LBhUHgwO1WOeQ2IclbV00J3EirEuzDIVj5 7vRUuVAAs3+9+QEpuDDd9hlR0U6uI5Y8lrz0m5RkuTZEAvKUkNb04lrauB3/9VJmc5E4 JP/1t7gq0cOvvoVOF+kg+FFFTxXq3folaQdIRFQGKLD0KgrJp2RM3ez+SA8N8y57i8Xx 0A/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=dZIh4+/56mPZ8GNJ0DQtWOl7S488zyoNCksTXVS4XdY=; b=HuUdQwUYXOY4rkSrYe6MMN83yr/vO0r1k5F3LqING24UBHAMeSB+NidttJSM5HMiq5 yXrnxawSIp9xWEZZt2U307QxvIftXKmfX0MBo4lqv+5SP0Q3Qr4jq5zUcVLwo+IjPHib tBT7nOeR/DncfQis2zYooB/BTpMGHLHB90WKbB5zQ5V4U4G3R4YTfzHmXIOHkYvaEH/d MqZ5cifJT1VQmy1b8DqVbKCzndCE5jHMVPLZZI8E7c0uLYqGj27/LEZ454dw0eUUaXzK xMBO/Pcgyve8loA8FW/XUcBlpQatULE77/3IQU0uK+kfiMNzueXT9HrREYXQUydXY4k1 nyKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=VQ6UrKP2; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi16-20020a17090b4b5000b001f0d1914b69si16758254pjb.9.2022.09.07.04.53.09; Wed, 07 Sep 2022 04:53:20 -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=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=VQ6UrKP2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbiIGLSE (ORCPT + 99 others); Wed, 7 Sep 2022 07:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbiIGLSC (ORCPT ); Wed, 7 Sep 2022 07:18:02 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 202FBA5719 for ; Wed, 7 Sep 2022 04:18:01 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id u6so19120605eda.12 for ; Wed, 07 Sep 2022 04:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=dZIh4+/56mPZ8GNJ0DQtWOl7S488zyoNCksTXVS4XdY=; b=VQ6UrKP2Ppw5g7e/Y4qcRdVDeCmUJMzs7joV+B4t8ncxhcBJIkf4z2eN9HY+A8FH2u 28PSq0leDUdV/Ce3Mk8N6YOp0YvlptviGdXp+LcqWWiJZz8arYfmIP/8FiuvUchkbPIy G7MHEsVpJFr7LnHH7omvOCMceCYO3A1k92MGnCZ7HVa+dJmXdHzCJqyJbgDInaoKn1pC AYxW8yCczu52agaQcsnuaS79r/jL69MJeHTSqILIDgzCq5VtH2l+KjQ+dpHLFcoNw+FK Bwcyb6kkBcX+Ps5PE+6iXhSHChUjYHpPL4qC0dBcVuGA5dRhh0H+W+/xH0zOSL1wUGJb Puug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=dZIh4+/56mPZ8GNJ0DQtWOl7S488zyoNCksTXVS4XdY=; b=vY1IjJTLeBnEsOQL8+51wdu+uBVVkpAyfPSTJCFFdMKAu0v8tTp3RkRakKGURY2kDb y/kfaYu0D+Bu1PGn3S3o4KcU1AJyUa166ij/X5BY4ZNxVF22QVODUdSuhdSmJFCjFtHh 2feyW9cLyKRRfwuwl0+J15+I51muer1NlinWWgLYSg0NdAakadhdRlHTru2UX2fobG7y Sein7WBCKmrgpK4CyWmHH3JyIMsg6cxPMOq04K7qMiukZSpD1Bbp3ra9jE9APC1VuYHM lDj32ptGSRwop9cQT0MgaeAQFJ+vB1L+kmAHgS0imQqc6skIcsCfxJ+25ibUcbIzgJ6o hrWg== X-Gm-Message-State: ACgBeo1XftCiFxApjDSW21wNr0EhftXHr++kO0Wj2oKiHThXvqCpBm+Y DLF05knq7ygnLs7/trZdhh5jEG8lmNRDvJP3tMxfEkOSJsw= X-Received: by 2002:a05:6402:524c:b0:43e:aba4:a42d with SMTP id t12-20020a056402524c00b0043eaba4a42dmr2712719edd.328.1662549479692; Wed, 07 Sep 2022 04:17:59 -0700 (PDT) MIME-Version: 1.0 References: <20220906105431.30911-1-pali@kernel.org> In-Reply-To: <20220906105431.30911-1-pali@kernel.org> From: Bartosz Golaszewski Date: Wed, 7 Sep 2022 13:17:48 +0200 Message-ID: Subject: Re: [PATCH] gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 On Tue, Sep 6, 2022 at 12:54 PM Pali Roh=C3=A1r wrote: > > 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 adde= d > 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 (mpc8= xxx_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=C3=A1r > --- > 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 a964e25ea620..763256efddc2 100644 > --- a/drivers/gpio/gpio-mpc8xxx.c > +++ b/drivers/gpio/gpio-mpc8xxx.c > @@ -172,6 +172,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, u= nsigned 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.20.1 > Applied, thanks! Bart