Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp903638pxk; Sat, 12 Sep 2020 04:24:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+mzLdfjeI+0hjeF2e1sY8+GtnQLMSMdEbUd5cg0wZbHgRPjxoEInEuoleApKVFvYP6LwL X-Received: by 2002:a17:906:3f89:: with SMTP id b9mr5833827ejj.463.1599909867457; Sat, 12 Sep 2020 04:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599909867; cv=none; d=google.com; s=arc-20160816; b=NEt6DGyEi56gu2G5zuClQxvk6itG9G0ZW5cvxdhVpyt4PvixsctfrrGf9PTxCprPKq 6MN6QlSaUvOyaBL5c8iHseRul6EYqyKukWn3VRGAbSmHSCDqKE5pte6odE0n2b260uSE qBqollMDm9h8OOB7P8PU7uiWuOn85rnualxl4e1HfARRQxUhGtIiJn/wRts83xUE07H1 X59+wJdpR/UiIwkS/s/ihv6SaYoHZh2GW+/LogO+Cx/7ePLxMJwsQeEGU1tfKjDURDHk wUq+zJ4GBPaQO67pTZh+YCB24jClrJ/16zDJIZLazkNe0vbm6FEz21UbR3Nxbd9Jgp2l JGXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dv0PbQUcx4V4m2SwGWz1T6/bqU4bWrlQtPUXRBMDats=; b=Bn2GW9860es9y+461kH5ZQVzdoEQ3SRn1H66gHPrOaS5IWhOsD9qRe8jad4X1gqw++ 7usPzq9Oby0DUnjjTeJx2CP0bq/J14D3J6Pw8FaUP1+tt3FShDHO0NMrai7ryc82R5p0 zvcfQae1v4apT8mJygJSynFgwdYX5U80DFpHghEEKyo8wDTqep6MN6uFznIUcAYGbx6l bb3dpElJdSNlq3dktyMYiXED4qXzt4Xm411ZnxCJp5f1I2OnnzPRT0dayKdqp59nXJU9 eXmkWFepY42sLhTzVxEI4ZiYfLI+b4kzY32v6fncme3upSuEi5lDrQhMeR6Wt6hQxKyE upfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=i6sRXRpt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si3241819eji.430.2020.09.12.04.24.04; Sat, 12 Sep 2020 04:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=i6sRXRpt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725857AbgILLWn (ORCPT + 99 others); Sat, 12 Sep 2020 07:22:43 -0400 Received: from vps.xff.cz ([195.181.215.36]:38394 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725820AbgILLWL (ORCPT ); Sat, 12 Sep 2020 07:22:11 -0400 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 Cc: Ondrej Jirman , Lee Jones , Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Allwinner sunXi SoC support), linux-kernel@vger.kernel.org (open list) 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 -- 2.28.0