From nobody Wed Nov 27 23:42:10 2024 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E7C6184522 for ; Mon, 7 Oct 2024 07:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287394; cv=none; b=PCGTN1+0yFfJmUzaqPQfx6VI8UYKQbMrW48dc2kVkmuIFN0NFn/2z4TZFvR89f7wTUr/9AofKd0ipDKTWocencC4k1b4WMvpimzZszZBh3nzD6Z4Nssf5rFyFm/oyUxQSbXJxuTL6Otmmo2ScfYU6wGpA2CrLViB4cTuyXpRZDk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287394; c=relaxed/simple; bh=2T8tYH30WRVaS1BnNkar9yqr9aelKhvVz6y0UmGBm6o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ARH0TauPRuk092as/VvKgKOL493lOs7tQirY+eDz2WWW/qLKSZ26N5CmoUTz6AcHMFQlWB868V5ktClpqtzT65zodfZFBbUGF552AptXkbjof7HHkK6EBwr864WyE1E8W5pJUl3yRxqoJpz73yF6la+yanJ9w07jNL2/sD79omI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=ALZQC8HI; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=p7zIY+GD reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="ALZQC8HI"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="p7zIY+GD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1728287392; x=1759823392; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ANm8Z4Te3MXK2r5kc8MomW1f964Du2ZJDUS4MWPZa0Y=; b=ALZQC8HI03Oaz129Z1wXqTIBtLU7uX/yggwawbO8dFY2e2QrZspIe3w5 hRxhfZQj5PRSp+J4YbTHpSk+S2gtSuVJ1p7hlN3RCLGe03QjJxe9tpRlZ EDtsJCazxHE75/y+jsNaH+oPPaK2GJRf8hg3HRspzRAcPLFZvBVfjDfGI u6/rbFbkbyehZUw63QI/d59iTCALolb3w/11kj2s+Cqj3UXM3t8FPbZGQ TagzGiUyJUw6T2Ahq2T7ycP8nscQrzhswT8ilgz5RkPTWYBZUAugLuG6O QKl7JcEsHjb039Xx32amlt2lZXQkhJaWZ5qmnfvo0drTZ9P8vom0R+RVv w==; X-CSE-ConnectionGUID: T4OD8Tj8SweNORvPxuySdg== X-CSE-MsgGUID: 3Im8HEUUQ82M4qRDHWGykg== X-IronPort-AV: E=Sophos;i="6.11,183,1725314400"; d="scan'208";a="39297569" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 07 Oct 2024 09:48:43 +0200 X-CheckPoint: {6703925B-13-B2445409-D7D9D2C2} X-MAIL-CPID: B95D485A5DCFB51AC8B856AE57ADAD2E_0 X-Control-Analysis: str=0001.0A682F28.6703925B.00E3,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2579116BCC1; Mon, 7 Oct 2024 09:48:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1728287319; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ANm8Z4Te3MXK2r5kc8MomW1f964Du2ZJDUS4MWPZa0Y=; b=p7zIY+GDInShTcY9HBdR01RBFQvqcGjSkANoYm+7miLoEvguxq9QOSClpjq2DERS/KTSn5 z9CyyTdJZ/jEXG6/STQAQv1uz7iyTsOTNPSc6cwvIGEDThDK2LlqmH6fe6EqzSSt3qihWv qFTqKCoT8dJBc5p0N1fdjoE28rPvD6f6NBcHwygI0gDoH1GnBVKGoQQ8BYMWbt2KbhoqtV VoaMYpke9cbypm59D9Z+Vhn2d29DJG9Ms2sEGiOYwW4TJIDZDH7mYBXUvxDmPBYBDGFioa 4Al7D+uk78eQ+OOgkhOIrozIBG+ZmsF25nbki//ufwKXllJ56bd2ESp4TdSwZQ== From: Matthias Schiffer To: Lee Jones Cc: linux@ew.tq-group.com, linux-kernel@vger.kernel.org, Matthias Schiffer Subject: [PATCH v4 1/5] mfd: tqmx86: add board definitions for TQMx120UC, TQMx130UC and TQMxE41S Date: Mon, 7 Oct 2024 09:48:04 +0200 Message-ID: X-Mailer: git-send-email 2.46.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 This adds support for 3 new TQMx86 COMs: - TQMx120UC/TQMx130UC: COM Express Compact Type 6 modules with 12th and 13th Generation Intel Core CPUs ([1, 2]) - TQMxE41S: SMARC 2.1 module with Intel Atom x7000E and compatible CPUs [3] [1] https://www.tq-group.com/en/products/tq-embedded/x86-architecture/tqmx1= 20uc/ [2] https://www.tq-group.com/en/products/tq-embedded/x86-architecture/tqmx1= 30uc/ [3] https://www.tq-group.com/en/products/tq-embedded/x86-architecture/tqmxe= 41s/ Signed-off-by: Matthias Schiffer --- v2: no changes v3: no changes v4: no changes drivers/mfd/tqmx86.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/mfd/tqmx86.c b/drivers/mfd/tqmx86.c index fac02875fe7d9..e15b9be98c2db 100644 --- a/drivers/mfd/tqmx86.c +++ b/drivers/mfd/tqmx86.c @@ -35,11 +35,14 @@ #define TQMX86_REG_BOARD_ID_E39C2 7 #define TQMX86_REG_BOARD_ID_70EB 8 #define TQMX86_REG_BOARD_ID_80UC 9 +#define TQMX86_REG_BOARD_ID_120UC 10 #define TQMX86_REG_BOARD_ID_110EB 11 #define TQMX86_REG_BOARD_ID_E40M 12 #define TQMX86_REG_BOARD_ID_E40S 13 #define TQMX86_REG_BOARD_ID_E40C1 14 #define TQMX86_REG_BOARD_ID_E40C2 15 +#define TQMX86_REG_BOARD_ID_130UC 16 +#define TQMX86_REG_BOARD_ID_E41S 19 #define TQMX86_REG_BOARD_REV 0x01 #define TQMX86_REG_IO_EXT_INT 0x06 #define TQMX86_REG_IO_EXT_INT_NONE 0 @@ -132,6 +135,8 @@ static const char *tqmx86_board_id_to_name(u8 board_id,= u8 sauc) return "TQMx70EB"; case TQMX86_REG_BOARD_ID_80UC: return "TQMx80UC"; + case TQMX86_REG_BOARD_ID_120UC: + return "TQMx120UC"; case TQMX86_REG_BOARD_ID_110EB: return "TQMx110EB"; case TQMX86_REG_BOARD_ID_E40M: @@ -142,6 +147,10 @@ static const char *tqmx86_board_id_to_name(u8 board_id= , u8 sauc) return "TQMxE40C1"; case TQMX86_REG_BOARD_ID_E40C2: return "TQMxE40C2"; + case TQMX86_REG_BOARD_ID_130UC: + return "TQMx130UC"; + case TQMX86_REG_BOARD_ID_E41S: + return "TQMxE41S"; default: return "Unknown"; } @@ -154,11 +163,14 @@ static int tqmx86_board_id_to_clk_rate(struct device = *dev, u8 board_id) case TQMX86_REG_BOARD_ID_60EB: case TQMX86_REG_BOARD_ID_70EB: case TQMX86_REG_BOARD_ID_80UC: + case TQMX86_REG_BOARD_ID_120UC: case TQMX86_REG_BOARD_ID_110EB: case TQMX86_REG_BOARD_ID_E40M: case TQMX86_REG_BOARD_ID_E40S: case TQMX86_REG_BOARD_ID_E40C1: case TQMX86_REG_BOARD_ID_E40C2: + case TQMX86_REG_BOARD_ID_130UC: + case TQMX86_REG_BOARD_ID_E41S: return 24000; case TQMX86_REG_BOARD_ID_E39MS: case TQMX86_REG_BOARD_ID_E39C1: --=20 TQ-Systems GmbH | M=C3=BChlstra=C3=9Fe 2, Gut Delling | 82229 Seefeld, Germ= any Amtsgericht M=C3=BCnchen, HRB 105018 Gesch=C3=A4ftsf=C3=BChrer: Detlef Schneider, R=C3=BCdiger Stahl, Stefan Sch= neider https://www.tq-group.com/ From nobody Wed Nov 27 23:42:10 2024 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AD67187350 for ; Mon, 7 Oct 2024 07:49:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287396; cv=none; b=SsvnxEP7CRID6sHzTkSBMC1MAXCgaTD7XWxO9p0qTWGI11TsTBDSkAL+O7vDKk+w0y9ykkBT7i7HX8/FSAbgOmi0MOYU5gQfw0OcK7LvLwyZdHUZ+j/mE8i0V/EsqLMe2veSADb7zXdR8e6AYp9chplfsdI2PlaShFhr79tVFd4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287396; c=relaxed/simple; bh=t+SSc58pRa9dF96eiAENXfn6+7v89CEiXLw9/jLcoOg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=r3937KFrRA8CNtQms1Q0yZwOJXgJ1gGOidHd9l292ETNmqe9cEXY3Zx1E/wQI22Bmsq9Mh9m+CHc0cM/DO1201fnpiG4TSCyknbivifNqupXKbweOwdVMjh63vbyKej2MB82RfPfTrW16N2u5A333U4RKKhLY0FDiFElBazrhe0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=UCdxM4z3; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=nsQQT/wh reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="UCdxM4z3"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="nsQQT/wh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1728287393; x=1759823393; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zjq6/mLElLzForcfEdP7JJAydMypWN/J3ts8pfgq4bY=; b=UCdxM4z32SmqK9W/ZBng9taGHO4mqGY43JipLT+yNbZ3V840K6t5uVt6 5X3Vwh5gC90A/2OttAULFLRxFqr+eMfYp+om2HxPZ3Gs5SlfbDpSbe08A ZtilfOzyBeVZtqjS9g9aAcvXHoo1LyAtC3At4CLI2m5Afr7zAmx3RMvSu 5u8EV0u2aLLeRqqruoeHalUCTIjJJSfQecaId+5Xvvuo96jfyM4aLwoco HHUnKqnM/zzE8bgwPsp/No0rT+ySK9T8qhfI86EVncL7af/EfHPkQlI3z TODYdyjGS6Zao4CeSKPWKcrdTOiJl1uBDaA3eIw3DHwVO3mr16T+8jLRP A==; X-CSE-ConnectionGUID: bdTunqN2SUCQUzsR3ZWF+A== X-CSE-MsgGUID: d8bTec5eRCKZKTcSewTdwA== X-IronPort-AV: E=Sophos;i="6.11,183,1725314400"; d="scan'208";a="39297574" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 07 Oct 2024 09:48:48 +0200 X-CheckPoint: {67039260-3-514F5986-FE9EEFAE} X-MAIL-CPID: 93F41BF1A8196A682BF9D7703E417665_5 X-Control-Analysis: str=0001.0A682F28.67039260.001D,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9C5A016BD2C; Mon, 7 Oct 2024 09:48:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1728287323; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=zjq6/mLElLzForcfEdP7JJAydMypWN/J3ts8pfgq4bY=; b=nsQQT/whKreqMqcMHIpUm7Xyw0TwYeSUnI7n6VZL/q46lzMlH6Dh3TnqvU53tVXXYLRu/r RTjj6SC8KzLDE9O8zExGwtjjzhF7OBIfBomFsCosEMjiCUaEV369vmiuzMRgV7HdX8QKee xWAPVTGul6MET/jriBQ6D6jwZHc6zSS2UE6Fu1yMIOn21olELOrDqBFpwjvHOxNIwKkzE5 GDhtyKseI64EE/DQbPgozkquMWNSPZS4tzm1w7KYDwjPqd/g3PVm4pqx3/fdCuRZKwjrra Fn7leJVmowiKluvYBVZ96JZ0XrHrX02tuhX0hryzHO7Emmh0laK8qeVRA+GSBQ== From: Matthias Schiffer To: Lee Jones Cc: linux@ew.tq-group.com, linux-kernel@vger.kernel.org, Matthias Schiffer Subject: [PATCH v4 2/5] mfd: tqmx86: improve gpio_irq module parameter description Date: Mon, 7 Oct 2024 09:48:05 +0200 Message-ID: X-Mailer: git-send-email 2.46.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Clarify that "7, 9, 12" refers to the valid arguments that can be passed as gpio_irq. Signed-off-by: Matthias Schiffer --- v2: new patch v3: no changes v4: no changes drivers/mfd/tqmx86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/tqmx86.c b/drivers/mfd/tqmx86.c index e15b9be98c2db..7b2f9490a9af5 100644 --- a/drivers/mfd/tqmx86.c +++ b/drivers/mfd/tqmx86.c @@ -58,7 +58,7 @@ =20 static uint gpio_irq; module_param(gpio_irq, uint, 0); -MODULE_PARM_DESC(gpio_irq, "GPIO IRQ number (7, 9, 12)"); +MODULE_PARM_DESC(gpio_irq, "GPIO IRQ number (valid parameters: 7, 9, 12)"); =20 static const struct resource tqmx_i2c_soft_resources[] =3D { DEFINE_RES_IO(TQMX86_IOBASE_I2C, TQMX86_IOSIZE_I2C), --=20 TQ-Systems GmbH | M=C3=BChlstra=C3=9Fe 2, Gut Delling | 82229 Seefeld, Germ= any Amtsgericht M=C3=BCnchen, HRB 105018 Gesch=C3=A4ftsf=C3=BChrer: Detlef Schneider, R=C3=BCdiger Stahl, Stefan Sch= neider https://www.tq-group.com/ From nobody Wed Nov 27 23:42:10 2024 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 815F218A95F for ; Mon, 7 Oct 2024 07:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287397; cv=none; b=arsptPSe2oFZs3JFTmndMquGhszKBOjLb2OD2Ul1iqgiKPJ2XeY/2RzLlHBoAHFekdvx8A0Fo8sFmOMuakWsatoI6Kzo0cOIq4Zkjmy8l3GHkRKGwxZblPG5xoCWZkM0+GCMpEeaK/AdOazoBcGNZTNOb2wGcwvYpl9KMa6kCEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287397; c=relaxed/simple; bh=+JvcitsLBRq0PI86c4PobYUhsNFXv1qCXs/r9THHVXQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aS+CGo68TVy05xngiA6xXHUcqsbeOI/AnDy19HgIy6/GoUHdPhzeoYwqvIp7x722QAvwn4Xq/gqum3vM/dOED9PAiJ07TP131fnQ3E2c78VtOOQPYldaYfXI5arobq+2QOB23bVqnIYxJ3fDjMoYJubBZFPJYyHKNq7P343nLEk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=HJtk+Tqy; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=f/BL8tTT reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="HJtk+Tqy"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="f/BL8tTT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1728287395; x=1759823395; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=33Y+AmTApWWVjsUux29vl1VsE0lKQwC+p3SmjObu5z8=; b=HJtk+TqychTR8BwF7EhkT0z99kNE+cYMHGI2HUnSkjJwnydpPoxwP9Tp MHYoV+0j1VXvn1snStlE8ZExdE82aMDmJN3xcTr4tMIxARBO3PRVVF8DU 7Lq4m9oWbbuXOpBZ3mB02nJv+c/BGK8Ncaeh4y97JLCkWlJZQ/qSdAXFU jp2Jeqwkqa9J7PbNr2rFcPRvjEdWUaBp/pIft4wsDCzEMR/TKiPXvw634 8Lle2Gb4+MPFq6Brbc3TQa3LZzOIyCn3wmdtYF+onildtzi934xkJPrEO e0CG6pZ7iL46++MgyQpNofaIOqVF3gmOhvYD8hND7qv6mXedUb0x5ydzW g==; X-CSE-ConnectionGUID: F4IAbebaQbq3d7uZtZR+oQ== X-CSE-MsgGUID: DYCAL3wxTUmg2eGrT2DdvQ== X-IronPort-AV: E=Sophos;i="6.11,183,1725314400"; d="scan'208";a="39297577" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 07 Oct 2024 09:48:52 +0200 X-CheckPoint: {67039264-1E-514F5986-FE9EEFAE} X-MAIL-CPID: 36E0A6C5F53499E13ED3BAE7FE6E1F2D_5 X-Control-Analysis: str=0001.0A682F28.67039264.00FD,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0EA7916A9AE; Mon, 7 Oct 2024 09:48:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1728287328; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=33Y+AmTApWWVjsUux29vl1VsE0lKQwC+p3SmjObu5z8=; b=f/BL8tTTp9Q6hsyo+h09URWGTUjDytpesppZmwvXwfxgKQIPw8/IMZvrXwKd1dzcC1x4At IvVsGyrFapaB86+XVw1fFh+6RIUat4UAkZdR/cmyK3dKi7c8XgxoQYSkkkOUQNw0+wUQHg Y8ez/eF97HZ9BnPkZ3UywfDxedIIE4MP1DUjy5OcgfwPZ4wpijoU3A6aKNtPUxLHUkkVz/ PPwlmo+1IirurVP6zq4Ii+LKyvzghLqDRJApZwLrJsopT9+cByHldcnJrn8APUcAmMi+cw QExzvo0+4Pvx741lv0LOc+oItt5G4q7OjSOmXvR1FZAMy/aWOA3pUlt/X96D7g== From: Matthias Schiffer To: Lee Jones Cc: linux@ew.tq-group.com, linux-kernel@vger.kernel.org, Matthias Schiffer , Gregor Herburger Subject: [PATCH v4 3/5] mfd: tqmx86: refactor GPIO IRQ setup Date: Mon, 7 Oct 2024 09:48:06 +0200 Message-ID: X-Mailer: git-send-email 2.46.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Move IRQ setup into a helper function. The string "GPIO" for error messages is replaced with a label argument to prepare for reusing the function for the I2C IRQ. No functional change intended. Co-developed-by: Gregor Herburger Signed-off-by: Gregor Herburger Signed-off-by: Matthias Schiffer --- v2: no changes (was patch 2/4) v3: no changes v4: drop tqmx86_irq_to_irq_cfg() function, handle IRQ-to-register-value mapping in tqmx86_setup_irq() instead drivers/mfd/tqmx86.c | 59 +++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/drivers/mfd/tqmx86.c b/drivers/mfd/tqmx86.c index 7b2f9490a9af5..8aa448a67c9a5 100644 --- a/drivers/mfd/tqmx86.c +++ b/drivers/mfd/tqmx86.c @@ -186,33 +186,52 @@ static int tqmx86_board_id_to_clk_rate(struct device = *dev, u8 board_id) } } =20 -static int tqmx86_probe(struct platform_device *pdev) +static int tqmx86_setup_irq(struct device *dev, const char *label, u8 irq, + void __iomem *io_base, u8 reg_shift) { - u8 board_id, sauc, rev, i2c_det, io_ext_int_val; - struct device *dev =3D &pdev->dev; - u8 gpio_irq_cfg, readback; - const char *board_name; - void __iomem *io_base; - int err; + u8 val, readback; + int irq_cfg; =20 - switch (gpio_irq) { + switch (irq) { case 0: - gpio_irq_cfg =3D TQMX86_REG_IO_EXT_INT_NONE; + irq_cfg =3D TQMX86_REG_IO_EXT_INT_NONE; break; case 7: - gpio_irq_cfg =3D TQMX86_REG_IO_EXT_INT_7; + irq_cfg =3D TQMX86_REG_IO_EXT_INT_7; break; case 9: - gpio_irq_cfg =3D TQMX86_REG_IO_EXT_INT_9; + irq_cfg =3D TQMX86_REG_IO_EXT_INT_9; break; case 12: - gpio_irq_cfg =3D TQMX86_REG_IO_EXT_INT_12; + irq_cfg =3D TQMX86_REG_IO_EXT_INT_12; break; default: - pr_err("tqmx86: Invalid GPIO IRQ (%d)\n", gpio_irq); + dev_err(dev, "invalid %s IRQ (%d)\n", label, irq); return -EINVAL; } =20 + val =3D ioread8(io_base + TQMX86_REG_IO_EXT_INT); + val &=3D ~(TQMX86_REG_IO_EXT_INT_MASK << reg_shift); + val |=3D (irq_cfg & TQMX86_REG_IO_EXT_INT_MASK) << reg_shift; + + iowrite8(val, io_base + TQMX86_REG_IO_EXT_INT); + readback =3D ioread8(io_base + TQMX86_REG_IO_EXT_INT); + if (readback !=3D val) { + dev_warn(dev, "%s interrupts not supported\n", label); + return -EINVAL; + } + + return 0; +} + +static int tqmx86_probe(struct platform_device *pdev) +{ + u8 board_id, sauc, rev, i2c_det; + struct device *dev =3D &pdev->dev; + const char *board_name; + void __iomem *io_base; + int err; + io_base =3D devm_ioport_map(dev, TQMX86_IOBASE, TQMX86_IOSIZE); if (!io_base) return -ENOMEM; @@ -233,15 +252,11 @@ static int tqmx86_probe(struct platform_device *pdev) */ i2c_det =3D inb(TQMX86_REG_I2C_DETECT); =20 - if (gpio_irq_cfg) { - io_ext_int_val =3D - gpio_irq_cfg << TQMX86_REG_IO_EXT_INT_GPIO_SHIFT; - iowrite8(io_ext_int_val, io_base + TQMX86_REG_IO_EXT_INT); - readback =3D ioread8(io_base + TQMX86_REG_IO_EXT_INT); - if (readback !=3D io_ext_int_val) { - dev_warn(dev, "GPIO interrupts not supported.\n"); - return -EINVAL; - } + if (gpio_irq) { + err =3D tqmx86_setup_irq(dev, "GPIO", gpio_irq, io_base, + TQMX86_REG_IO_EXT_INT_GPIO_SHIFT); + if (err) + return err; =20 /* Assumes the IRQ resource is first. */ tqmx_gpio_resources[0].start =3D gpio_irq; --=20 TQ-Systems GmbH | M=C3=BChlstra=C3=9Fe 2, Gut Delling | 82229 Seefeld, Germ= any Amtsgericht M=C3=BCnchen, HRB 105018 Gesch=C3=A4ftsf=C3=BChrer: Detlef Schneider, R=C3=BCdiger Stahl, Stefan Sch= neider https://www.tq-group.com/ From nobody Wed Nov 27 23:42:10 2024 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22E4E18C027 for ; Mon, 7 Oct 2024 07:50:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287403; cv=none; b=T1JvX/joA6MRh/QcTWy44k2S9kyuhrc4a4Swj2u3IgdUQTsTJ6abD2DwLeqiyZ0fBj0ohxFHTpcHGTW/xCmZgOK4yd6RtExGvgRtw52k74oeHgdBao6jZl5jCZnsJcaCpLsupPWsit202flB6RySvt+uegyRpMLldgwMWGEaBHE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287403; c=relaxed/simple; bh=ccgRXV/sbGLbrv7yS6yGTQciaCzuc0wCuURVfvrCjfA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Q1q9eQJrjxlRt5Poq0dxNES6PVLkj4Wwaakadt0ZVSH0GxQlF0z4+qnRUzf1MF867zK5uhIu7dPCDakWPhTL/34wxZKFPmD+ao1zK4RKG6Q6FZB6XVAMvQ+MvqDWU4QuHoqNJJr7zcI8ihJY0GZtiuLkyu07TlqhVcMlmcW6IjE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=QzNrow6M; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=dT+piBa+ reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="QzNrow6M"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="dT+piBa+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1728287401; x=1759823401; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gV+HjTlsSJWYhabyWjpXtxtlpvti8ZSOvu5o7P88OBM=; b=QzNrow6MlzV8ZQTvxw8rWSu6cWsFO94IXMt644+DcqA94V+u+qL2h34A +O1GfFkC6d7HVBGn/NiBXeS3hs2uRXWxiKvytmmy+WRNVahUdgL/kA6yA z63J/6X2etalxaXT6+Z5EaJMQ+tpvnNbcYkP8LxTwXcMjTh35XjVtkF/d kp2YvgoQvnJJcPrSXWr0xYkLd6TTUbc4PbzivdXYxOXP/rE5Mt1QWKnhF QoBbyosvpIwIAaTb1CpXwDQ9GV9ovXuhEz/C6vx8T1G95aBHErat4MBcQ xJba5Tw9/nwY6feaP2LFFGosBVo5oDREDiG4mUfm2wCkJZ15bN3QIkMYV Q==; X-CSE-ConnectionGUID: VgoEKYTkQiewIZ9h4fqgAA== X-CSE-MsgGUID: FhvVirYIRY+iIC+9xOUi4w== X-IronPort-AV: E=Sophos;i="6.11,183,1725314400"; d="scan'208";a="39297581" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 07 Oct 2024 09:48:57 +0200 X-CheckPoint: {67039269-7-60D1B728-D7971DF8} X-MAIL-CPID: 790FE4BFD5C18DD35A8F3C31BFD46F5A_4 X-Control-Analysis: str=0001.0A682F28.67039269.0038,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A683C16BD32; Mon, 7 Oct 2024 09:48:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1728287332; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=gV+HjTlsSJWYhabyWjpXtxtlpvti8ZSOvu5o7P88OBM=; b=dT+piBa+GwgZ2ciNOq0Oj9PXbarozKpWW9uOuBpv8CEVxebGAz+n23YNfqj8segibHH7eL lhGtknDSZwYvzpqkEy1qitYT1sKZdERs2LgCWJikhQ5Xt1iiohhwn4l0oTnSdz5cJgQWAi k1KdTQILjqe8wLzn0joRgZmhR7tYGeAZKV1Gox7GmWSXCD9K2RdtbZx8otDAlGJ08zADJz DMvChwCHPOeumARTdjXfpLA7plZb38p4fFcD4V2Newt854gOdVE2VIDv4NnRtwSiiAV6lF BE1ruujSEsSYMM8f+f+rvsnUrhsYXJlP6o2Wmm1QeUSiA0vcZB9d14JkVlLe9w== From: Matthias Schiffer To: Lee Jones Cc: linux@ew.tq-group.com, linux-kernel@vger.kernel.org, Matthias Schiffer Subject: [PATCH v4 4/5] mfd: tqmx86: make IRQ setup errors non-fatal Date: Mon, 7 Oct 2024 09:48:07 +0200 Message-ID: <4c1d5044eaeae67854a7b9c97f364648b275b710.1728286453.git.matthias.schiffer@ew.tq-group.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 GPIO IRQ setup can fail either because an invalid IRQ was passed as a parameter, or because the GPIO controller does not support interrupts. Neither is severe enough to stop the whole probe; simply disable IRQ support in the GPIO resource when setup fails. Signed-off-by: Matthias Schiffer --- v2: no changes (was patch 3/4) v3: replace IRQ 0 resource with an empty placeholder to simplify error hand= ling v4: no changes drivers/mfd/tqmx86.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/mfd/tqmx86.c b/drivers/mfd/tqmx86.c index 8aa448a67c9a5..e444fcd2a3e9d 100644 --- a/drivers/mfd/tqmx86.c +++ b/drivers/mfd/tqmx86.c @@ -68,12 +68,12 @@ static const struct resource tqmx_watchdog_resources[] = =3D { DEFINE_RES_IO(TQMX86_IOBASE_WATCHDOG, TQMX86_IOSIZE_WATCHDOG), }; =20 -/* - * The IRQ resource must be first, since it is updated with the - * configured IRQ in the probe function. - */ static struct resource tqmx_gpio_resources[] =3D { - DEFINE_RES_IRQ(0), + /* + * Placeholder for IRQ resource - must come first to be filled in by the + * probe function. + */ + {}, DEFINE_RES_IO(TQMX86_IOBASE_GPIO, TQMX86_IOSIZE_GPIO), }; =20 @@ -255,13 +255,9 @@ static int tqmx86_probe(struct platform_device *pdev) if (gpio_irq) { err =3D tqmx86_setup_irq(dev, "GPIO", gpio_irq, io_base, TQMX86_REG_IO_EXT_INT_GPIO_SHIFT); - if (err) - return err; - - /* Assumes the IRQ resource is first. */ - tqmx_gpio_resources[0].start =3D gpio_irq; - } else { - tqmx_gpio_resources[0].flags =3D 0; + if (!err) + /* Assumes the IRQ resource placeholder is first */ + tqmx_gpio_resources[0] =3D DEFINE_RES_IRQ(gpio_irq); } =20 ocores_platform_data.clock_khz =3D tqmx86_board_id_to_clk_rate(dev, board= _id); --=20 TQ-Systems GmbH | M=C3=BChlstra=C3=9Fe 2, Gut Delling | 82229 Seefeld, Germ= any Amtsgericht M=C3=BCnchen, HRB 105018 Gesch=C3=A4ftsf=C3=BChrer: Detlef Schneider, R=C3=BCdiger Stahl, Stefan Sch= neider https://www.tq-group.com/ From nobody Wed Nov 27 23:42:10 2024 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 830F718C03F for ; Mon, 7 Oct 2024 07:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287406; cv=none; b=L2T3+5ourBU7SLMsEUmQaDjoEGvgJvZlrufFzqQ7DijZ1rsq992AORzUelliPqJ3YdndQpKM07/Y2W8UX0dU4QgOAR77AQOOzz76BUptBgYc/MDY+QLnfYR4P5McMaLbQMBUOV8FZBWQMRcGazGYEqvzn+Ao9hqjW13UAq4jTKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728287406; c=relaxed/simple; bh=jxkavo/tM+rYCI+t0fbmVZXkphZMNzEIWwdjBYEI5ls=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X3cED82A5IKcJnT9P6xKJkfXRRnkyQSgoKbruXFrIei9b/ECzRv67ggfYRsvovVGF6SDidaK/dsSRflqFw3kYD3aryBeK/fZu5dMraGf+nvxvqBHdTL/8hW1oI2t0fPUr65GBxgs/zvnXL+JSf7MbYXeHZV0aes9DE44TFP6Oj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=nq6xIRkz; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=PbDB2P0i reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="nq6xIRkz"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="PbDB2P0i" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1728287404; x=1759823404; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JHI/TzT2XeV1xxP38MEeTQKqc+rV2tkJJ3sIpKxqutY=; b=nq6xIRkzIqiYaZ0oG3nCOnWukGLDRR6Q6Tw3WybSuAqdDYUmQ6moxOA/ KiTtukHT0RmNsRc+yTbYoqDI6OQjLVRKP4eG7XGxLg//1z06IkJ3Tm/zd NqcsHaNlw30U6BdTaQdba8QGo9pgBwYHEZ7nsbM3G0GpuVH1+bYD5JHNG +eTB+r0jlQgr8NgbBXAQ79S0lv9XX7xhVEaekqNdn9XZugGxHBAgloQDm 0Ro7t91Uq/ywefrYod92lshbqhgItGZ8GjF2mXUuiw/Z52XF9Y5hMAIsT WZJKeHp+i3ZrBM9VlueigwliTACpP7BPrGZJe3iM6tfI4qh799C2NEyYl Q==; X-CSE-ConnectionGUID: WusW+MpwS/Sju6ZJKRWpbA== X-CSE-MsgGUID: zVTwcZhxS2yK6den+j9hzA== X-IronPort-AV: E=Sophos;i="6.11,183,1725314400"; d="scan'208";a="39297584" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 07 Oct 2024 09:49:01 +0200 X-CheckPoint: {6703926D-1C-57F7EB54-E9270DBB} X-MAIL-CPID: F573D7437B6156EFD848842CE7118E67_2 X-Control-Analysis: str=0001.0A682F1A.6703926C.0089,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 15CC916BD56; Mon, 7 Oct 2024 09:48:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1728287337; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=JHI/TzT2XeV1xxP38MEeTQKqc+rV2tkJJ3sIpKxqutY=; b=PbDB2P0ijDZ8YaQVX+zVyIsXLMe4r2QBVnOhEz6r8wLD8+YxIx8NoAbiJTmRpCjSTXI/ZT nEGs45S0EN43U9N9BeRNezZs/4lPeWuhupmPFWA1CshIL3/DV2H6J37JQUy5Lp/BvQDRtg RoreOYsVHKJTnO3/k936iO8dVBOiejRZlgS2wfJZcFgwdmb2dKJI2f7hUAi+NhLkAP7Mm0 4Fj7GbKNipSZZ0YNy7EbEWcZ1V+UpTqD6y190OJwMz9dGv5GXi7nbgF72kDeEdc8dvuX79 qq4bQhLndn6f0w5vJkMo+8fPi3KC+BP2cfd+pHkFa3/kM1VVqq23xjZb0KInMQ== From: Matthias Schiffer To: Lee Jones Cc: linux@ew.tq-group.com, linux-kernel@vger.kernel.org, Gregor Herburger , Matthias Schiffer Subject: [PATCH v4 5/5] mfd: tqmx86: add I2C IRQ support Date: Mon, 7 Oct 2024 09:48:08 +0200 Message-ID: X-Mailer: git-send-email 2.46.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 From: Gregor Herburger The i2c-ocores controller can run in interrupt mode on tqmx86 modules. Add module parameter to allow configuring the IRQ number, similar to the handling of the GPIO IRQ. Signed-off-by: Gregor Herburger Signed-off-by: Matthias Schiffer --- v2: improve module parameter description (was patch 4/4) v3: replace IRQ 0 resource with an empty placeholder to simplify error hand= ling v4: no changes drivers/mfd/tqmx86.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/tqmx86.c b/drivers/mfd/tqmx86.c index e444fcd2a3e9d..057d035b71d33 100644 --- a/drivers/mfd/tqmx86.c +++ b/drivers/mfd/tqmx86.c @@ -50,6 +50,7 @@ #define TQMX86_REG_IO_EXT_INT_9 2 #define TQMX86_REG_IO_EXT_INT_12 3 #define TQMX86_REG_IO_EXT_INT_MASK 0x3 +#define TQMX86_REG_IO_EXT_INT_I2C_SHIFT 0 #define TQMX86_REG_IO_EXT_INT_GPIO_SHIFT 4 #define TQMX86_REG_SAUC 0x17 =20 @@ -60,7 +61,16 @@ static uint gpio_irq; module_param(gpio_irq, uint, 0); MODULE_PARM_DESC(gpio_irq, "GPIO IRQ number (valid parameters: 7, 9, 12)"); =20 -static const struct resource tqmx_i2c_soft_resources[] =3D { +static uint i2c_irq; +module_param(i2c_irq, uint, 0); +MODULE_PARM_DESC(i2c_irq, "I2C IRQ number (valid parameters: 7, 9, 12)"); + +static struct resource tqmx_i2c_soft_resources[] =3D { + /* + * Placeholder for IRQ resource - must come first to be filled in by the + * probe function. + */ + {}, DEFINE_RES_IO(TQMX86_IOBASE_I2C, TQMX86_IOSIZE_I2C), }; =20 @@ -263,6 +273,14 @@ static int tqmx86_probe(struct platform_device *pdev) ocores_platform_data.clock_khz =3D tqmx86_board_id_to_clk_rate(dev, board= _id); =20 if (i2c_det =3D=3D TQMX86_REG_I2C_DETECT_SOFT) { + if (i2c_irq) { + err =3D tqmx86_setup_irq(dev, "I2C", i2c_irq, io_base, + TQMX86_REG_IO_EXT_INT_I2C_SHIFT); + if (!err) + /* Assumes the IRQ resource placeholder is first */ + tqmx_i2c_soft_resources[0] =3D DEFINE_RES_IRQ(i2c_irq); + } + err =3D devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, tqmx86_i2c_soft_dev, ARRAY_SIZE(tqmx86_i2c_soft_dev), --=20 TQ-Systems GmbH | M=C3=BChlstra=C3=9Fe 2, Gut Delling | 82229 Seefeld, Germ= any Amtsgericht M=C3=BCnchen, HRB 105018 Gesch=C3=A4ftsf=C3=BChrer: Detlef Schneider, R=C3=BCdiger Stahl, Stefan Sch= neider https://www.tq-group.com/