Return-Path: Received: from fldsmtpe03.verizon.com ([140.108.26.142]:17724 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbdJGWhv (ORCPT ); Sat, 7 Oct 2017 18:37:51 -0400 From: "Levin, Alexander (Sasha Levin)" Cc: Hans de Goede , Lee Jones , "Levin, Alexander (Sasha Levin)" To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH review for 4.9 09/50] mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped Date: Sat, 7 Oct 2017 22:36:48 +0000 Message-ID: <20171007223636.24797-9-alexander.levin@verizon.com> References: <20171007223636.24797-1-alexander.levin@verizon.com> In-Reply-To: <20171007223636.24797-1-alexander.levin@verizon.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Hans de Goede [ Upstream commit 1af468ebe45591651ec3bafc2e9ddc6fdef70ae0 ] The R in PEK_DBR stands for rising, so it should be mapped to AXP288_IRQ_POKP where the last P stands for positive edge. Likewise PEK_DBF should be mapped to the falling edge, aka the _N_egative edge, so it should be mapped to AXP288_IRQ_POKN. This fixes the inverted powerbutton status reporting by the axp20x-pek driver. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/axp20x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index ba130be32e61..9617fc323e15 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -205,14 +205,14 @@ static struct resource axp22x_pek_resources[] =3D { static struct resource axp288_power_button_resources[] =3D { { .name =3D "PEK_DBR", - .start =3D AXP288_IRQ_POKN, - .end =3D AXP288_IRQ_POKN, + .start =3D AXP288_IRQ_POKP, + .end =3D AXP288_IRQ_POKP, .flags =3D IORESOURCE_IRQ, }, { .name =3D "PEK_DBF", - .start =3D AXP288_IRQ_POKP, - .end =3D AXP288_IRQ_POKP, + .start =3D AXP288_IRQ_POKN, + .end =3D AXP288_IRQ_POKN, .flags =3D IORESOURCE_IRQ, }, }; --=20 2.11.0