From patchwork Sat Sep 12 11:22:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11771845 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EA09D139F for ; Sat, 12 Sep 2020 11:22:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E2B9208FE for ; Sat, 12 Sep 2020 11:22:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YJYWiPWL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="i6sRXRpt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E2B9208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=HvZ1/419H4lpdfNt+PdBos6qBYj1XOS2R8srX9Owyx0=; b=YJYWiPWLppE0bXWRTSA4b3tKYE Bs+pcJgtwYEVZEx8LbVPj5SCrZyOd9E/rWMNOG3o1TRLzUKRN1l9RgprQuz9Z5E9y6iXgNKAHqgjW luJABOo3Ub1yuXKgS0d7OnUHm8R3Y1UwA9pFdJLbb7BvSucjLHYMkdJi5KKjn0JyZKECHL4dntvFI IVX3PWs19Ji2semrfYQxowhmnm/Z/JITjTeUuahoJPmtC8Qfv7b32vT5eJ65yBGQM90J5KZhigesz lvLbl2t0vtwH+GS5VVI+RFVqanFNyO327duCVk0pXvAYew8dG/StMDU8GUmc20OF+ULiMHxJRUNsd G/kNyXew==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kH3bf-0000Tc-3P; Sat, 12 Sep 2020 11:22:11 +0000 Received: from vps.xff.cz ([195.181.215.36]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kH3bb-0000Si-Hp for linux-arm-kernel@lists.infradead.org; Sat, 12 Sep 2020 11:22:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1599909724; bh=sDy+L9GumU/BwR2PlpaYqxa0X1FG691hBIWSRVNXZvQ=; h=From:To:Cc:Subject:Date:From; b=i6sRXRptOCR5+GNCQdFsfmqrtChYSDm3YCcO/sR12n9WrtD6wcSKaLjXMV6Wfyp2o YoF5RYSMiyr47R1rJ5rn2wablgv+EJmnaabrL6RS7VA/OnwtvuMewQowULNa+ZOHXA YSVQl4ectJ+UmOMx120jbc/z78+++AXRxg+SctK8= From: Ondrej Jirman To: linux-sunxi@googlegroups.com Subject: [PATCH] mfd: sun4i-gpadc: Interrupt numbers should start from 1 Date: Sat, 12 Sep 2020 13:22:00 +0200 Message-Id: <20200912112200.226530-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200912_072207_824976_968BD2BC X-CRM114-Status: GOOD ( 10.07 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , open list , Maxime Ripard , Chen-Yu Tsai , Lee Jones , "moderated list:ARM/Allwinner sunXi SoC support" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This avoids a warning: [ 2.891592] ------------[ cut here ]------------ [ 2.895052] WARNING: CPU: 0 PID: 149 at drivers/base/platform.c:317 __platform_get_irq_byname+0x7c/0x8c [ 2.903212] usb 1-1: new high-speed USB device number 2 using ehci-platform [ 2.908930] 0 is an invalid IRQ number [ 2.911425] Modules linked in: sun4i_gpadc_iio(+) r8188eu(C) lib80211 ohci_platform ohci_hcd ehci_platform ehci_hcd cyttsp4_i2c cyttsp_i2c_common cyttsp4_core g_cdc usb_f_acm u_serial usb_f_ecm u_ether libcomposite sunxi phy_generic musb_hdrc udc_core usbcore sun5ieink [ 2.934048] CPU: 0 PID: 149 Comm: tablet-init Tainted: G C 5.8.0-rc2-00316-gc6a5213fdeba-dirty #8 [ 2.943027] Hardware name: Allwinner sun4i/sun5i Families [ 2.947204] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 2.953714] [] (show_stack) from [] (__warn+0xc0/0xd8) [ 2.959364] [] (__warn) from [] (warn_slowpath_fmt+0x84/0x94) [ 2.965599] [] (warn_slowpath_fmt) from [] (__platform_get_irq_byname+0x7c/0x8c) [ 2.973480] [] (__platform_get_irq_byname) from [] (platform_get_irq_byname+0x10/0x48) [ 2.981896] [] (platform_get_irq_byname) from [] (sun4i_irq_init+0x38/0xe0 [sun4i_gpadc_iio]) [ 2.990923] [] (sun4i_irq_init [sun4i_gpadc_iio]) from [] (sun4i_gpadc_probe+0x234/0x308 [sun4i_gpadc_iio]) [ 3.001152] [] (sun4i_gpadc_probe [sun4i_gpadc_iio]) from [] (platform_drv_probe+0x48/0x98) [ 3.010051] [] (platform_drv_probe) from [] (really_probe+0x1e0/0x348) [ 3.017152] [] (really_probe) from [] (driver_probe_device+0x5c/0xb4) [ 3.024081] [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) [ 3.031696] [] (device_driver_attach) from [] (__driver_attach+0x58/0xcc) [ 3.038966] [] (__driver_attach) from [] (bus_for_each_dev+0x64/0x90) [ 3.045886] [] (bus_for_each_dev) from [] (bus_add_driver+0x15c/0x1e0) [ 3.052892] [] (bus_add_driver) from [] (driver_register+0x7c/0x114) [ 3.059731] [] (driver_register) from [] (do_one_initcall+0x44/0x194) [ 3.066696] [] (do_one_initcall) from [] (do_init_module+0x5c/0x220) [ 3.073568] [] (do_init_module) from [] (load_module+0x20ec/0x2380) [ 3.080340] [] (load_module) from [] (sys_init_module+0x134/0x154) [ 3.087020] [] (sys_init_module) from [] (ret_fast_syscall+0x0/0x54) [ 3.093852] Exception stack(0xc8ea7fa8 to 0xc8ea7ff0) [ 3.097649] 7fa0: 00000000 00000000 b6fe2000 00003b14 00031284 00000005 [ 3.104596] 7fc0: 00000000 00000000 b6fe2000 00000080 00052220 be9fd940 00052246 0000002e [ 3.111626] 7fe0: be9fd79c be9fd780 00015bd0 0001dcf4 [ 3.115468] ---[ end trace df4dd47fb61bf5a4 ]--- Signed-off-by: Ondrej Jirman --- 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