From patchwork Thu Jun 27 12:43:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13714318 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (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 879A715ECDA for ; Thu, 27 Jun 2024 12:43:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719492209; cv=none; b=qmwsD+VHf1ypiXkBSYoXGR0TjnDImAcLgiTuk1Q7IG8jqV5NPSGufknp2PgZFnK/buDmolrtdcNzH/LYLY54uo1riKEAdwnQbohA8cOGIz0zW3k6p33CxPtb0ltc6p1L0lehJZfF7VGFoIvu0cVdX9cTFrswf8vL5kpuUrGaTUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719492209; c=relaxed/simple; bh=ExYCtX63CEn0F/NNc5KVhjdf/D7j6mzWCPKtIhlu6BY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=H9ivOOXPu0F1F/Py5/uBRIGycvJ6TNN3/DW4yuj0kz1Jjqak9EXuQTEABSAtz4yWimKQ78BBo6TicX9RNG/hmo9feEBnmFs39IyPfm3O1B57FwCl7e+Gd25+UzOJPQodVfXCaeoyh8ZmRf8IPO0nPGYIAYy4o0woIjs/CVnngUQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=fokESkpj; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="fokESkpj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=k1; bh=D4snzyMAEU6JEF 0uM9tuR/L4oH5JoDjLeAevy1y8a4M=; b=fokESkpj6GLroTNQ3xYIayYKXpC58C eCbROShd3XPjSEp8vis8ixX7v8yaJzOWcKPKKGCsuSDosYnYX1h5UMJot2AM4TFb dOFP0rVeqSX3LeZAMaqcEuY/GjKJFailrkDttSie5WPAPtZvaBTNjURhIBpiZRj5 j2uS0Atb3xg0Ka26HH4Mk5/j6IADSOyuOcRkRNH+mWF/ynuKWuYw+U3Lx9T3worI hb5lErOMUFMm5go63R0SdtTqY+7Tr7FSR2jt83jUQQLd/ZGtbSuN9n7gdMrokWVm +Xh6FIobT8qGQOolBBynRkcmlv7NmjRd4r+/QXeLKvaJ79Q88V3zISfA== Received: (qmail 911777 invoked from network); 27 Jun 2024 14:43:21 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 27 Jun 2024 14:43:21 +0200 X-UD-Smtp-Session: l3s3148p1@HUvded4bZtkgAQnoAGk/AEN12aawIPYB From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] i2c: add debug message for detected HostNotify alerts Date: Thu, 27 Jun 2024 14:43:14 +0200 Message-ID: <20240627124313.1811-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Setting up HostNotify can be tricky. Support debugging by stating whenever we received a HostNotify alert independent of the irq being mapped. Especially useful with the in-kernel i2c testunit. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti --- drivers/i2c/i2c-core-base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index db0d1ac82910..b94594e90a66 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1468,6 +1468,8 @@ int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr) if (!adap) return -EINVAL; + dev_dbg(&adap->dev, "Detected HostNotify from address 0x%02x", addr); + irq = irq_find_mapping(adap->host_notify_domain, addr); if (irq <= 0) return -ENXIO;