Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp561038rdb; Tue, 19 Sep 2023 03:59:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8chAu7DHgYC9IbJccd/9Jtu/SZiGRbQy0uebswg5jxLIsWJ4EIGlj0O4mhw9+sJN3uhSO X-Received: by 2002:a05:6830:18e7:b0:6b9:b1a7:1f92 with SMTP id d7-20020a05683018e700b006b9b1a71f92mr12377258otf.8.1695121189157; Tue, 19 Sep 2023 03:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695121189; cv=none; d=google.com; s=arc-20160816; b=Gp5hvUJOKfypBgnc/8GtUOzaD9LmEB0EkReGDgDyFerx/hjnssWfEaBMjw4fL4wH35 KPLJJpD4ibUlz2ACs1CWo83O4P788pBpXKuc0WJDX9dl0rMJLLTJ1zikGtlnkUiMf3Vn FLQ/qTLdXekU8RfHJtSxvggq1pxB0j6q9ZYaUfhXzLxJ59jgbjLageHddqDnLNnFrN2f qYozBaQG0QDFoygdSvTWj2XBuivEeO8d+hZQbWl0r9uA8IYLtoQxyKu749ryhzfOJgWs pdf+UM6vKyUjbpY2efrR/ykkJWOWYzsXcV0NydpYePqorqelH6sXHDqItIlIjWoLh6pR JSCA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kjJjjSfeg0swCjLTob8J1m6srCuAwipbvS7J0HjoRsg=; fh=4el59U4+pZcpwEMge0ez0uyzWGPv5BNsUtYmk+IM8i0=; b=Mr0ZNMY3RRV0U+kDs5xsH85mVCm6gmwf5xTU+5kt+eMFG5424ebmt909q9TDg8SwwM Lh0Aub1cm4dNrPNwC7Hd0UVfb29IpRlbZK9+687FQLG+f24pfVLLEf/RBvgavaCdi0Dl k7SNGkIYyHEcHivNwbeF9+HZnuPG/l8QXktS9X6u0EzuDNKiwybMdijyKKWtFslwxpKQ OXyIyfn9ZK/uH7u0wdYdTKr+kmYNndnEDj8oiXpp1pztEP4zmiaVhK2TN4I0uQloIAjo Rya6Hc1l9x8lx4IRsa1Qr8/Ha45QFZQqjj1LT4MyQ34Rmmx73VcdIxv0YwEK7QgS6kys 3NMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WhDTbRVH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id cn4-20020a056a020a8400b00569466198c3si9027747pgb.751.2023.09.19.03.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 03:59:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WhDTbRVH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id B91098097A59; Mon, 18 Sep 2023 23:20:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230223AbjISGUZ (ORCPT + 99 others); Tue, 19 Sep 2023 02:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbjISGUU (ORCPT ); Tue, 19 Sep 2023 02:20:20 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0F74116 for ; Mon, 18 Sep 2023 23:20:14 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 38J6JKXj053098; Tue, 19 Sep 2023 01:19:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1695104360; bh=kjJjjSfeg0swCjLTob8J1m6srCuAwipbvS7J0HjoRsg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=WhDTbRVHDNOUA1Ds1pNZSDMzirVJ1TW41r4AYaxiafp0UpYH4tOy7vwS3rZQszT5i 6FnqFmelTwuGkU6wYCopQtlVuEoYNhMyolegza7bB76Qwy+ahBfb32wFdKFjj5Am/n u+1f17ZX7MOhRvuewU4XzVxG4SCUjPQcThlQuCpo= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 38J6JKUT111826 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Sep 2023 01:19:20 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 19 Sep 2023 01:19:19 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 19 Sep 2023 01:19:19 -0500 Received: from lelv0854.itg.ti.com (lelv0854.itg.ti.com [10.181.64.140]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 38J6JJkp084736; Tue, 19 Sep 2023 01:19:19 -0500 Received: from localhost (danish-tpc.dhcp.ti.com [10.24.69.199]) by lelv0854.itg.ti.com (8.14.7/8.14.7) with ESMTP id 38J6JJG4016513; Tue, 19 Sep 2023 01:19:19 -0500 From: MD Danish Anwar To: Grzegorz Jaszczyk , Suman Anna , David Lechner , Roger Quadros , "Andrew F. Davis" , Marc Zyngier , Thomas Gleixner CC: , , , , Subject: [PATCH 2/3] irqchip/irq-pruss-intc: Fix listed IRQ type in /proc/interrupts Date: Tue, 19 Sep 2023 11:48:59 +0530 Message-ID: <20230919061900.369300-3-danishanwar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230919061900.369300-1-danishanwar@ti.com> References: <20230919061900.369300-1-danishanwar@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 18 Sep 2023 23:20:32 -0700 (PDT) From: Grygorii Strashko The PRUSS INTC driver doesn't have .irq_set_type() callback implemented and supports only IRQ_TYPE_LEVEL_HIGH. This resulted in the IRQ properties not being updated properly and the PRUSS INTC IRQs were listed incorrectly in /proc/interrupts as Edge. Example: 218: 0 4b220000.interrupt-controller 26 Edge pru10 Fix this by adding a simple .irq_set_type() implementation which checks the requested IRQ triggering type. Fixes: 04e2d1e06978 ("irqchip/irq-pruss-intc: Add a PRUSS irqchip driver for PRUSS interrupts") Signed-off-by: Grygorii Strashko Signed-off-by: Suman Anna Signed-off-by: MD Danish Anwar --- drivers/irqchip/irq-pruss-intc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c index 7415817d4c6c..3cf684ede564 100644 --- a/drivers/irqchip/irq-pruss-intc.c +++ b/drivers/irqchip/irq-pruss-intc.c @@ -373,6 +373,14 @@ static int pruss_intc_irq_set_irqchip_state(struct irq_data *data, return 0; } +static int pruss_intc_irq_irq_set_type(struct irq_data *data, unsigned int type) +{ + if (type != IRQ_TYPE_LEVEL_HIGH) + return -EINVAL; + + return 0; +} + static struct irq_chip pruss_irqchip = { .name = "pruss-intc", .irq_ack = pruss_intc_irq_ack, @@ -382,6 +390,7 @@ static struct irq_chip pruss_irqchip = { .irq_release_resources = pruss_intc_irq_relres, .irq_get_irqchip_state = pruss_intc_irq_get_irqchip_state, .irq_set_irqchip_state = pruss_intc_irq_set_irqchip_state, + .irq_set_type = pruss_intc_irq_irq_set_type, }; static int pruss_intc_validate_mapping(struct pruss_intc *intc, int event, -- 2.34.1