From patchwork Tue Oct 24 19:54:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Berger X-Patchwork-Id: 10025455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1E5060375 for ; Tue, 24 Oct 2017 19:58:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C223828A67 for ; Tue, 24 Oct 2017 19:58:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B64E728A6A; Tue, 24 Oct 2017 19:58:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F09928A67 for ; Tue, 24 Oct 2017 19:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=+jlDBVLPcnGRVn4E0NFkDPL7qU5CxgsyR/LmE3GsL4U=; b=HiiO62wkZFhCCH0FJjrNeoa7VL 3GbopJWF5O8m+1UoRj5xfewrcD3K2V6wQYw0NcvjtYWgxcUE++VEG9Rppqk+/pJ4No9AoBdwuN7rA 1dfKGCT7pVPdvBewNCIdkcZ5/MxXXLM60hLXLNAByuU37DP3eAQ0/SZ6AEJGs24TMkHleguCbUHf0 TPnOKlR0qehmRD5QEGTBt8KfHekItIcfI2O1rveApvxZVsdmsrns7CrJauTzkcW83pySRBaFjsYaS fxmaP61ZDlwWGpvrKsDgm5NixsJSBqQvSCnJgMUZTWkmKalSBAvN8T25W5Ao/aAD09kodxZ/7tNbB aFxIih8Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e75Kt-0001VS-CB; Tue, 24 Oct 2017 19:58:03 +0000 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e75J1-0008NZ-0C for linux-arm-kernel@lists.infradead.org; Tue, 24 Oct 2017 19:56:13 +0000 Received: by mail-qk0-x244.google.com with SMTP id x82so27821717qkb.12 for ; Tue, 24 Oct 2017 12:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Aa23z+g23TzieVSxeXvowOaeqcd9quI0jIT+RptFDrE=; b=CCsCGmW0suOkQQDSL0fyQeR5pCyMh9GBI34q0VVEfejUQ7bwYYuNnDV/V6MsaYu/Mn hS1NaDchk2KxZOeWV66flYqWnkg774/gDYEpjfD74MTKkF8Z4GnHHsg4s92zYxjoJQm1 E2btRznDmy/wsLMuvitQkJocQ6Uu4REtZU2hzOc+2SluM1qBC+erpq8ot5gkzO4owFDB EZLRV2NG7tBAFExbs3QDhNLb6TrHBSafYqDlIPrTF8kjyHL1Wz7M53DuxvGML5zd2E7j XNkm4POjjFoy0ybzimL3qOXzi4BujLIj0Ksk5izpaMD+l7wQGMIRyAt+mAB5eH+3U+r2 5/3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Aa23z+g23TzieVSxeXvowOaeqcd9quI0jIT+RptFDrE=; b=YeB7k6927XW9knfAxhyWPVBB0j5O0q88hxun1AB8vknFkxN1PEdrKQ++wAi+2yTlYb /6Hxe4h+PlNH6ZIiPW7J4vHD8FsXhvvOFwCX2Lp53FAGb2wgtDikcvEkxZTZtXp3w8A1 VrqpJGyRh1CaEkSEE4WHHgSDlPu+MPpAhCpBAIjeso7jGkkPZWAlFkveYwGLHV5GdO+Y pj52bX2sGTAbkmr48E/VP+S8+c+KsYwNg7WgQ8b1kLp/SgkDQMTEJqr5hoP2Z5DE79/k MIdElHn6q4jpDgu7gSDDBr3aKEvwlqoRiR29y5N40iKCaAiEr16PN6y+qc6VzgFngV9B d7bg== X-Gm-Message-State: AMCzsaV6piAekMT6niCTFfL0vt+U1DjuxrGrg4EzFWU2eBmHUepywUNd tXuPbrVBjZz/q2l5wjYHakI= X-Google-Smtp-Source: ABhQp+TTarLZLHIDTLx+sIouxlUeeQcawQx09j8a9ka7SybVcCXuyQOXmoyNntfSewNNu3vugbKiyg== X-Received: by 10.55.107.198 with SMTP id g189mr11320974qkc.9.1508874945588; Tue, 24 Oct 2017 12:55:45 -0700 (PDT) Received: from stb-bld-02.irv.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id s27sm794249qtj.3.2017.10.24.12.55.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 12:55:45 -0700 (PDT) From: Doug Berger To: Gregory Fong Subject: [PATCH v2 5/7] gpio: brcmstb: correct the configuration of level interrupts Date: Tue, 24 Oct 2017 12:54:49 -0700 Message-Id: <20171024195451.30535-6-opendmb@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171024195451.30535-1-opendmb@gmail.com> References: <20171024195451.30535-1-opendmb@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171024_125607_757525_8B3C9D69 X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Linus Walleij , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Doug Berger , bcm-kernel-feedback-list@broadcom.com, Brian Norris , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This commit corrects a bug when configuring the GPIO hardware for IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_LEVEL_HIGH interrupt types. The hardware is now correctly configured to support those types. Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Acked-by: Gregory Fong --- drivers/gpio/gpio-brcmstb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c index 513de4936a25..183863902f7f 100644 --- a/drivers/gpio/gpio-brcmstb.c +++ b/drivers/gpio/gpio-brcmstb.c @@ -137,13 +137,13 @@ static int brcmstb_gpio_irq_set_type(struct irq_data *d, unsigned int type) switch (type) { case IRQ_TYPE_LEVEL_LOW: - level = 0; + level = mask; edge_config = 0; edge_insensitive = 0; break; case IRQ_TYPE_LEVEL_HIGH: level = mask; - edge_config = 0; + edge_config = mask; edge_insensitive = 0; break; case IRQ_TYPE_EDGE_FALLING: