From patchwork Mon Oct 5 15:26:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 290645 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=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 0244BC4363A for ; Mon, 5 Oct 2020 15:32:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF28E20B80 for ; Mon, 5 Oct 2020 15:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601911957; bh=5zeuLzdh7SRUG5gLL+eFUJ8gZoOa2o/BWJ7rymxs4Sw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MFnIJ+wGL04JSJCtDDX7/gVzm+kXXzqN9/lAmFCSLsnTaKVZj4Cg2Xg3/M5kGL4Wc wea5GMhrel7G/YWgL/UDDbDvRXLkJl4dbBpMhQ7poZ5Gddl+8r45hU+6+Cvdzb2HRi wqRwmltw2EKWPh6KKb98MVWxq5r5fWNxeD+2/3hI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728017AbgJEPc3 (ORCPT ); Mon, 5 Oct 2020 11:32:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:60004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727996AbgJEPc2 (ORCPT ); Mon, 5 Oct 2020 11:32:28 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 71CA32085B; Mon, 5 Oct 2020 15:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601911947; bh=5zeuLzdh7SRUG5gLL+eFUJ8gZoOa2o/BWJ7rymxs4Sw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jd0RxFjewLDtTaw0mwUSos+2g5BWtWgnKvvSOuQR6a3eQbNEr17wyk84VjfCXCa8f pgEzaWV8VR6qGPFAmSNqVY0caIaLg5nGZ34Og7/5GuYTm/ikFNsNcylyQBhi1sH++V FtiYU61k+Qo5RR7kgC8X1PkZrXhVtvZn7vtdGyxs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, dillon min , Bartosz Golaszewski Subject: [PATCH 5.8 11/85] gpio: tc35894: fix up tc35894 interrupt configuration Date: Mon, 5 Oct 2020 17:26:07 +0200 Message-Id: <20201005142115.277642318@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201005142114.732094228@linuxfoundation.org> References: <20201005142114.732094228@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: dillon min commit 214b0e1ad01abf4c1f6d8d28fa096bf167e47cef upstream. The offset of regmap is incorrect, j * 8 is move to the wrong register. for example: asume i = 0, j = 1. we want to set KPY5 as interrupt falling edge mode, regmap[0][1] should be TC3589x_GPIOIBE1 0xcd but, regmap[i] + j * 8 = TC3589x_GPIOIBE0 + 8 ,point to 0xd4, this is TC3589x_GPIOIE2 not TC3589x_GPIOIBE1. Fixes: d88b25be3584 ("gpio: Add TC35892 GPIO driver") Cc: Cc: stable@vger.kernel.org Signed-off-by: dillon min Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-tc3589x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpio/gpio-tc3589x.c +++ b/drivers/gpio/gpio-tc3589x.c @@ -212,7 +212,7 @@ static void tc3589x_gpio_irq_sync_unlock continue; tc3589x_gpio->oldregs[i][j] = new; - tc3589x_reg_write(tc3589x, regmap[i] + j * 8, new); + tc3589x_reg_write(tc3589x, regmap[i] + j, new); } }