From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FAE0C6FA83 for ; Mon, 5 Sep 2022 16:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=RaZZf4TK9ARhCA5X17uvlQQ5ui5KnrJri1Uo1+8N3SI=; b=wNFit1OyuJXv/KKZmMwHpA4FFv kKpIm4pzi3JD+eu0XGGGRA3SU+rB9FCHInowhMBzDfUohSUOvbZDui9Q1li+M40A7rYDo6p1tRsPM 8r23NpaLlQSHEqueVHiA21vZ5/om8vEaIXcct1ag3HT71Gs3u807RGhmcvMlK0LkKGKS9IIbNtCK6 l7wp4DsNoQuFproFy11mz1RrHPiChJnr2xmozCUCgR53pEJGEHMlE+8o/5lZakNarzM5GC/PZvkEe z1JJtBUaLSqfQBllLFi1vtjEARp0tQR5L/Rsc+5cFRQJO2tSkxDVOIZ9IYUYB3tM+pQeKJjZK5qd+ K32hYEQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVEvn-006pbF-GU; Mon, 05 Sep 2022 16:26:39 +0000 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVC2z-0035QT-QG for linux-arm-kernel@lists.infradead.org; Mon, 05 Sep 2022 13:21:55 +0000 Received: by mail-qt1-x836.google.com with SMTP id g14so6074739qto.11 for ; Mon, 05 Sep 2022 06:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=tRVO25AcCcbSeZW/Fy4DwIgCZUwPpZ+5FJPg/p61Qg0=; b=Nes/Mg2wXfdFvd7AZumPHtZsU2I8sbHfQphfdXYmzjv6f9hQUd/1h3Agnvuh9NVwWp UPVhQGc08SO9jJd2a6GlmqJ4+9GtSmsa6EzSPO6SdN0fvlJDCSwSMhFW57tglel0hGMI P158xTd8k5CiBy6v1oMdb5sCIUVvwDeUWXPAH6PBBRlAKxMIP+3NMV7pAG8dRDFzwHzK dASvf0jaoGrydYS8AAUJg7VsEh7erKQgtUzxVdoEpL5cwiXhowUuV1rY9670y8kR1nqH 4BW0nForbuUh1ObCNulHVB8LIYISBM7+0hvFAJqbkutOSleRNZQKcnjnyW5Yyj7Yi/ju SK7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=tRVO25AcCcbSeZW/Fy4DwIgCZUwPpZ+5FJPg/p61Qg0=; b=Ece/LowJnS0dyYDT0oTLJNPYWwnGf6OmXj4xNCUGj3gXyUeRen5oQKqYJIkbQKSucu WFV0W5vE11p9R3vGlxjTb1XGIlJOwDTmLHV6pJoeWMYIU5+BObjrhSuaSmuLPSM1OTWj sOx+JMqVFWRustUyIlPJT4ZZ84rQxnIaxJ2w/Bxmt7hSMafFPCMAdrC2YrjGKW5OLhV+ qw1F1tbiR/uxKMeIKi9YmUHit1Hhj4nNwuhwUBjuLvGtf2pxgAeTNnKXwp9CLNkHdVZH G99whLYLt9zBct/lbWxGcxKs9iUvIyNww8CSUJjp/P/+UQDfgTKQr62diAg2ejjemeSf d4LA== X-Gm-Message-State: ACgBeo3Yjf4C+tCWbiL8N4wjSsRPXm5jCTWdLfoRfKPCZDaXxxTVYN0u ALMBLRO7vOy2ms+hdT16F6uPjw7+HALWXCShg2Y= X-Google-Smtp-Source: AA6agR5WC9BIvyhF37182/SlXTa2ogTIjrHQEXlHRBYbwVP4xYmsR20rLV75XEOC4tjrsXaYitpjnwospoQni6JysHk= X-Received: by 2002:a05:622a:40a:b0:343:77ba:727f with SMTP id n10-20020a05622a040a00b0034377ba727fmr39864351qtx.481.1662384110603; Mon, 05 Sep 2022 06:21:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andy Shevchenko Date: Mon, 5 Sep 2022 16:21:14 +0300 Message-ID: Subject: Re: [PATCH 6/6] gpio: macsmc: Add IRQ support To: "Russell King (Oracle)" , Arnd Bergmann , Lee Jones , Alyssa Rosenzweig , asahi@lists.linux.dev, Bartosz Golaszewski , Hector Martin , linux-arm Mailing List , "open list:GPIO SUBSYSTEM" , Sven Peter X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220905_062153_886743_05B9AA09 X-CRM114-Status: GOOD ( 27.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 5, 2022 at 4:04 PM Andy Shevchenko wrote: > > On Mon, Sep 5, 2022 at 2:54 PM Russell King (Oracle) > wrote: > > On Thu, Sep 01, 2022 at 09:03:49PM +0300, Andy Shevchenko wrote: > > > On Thu, Sep 1, 2022 at 5:18 PM Russell King wrote: > > ... > > > > Usually we want to have handle_bad_irq() handler by default and in > > > ->set_type() we lock a handler depending on the flags. Why is this not > > > the case in this driver? > > > > "lock a handler" ? I guess you mean select a handler. > > Yes, I was a bit confused by API naming (irq_set_handler_locked() was it). > > > I don't see a reason why we couldn't switch between handle_bad_irq() > > and handle_simple_irq(). I would guess (I don't know the implementation > > details of the Apple platform) that the SMC forwards a message when the > > IRQ happens, but I'm guessing that this is well tested on the platform > > with the simple flow handler. > > I have had a real case where it makes quite a difference: > eb441337c714 ("gpio: pca953x: Set IRQ type when handle Intel Galileo Gen 2") > > The missed ->irq_set_type() call shows a bug in the IRQ flow in the > code. This became visible due to the switch to handle_bad_irq() and > was hidden with other default handlers. After this I ask people to use > the default handler to be a "bad" one. > > > Changing it to something else would need > > discussion with the Asahi Linux folk. > > > > -- > With Best Regards, > Andy Shevchenko -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel