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 F05C6C46CD3 for ; Wed, 27 Dec 2023 02:02:00 +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:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6c9QatcI8dsedmstAPUw6XuaqaTF9E+8hW44I9TxBZ8=; b=1s7mSch3tsoBCa qmMoY5GFumtF7dsAHHPpnp4kz4j3eCWPLQ0Yd0rRQXRSLHtB7lczvKRjKuTYpuKV18eDEd+LTCHbn k2fslzDIoJdwnSk9XaCNFwOxrNflq29gx3mqwS80fXIF0KdjuFW9js+SwvwJ70G7V/SGvrFcFfWFt yeV8ZT65QSOyKyvcW/1VBLRE23MffqSHhzkU9Yu0NK3A7//l85jplW2CtzlqQvKIbeqv/4C9HMIqP 8nZ7q2jrGQxNjhXkPU3PCwQesR0uxodiOeZ1YRidIftaV1qwGLNLqVyzlfuK5wiRenh+zO0u1q74A +jxQP/y9qTLX9Ap/YdIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rIJEi-00DnfU-16; Wed, 27 Dec 2023 02:01:32 +0000 Received: from out28-82.mail.aliyun.com ([115.124.28.82]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rIJEf-00Dndp-1i for linux-arm-kernel@lists.infradead.org; Wed, 27 Dec 2023 02:01:31 +0000 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1100688|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.0502652-0.000180865-0.949554;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047206;MF=fuyao@sjterm.com;NM=1;PH=DS;RN=9;RT=9;SR=0;TI=SMTPD_---.VtpmuEK_1703642477; Received: from localhost(mailfrom:fuyao@sjterm.com fp:SMTPD_---.VtpmuEK_1703642477) by smtp.aliyun-inc.com; Wed, 27 Dec 2023 10:01:18 +0800 Date: Wed, 27 Dec 2023 10:01:17 +0800 From: Fuyao Kashizuku To: Lee Jones , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Andre Przywara Cc: Jianzhang Mai Subject: [PATCH] mfd: sun4i-gpadc: adaptation interrupt number Message-ID: Mail-Followup-To: Lee Jones , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Andre Przywara , Jianzhang Mai MIME-Version: 1.0 Content-Disposition: inline Organization: work_work_work X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231226_180129_711336_241D8AC2 X-CRM114-Status: GOOD ( 10.78 ) 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 The identifiers are used as IRQ resource numbers, where 0 is treated specially. This fixes sun4i-gpadc-iio probe failed when request irq. The backstack: WARNING: CPU: 3 PID: 1 at drivers/base/platform.c:451 __platform_get_irq_byname+0xb8/0xc4 0 is an invalid IRQ number Modules linked in: CPU: 3 PID: 1 Comm: swapper/0 Not tainted 6.7.0-rc6 #9 Hardware name: Allwinner sun8i Family unwind_backtrace show_stack dump_stack_lvl __warn warn_slowpath_fmt __platform_get_irq_byname platform_get_irq_byname sun4i_irq_init sun4i_gpadc_probe platform_probe really_probe __driver_probe_device driver_probe_device __driver_attach bus_for_each_dev bus_add_driver driver_register do_one_initcall do_initcall_level do_initcalls kernel_init_freeable kernel_init Log reports: sun4i-gpadc-iio sun6i-a31-gpadc-iio.0: error -EINVAL: IRQ FIFO_DATA_PENDING not found sun4i-gpadc-iio: probe of sun6i-a31-gpadc-iio.0 failed with error -22 Signed-off-by: Fuyao Kashizuku --- Changes in v2: - Fix the commit message. - Add the backstack. - Add the log reports. - Use the correct full name and email address. - Correct the subsystem to mfd. - Link to v1: https://lore.kernel.org/lkml/YwdhTlk+9h+9Mrwm@scg/ include/linux/mfd/sun4i-gpadc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h index ea0ccf33a459..021f820f9d52 100644 --- a/include/linux/mfd/sun4i-gpadc.h +++ b/include/linux/mfd/sun4i-gpadc.h @@ -81,8 +81,8 @@ #define SUN4I_GPADC_TEMP_DATA 0x20 #define SUN4I_GPADC_DATA 0x24 -#define SUN4I_GPADC_IRQ_FIFO_DATA 0 -#define SUN4I_GPADC_IRQ_TEMP_DATA 1 +#define SUN4I_GPADC_IRQ_FIFO_DATA 1 +#define SUN4I_GPADC_IRQ_TEMP_DATA 2 /* 10s delay before suspending the IP */ #define SUN4I_GPADC_AUTOSUSPEND_DELAY 10000 -- 2.39.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel