From patchwork Fri Feb 2 07:58:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 196468 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp262516dyb; Sun, 4 Feb 2024 01:05:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhRwpfYFRvzD+hYhDRynY9E8EMinJC9L7r+jWsUZKnX+88IZp7RHt5ECWyu4D2Ccz2/KGZ X-Received: by 2002:ac8:4cdb:0:b0:42c:2221:4daf with SMTP id l27-20020ac84cdb000000b0042c22214dafmr221555qtv.9.1707037516870; Sun, 04 Feb 2024 01:05:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707037516; cv=pass; d=google.com; s=arc-20160816; b=Xs5b/c4i8wqvdkquu/hSOrghdU/TtWpPP+rdM329JjjkORo8KNQB1fseZHAdz9tXxk M7l+E00xmNYCh8GFy5o5mPOu7tg3auyWrRzkJXut8g8SmsqQwLZI6jFVPLD2lfqaLNhg 7BWo3cx1duDOKswtJiMLP8de2aSLn6Ye/GXDYLf/mADTMRHHcRMg+caNy2ORgZ5HCl2k CIJE59hL4TpxrfaI9oTMz+GXQcRgrdxZmHuJjNawIGstYA9MisYMSaQDvaRLMofF3CgU HEKm3WpMMPq8Xk77lR9Rz0+W6TXh3blCLRYcpyCX/9XLaPuU96Lw6PCVY4d1abFSii95 Wzaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=p8cCr64N1JsMEoZ+1d564+a2bzrjumeQcr3OZEAgKNY=; fh=v7w26QIeC+8y/xVfbSuZwnMM5VfKi2skilyWQi/g4vM=; b=o7t+Q6vtaSYD8P66MWqiU3Dpi6PjrO0gZgvZMb40A5qC9ejduzUO02FFMVCVtGvSdL p2i/kz7NVv5t0qTIat/VBCC6VoNbyUdDqMAbvW0+puFV3/liKFRsXkJfvv9rSDmWsjQK QVcBHy9iKKmp+jK5NLCFsfcPQ+QLKCZWj1FQqltwHtYYvFfS1+/D4eUOd3c9QHQCDlSJ UBwyKhxISjlYbwDl0BxgJgjjqIOiLXLjHpNDx/NQTWTvSF08Jce1G3yM3bqKhoKSuNFl Ms+csL5P0IqCDKb/ouo9WL7pOC33BdwQ04WBAlgVFzs1QIvpaxpzobvHQxYivAyhw0yn +Y4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=fvEVnsR4; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49395-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49395-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWpB0eAcnMnFURrZ+kGMOU7cQMYzxbRja9OyqPFoTIY490BgEXnmLL+p+CFABD+hagkwBs++jq9a/qGXWFOe1c/XWKNrw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v13-20020a05622a130d00b0042c075a066csi4710082qtk.490.2024.02.04.01.05.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 01:05:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49395-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=fvEVnsR4; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49395-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49395-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D14001C27FF3 for ; Fri, 2 Feb 2024 07:59:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6576918628; Fri, 2 Feb 2024 07:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="fvEVnsR4" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C48AF1802B for ; Fri, 2 Feb 2024 07:59:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860744; cv=none; b=LhIKEVRIDNYK3AmVRwK/00Fo9z/UydmTok22YvP3do7Few/at2DFnPhXmkuMsgWV9J+uaT2yA1MZBtuGQO+1jzgu/+iCyd8hNf1K545ElZdJC+XE09ZeSchcX0lMEpB0u3nbhLcnrtvfkxiznJJn8h9mzvvjjlQUwVVC9EvLi5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860744; c=relaxed/simple; bh=yJzsH82YeRNBn2dhKcVTfTPMcEuF/ATViwGVT4cd1I0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qa8gkAcF8uAFYMRZ9v+8U4dIZzpv+P3wZmyAU/bvNhggSSp2SSwvMvb0OXFXhu3epOdxqRl3+/g6LCPRji9PDgg8n/+wCy80Eel0c/GnfRROq9IBJfNgNnXVqSdeVQGCXtTOk36oEpRaDuUxTH8lLtf7eynyycY0gr8LWrxEwj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=fvEVnsR4; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a359446b57dso228177066b.3 for ; Thu, 01 Feb 2024 23:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860741; x=1707465541; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p8cCr64N1JsMEoZ+1d564+a2bzrjumeQcr3OZEAgKNY=; b=fvEVnsR41ED3r8njay+mnxtagW1ChbRZIth2uKgrsYfAM3gLCDOHBw8x+QQG3harbC amzSBB1QDTAA+LEQTyry1XL8ZQVF6d2rG207jEySRIwhqnfY4JNeOvtwZ9kO4/7aKoFU IluaAqXulxXupc+DZ5S95pDM/TxXi2/9rA70pY4Gf4A1dJIQl/lPKzH1syO/n6qzfz5k OZNxi1b14CnwInaiAEc/g3/YOCVIy8xTz91v3vmiQ5jGK3dQYMMvSuaKHLBSfCWd2O1P a+HZzWe+2MKUBiQcw6wlNCQtJXsCXox2LMteiHBMpWpYv31AbAKVK+mxoEltnEKckoXn 5DJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860741; x=1707465541; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p8cCr64N1JsMEoZ+1d564+a2bzrjumeQcr3OZEAgKNY=; b=MmUsJefZ55fs74lHQGFTdJHm2LoFzGLdJ1Q0QAggZ2Ni57KPK9C3WuLYEm01YhsaRe eSttjCQwQ5g2QOkIhP5yT307u3GRDStt/X3n5Z/RCH2f7UrXv2/Hzatn/TDMfOXgB5rE DZUWs92Wk2vVkuKE8tJ7yk6FnLzuIsrtCyyjwsge+vlv9C/T/uNpKCC8z00ZBycXKtKC Js0IEeNO/Oxbi5XqPcNVxzhKBH5aW7XH1qAB/SObEuXCu0uPlowYez81aKh6JoDLACHC TvvIGhQa18xp2nzEmpK7+1LK/HWeX8HXvxg/R3wHZV6mF+LSK8Ey47etpC6WZgnHdWMQ XJPw== X-Gm-Message-State: AOJu0YwAl/WAATaz7QtJgNFTJwpycoaKQOKNUn5lhL7JYU8yIFGNt9Va vpQaZXtWTzEA4sTmZyZ3n5O/2Ygdfdb4AUTO6FAyUUs4beINH4PPPwiub4TzW8Y= X-Received: by 2002:a17:906:354a:b0:a31:13ce:d64f with SMTP id s10-20020a170906354a00b00a3113ced64fmr3285200eja.55.1706860741109; Thu, 01 Feb 2024 23:59:01 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVpTJHJKxVg8GTn4YDufRWJrrmsQBL8RUvAsU3w2F+15W0zkRQwDXjoxxi/zMh5TVzZlgLZciqOSamupsEtYH62KXZl09xdqfR+OVXVBJ25HO8UkYq1dREq1Qv+fSqJygBfTOj41vOT/JArPmJGG6pYgcTctnugIN/OXR/6veFjTUWRdGlbmzpqfazq/5Lky2/1NnvcZyl1kj8r2lbR8fJmcCdjaFH22hLXGkLrs/6M7RWVtY601axImGsZLyRYMlPWigF83LwdQ7KQ1qetJpUcTbC4rfDXqQgeNR1fAtuVMhr9Ye9XiM2FZ0s/MxIo6gzYcuCqABTApCTvbJjImV5NM8MVbXvqrmoBLeHqeSMDlP7aiE1dTx6gzYt6q6g47TxVwJMl8Y8n5f3cDfULSEQgdR46ptR8ioHSeH0a/RIJg0YS5lhEMT1piy4Ne4kb7YbA9VcCRqX0/5GpJ8ppxHBxNQgt8c+WPulasy2nIIO6DBprWx6Ruo7U3O3PvkIsaBF8BWLSaHCK1A== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:00 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 1/8] watchdog: rzg2l_wdt: Select PM Date: Fri, 2 Feb 2024 09:58:42 +0200 Message-Id: <20240202075849.3422380-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789773492629613501 X-GMAIL-MSGID: 1789958571391101993 From: Claudiu Beznea The rzg2l_wdt watchdog driver cannot work w/o CONFIG_PM=y (e.g. the clocks are enabled though pm_runtime_* specific APIs). To avoid building a driver that doesn't work make it depend on CONFIG_PM. Suggested-by: Guenter Roeck Signed-off-by: Claudiu Beznea --- Changes in v3: - make driver depend on PM; with that the "unmet direct dependency" Reported-by: kernel test robot was also fixed - adapt commit message Changes in v2: - this patch is new drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 7d22051b15a2..c9abe8f307bb 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -910,7 +910,7 @@ config RENESAS_RZN1WDT config RENESAS_RZG2LWDT tristate "Renesas RZ/G2L WDT Watchdog" - depends on ARCH_RENESAS || COMPILE_TEST + depends on (ARCH_RENESAS && PM) || COMPILE_TEST select WATCHDOG_CORE help This driver adds watchdog support for the integrated watchdogs in the From patchwork Fri Feb 2 07:58:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 196214 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp926269dyc; Sat, 3 Feb 2024 01:16:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdzZZJWR9VJA9tEXuAXVRS/JB54gl/xJdZ0kzcukDtTQwBsNJ506JzN+kD6pebcn3AQ+FG X-Received: by 2002:a0c:aa16:0:b0:68c:5027:4cf9 with SMTP id d22-20020a0caa16000000b0068c50274cf9mr602116qvb.62.1706951811348; Sat, 03 Feb 2024 01:16:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706951811; cv=pass; d=google.com; s=arc-20160816; b=CCrqS5VDgp48Aw5L42IsRokiAN/GagsU7dgC2OiulXjgqOqp9WUltNGoM1bpILRsIP bImVwjHYt3tLUm6P5INfTeuf34ksL6KMSbZX8LEi9JF7Xk0KHA/JPbK4DBPhAvayeAlb 6rC1RroZhnAEkHy9eX75UuTh8FDDpGNZXF3BwMxoVwGcbDEFGYizECP668dyzJVzndXM VUScWEV9eD3tJ2Sur1970efC2w1Dwey6E7/0WHvlK0dDzTuxaOCWoekb2oRt0AFmHcK/ lWNYWVvPRoeRlKO0RrO72KYQp0PRVpL9Ir0h+BgzHVsLvxUkLItRIdRlNFSewntIkoS6 1nHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dhYYbup+eKhaPA6BfUacQBCWMwe+8QZnL1UV9+O6b0U=; fh=88Z78oRhw2W0YXgDrw42xGPTDsMN0rLCUKEP5fxzZPA=; b=DVCd2fa22z70C7kbiaswnV4J0lj1kKxGtnhyOnNQ3ehXH4fkKWr4ghOPNnEPJLMtpQ vXvOmhbJIS2XbbQ/LzFQlMibgop1XFSeUhmJIlL0GJ1TCcOZB/k4HTocfQf2ky24XKKl CRETFXyyd+FLajVG2GgdIi0O7ECPGsxq30MbXOTbhyp7COHkH4hyABWZnyKuQmH1+f8e SJXG3Btu05QpnG6utndoiJtNiWCNcQOF+bhd8jth+EtZzH8zz8Esl6t+8YBvYhAVey6r QE4GpbvZT/tXh4y5GWCvOYe8zesgdCTl1ZiQt1KhLbkIpwCQ0f3UR6y0oqMCFSh3Xont /maw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="mL/lkpD5"; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49396-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49396-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXHvNAmZBJqVVu+fzcMrdd2hRLZK+bQODwi2XmzQwMUluAqP0zztUKbFBfdftEXmpQBZqqQVeaYLaHAV998FMfGe2DNhA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d5-20020a0cfe85000000b0067a8bf10affsi3878575qvs.220.2024.02.03.01.16.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 01:16:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49396-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="mL/lkpD5"; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49396-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49396-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E3E361C28746 for ; Fri, 2 Feb 2024 08:00:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2AF0618EA2; Fri, 2 Feb 2024 07:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="mL/lkpD5" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7619517C79 for ; Fri, 2 Feb 2024 07:59:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860747; cv=none; b=H0Z/xjkBW+QCfCTOEYwTaO9HBD2m4ObfBfJj+yFtF4lefq3Qs+TmVfUaqPly1Ho4saoJre6xujayDehjvCUyHi25JJSLa7uBlHOD+8ndXUI3Bp+9M+Sc7MgovfrJHTdePOI20P572sZ578cN4HkOMDLNhpIDZ8J196kgXCWWUbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860747; c=relaxed/simple; bh=udn490QalxCFr/hQufWrgoKRZtKIHoOL7E9IdCmRySE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RIQO+mDNCmqypEyu8zFi5oWRxmL/127ktU3F71Z1+VnzGSW7LDYn8eR0QheZk3/zSq0dy/W7MwcVRJQt5PIcho/BTIGkwY42+6LBvkHsV/hX/CqdAAKmBLuHR/NOPheOxKd2QcP6vh6BZMQ+KfdE/5v5LJD42zCeVLPPCf0aNgE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=mL/lkpD5; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a28a6cef709so249979766b.1 for ; Thu, 01 Feb 2024 23:59:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860742; x=1707465542; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dhYYbup+eKhaPA6BfUacQBCWMwe+8QZnL1UV9+O6b0U=; b=mL/lkpD540r7YoQjf7CycijONXR59fFuxZ2j1zbQy76uC4Hgkd0paqFdmUeapH4aOP m+1FuvbwqsfOXEQqPYjW5BB1sguxU12AQzQp7+L6385pKh9JUi4wmjSa10UH2dKXHbDk eDH1cAGLl0RBwVA4CE0RnrfHKYMQ1EArp2WSfKcswVtq/gLPKh25DAgd/ZW+3apL/qCL KtHbTbWFKlIukeMbTSwXFrjxGa0UkzmMGdsmPiKO5xYbQw3a3R5BEjjXZMYqUKJSDC/I OdrZ17a4TbMqVyus9V7I1iRBgVys766GO+l9C6KwzQY9Fn79xre19fvBrVBAk4UHdQG3 vY9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860742; x=1707465542; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dhYYbup+eKhaPA6BfUacQBCWMwe+8QZnL1UV9+O6b0U=; b=wLjTOUAHVVbc96aqGzPNcQZVoKBUlJVyO0Nq1NnwIFVhb5oLSwd1vZy3siC6Ptln5X As2JAS7R8lN3Q2QUdO8VDJUS+Ao4yxWDpjQ+DhL9d4e8CutgudtNdAEov4AjHa+3/JLB yZK2B45DxnrBwqfDRV4HB6j9Ze/ctx+lAQvW1rOAi9DfyoYCto+sTO0+IcUXV7/QMi3o 1xeIuEKMtKxwnRL1M2nmOHIDSu74dJiDvYphszOJp0dc0Ks2pZdQknqIyss4Oze3voiS iFmh0mL0lUzvwci42RqZbwT3dnhAJ/LIlIyAyp8gWLyhMByk+xwWVmNbYfU82bau529Z MW8w== X-Gm-Message-State: AOJu0YyaoE0l+73ejjqIhByk7+8bI7fzI4gQ5XTmu8YpIZ2FWitCZW9R y9poloZkAhjpXQAMZKOjiU1/ZPXT3lZp5cjjP65tDmLdbMGmF5x760oz/T+92J4= X-Received: by 2002:a17:906:f913:b0:a30:a7ad:bd42 with SMTP id lc19-20020a170906f91300b00a30a7adbd42mr998760ejb.38.1706860742536; Thu, 01 Feb 2024 23:59:02 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU3OI7/jNCnWdUj+Wlp315d9D73ejTWw7lQwrWFtZuBfu2otE8jDVlA5CLNLkfwdcZVLLS8rHeEMLQBvYRiF/hqAYgtjrBIMzjFZsi0XX/RSmMpLwrrJ1EQKQcdHIPtYawPXrdRYoWK7cD8Rylw8DI0Wp6+5QGOa6Q3M1OajlwT2X2sREYxgy3yTkP4TWEbgSBrJSiGPSyL19wxqkTCGWZel+4b8P5kKuyvuAp5JnpFMa049K8fMBtPjzG9Zz9Z1nHckrXF+4D5nqGjmm9TFamsmeURqJkW+b+etRpcSRg73y42xR1RNaN4g90qwDDY+eLxPISgIwha5xHVVUiunzkZEaa657RekwthGOhnHyEMkBVFA7rakEVdXlHjHj2m72vWQqbh6HZS7RJGLa3BF2GW0da6olbaO2jIs5Gw6Nggw2tNJgQg7wvG5hfPyws9tADNy+NLMD+dSPoTrYWve88nTaMOanBfjX60KkwQXqEr4Ob6eM7ndFzmFBTAnL2p0y2nVutTtuUcBg== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:02 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 2/8] watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get() Date: Fri, 2 Feb 2024 09:58:43 +0200 Message-Id: <20240202075849.3422380-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789868702340243870 X-GMAIL-MSGID: 1789868702340243870 From: Claudiu Beznea pm_runtime_get_sync() may return with error. In case it returns with error dev->power.usage_count needs to be decremented. pm_runtime_resume_and_get() takes care of this. Thus use it. Along with it the rzg2l_wdt_set_timeout() function was updated to propagate the result of rzg2l_wdt_start() to its caller. Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L") Signed-off-by: Claudiu Beznea --- Changes in v3: - none Changes in v2: - propagate the return code of rzg2l_wdt_start() to it's callers drivers/watchdog/rzg2l_wdt.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 1741f98ca67c..d87d4f50180c 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -123,8 +123,11 @@ static void rzg2l_wdt_init_timeout(struct watchdog_device *wdev) static int rzg2l_wdt_start(struct watchdog_device *wdev) { struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); + int ret; - pm_runtime_get_sync(wdev->parent); + ret = pm_runtime_resume_and_get(wdev->parent); + if (ret) + return ret; /* Initialize time out */ rzg2l_wdt_init_timeout(wdev); @@ -150,6 +153,8 @@ static int rzg2l_wdt_stop(struct watchdog_device *wdev) static int rzg2l_wdt_set_timeout(struct watchdog_device *wdev, unsigned int timeout) { + int ret = 0; + wdev->timeout = timeout; /* @@ -159,10 +164,10 @@ static int rzg2l_wdt_set_timeout(struct watchdog_device *wdev, unsigned int time */ if (watchdog_active(wdev)) { rzg2l_wdt_stop(wdev); - rzg2l_wdt_start(wdev); + ret = rzg2l_wdt_start(wdev); } - return 0; + return ret; } static int rzg2l_wdt_restart(struct watchdog_device *wdev, From patchwork Fri Feb 2 07:58:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 196213 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp926063dyc; Sat, 3 Feb 2024 01:16:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbnHYDbiAVFKOfrLNnsUeKILTCTiuoZ9jwz4XuUvNH4EdinmxQa+590XjM833be5NhzfX6 X-Received: by 2002:a05:620a:1443:b0:783:df10:a0e5 with SMTP id i3-20020a05620a144300b00783df10a0e5mr8783856qkl.73.1706951769515; Sat, 03 Feb 2024 01:16:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706951769; cv=pass; d=google.com; s=arc-20160816; b=gkVzQ/LiCYHEJP0PNQ+PMdGY/xqwCUoSN65dI2xJUnXxbXCfmNMNQevP9fNPNoSiT3 2wQi8IzfMbNeLhQrgv7uiXa65sqqDFB7repw47KhfI1y4ommZM4PjQGMVMH/MBLwJ+ld IH3JoyheNYdF6ISJQWM+VM//BfvSyczgIvgPIoBfxDHCPEgkYvNrDzk5LHNzlN2U9lfc u3iYctmDGPPnsplz1ldwGR5qnqMHP8FP45QLAC4Clbc81vMRwonz555DghyUbOcYvUTH YPnTo+hdurP49Xpbg2KVWQhwpXu9I+hRmPsCChz2ZI3VcxQ7Izw4noSGfJxVVuOigqaM qE+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=E28h8UOWdGbHYCD2Q/GcdEN9vZw1F8khK8fuudVwako=; fh=FYepyPYIJAnyRVOj0BmApjbOmerGPgiGwRGgVlIRzAM=; b=LJ+Dxv5i7N4gKjnsFixIOgIDYYak4urkBZOIFEwdRkh4hoMoPrRv2E2u0S6VN6th7Y HqPbPhm90MGi0+F2PR9xJYl4Kg27FVoTe+nFum26I/EWDedKrBvpie35bWkijPNeZxVJ LK6gkUyEmVZG172tqFV5Fe/bpFs3n2GKPbN1PPKsmGvVTg+qHYThdQve+6qU+k4HcIrj RY33cXuaGMLxbwjCcBiR9YGVIgL2/wjubh0ZqPURPrJU3gpF1dQTAFJdSUB5nb37HMRr xo8+cBCd+QLRJSYOrPW9Vpxdsa+VT1E3VGtk1vXi1YoQ9cHPSwSMCDLdgNnlxCDkiO+O IcHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=go0oeR3l; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXXjlTXJlN+Yed5PLJUI3hmFEA72H6Tkmmhh4g/jyhzAho39SXQvc5qRIcuJ9nkRJVfdTx+LEiGc9jFXd5E3Os8Sx5t8Q== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h26-20020a05620a21da00b00783df0a604dsi4032976qka.533.2024.02.03.01.16.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 01:16:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=go0oeR3l; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F088E1C28A7B for ; Fri, 2 Feb 2024 08:00:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D62D7199A2; Fri, 2 Feb 2024 07:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="go0oeR3l" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC34318046 for ; Fri, 2 Feb 2024 07:59:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860748; cv=none; b=J7eqLLXCWn8tJLGl+BitplxY0/gNngRPJeYAfSnhvTKicNaN7DA01vEemisaIrqnC8biA2zPc4iBA+VuXUKYldU2nat5CibJJfwcGPsFty4BVjpDl9E0PSqjRcCxyCMQiXU86+tZjuD3zYdbkhoaVwrrMlAhOte2Zbyob91jH2I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860748; c=relaxed/simple; bh=CWt9OYHw/poJzADJ9gjXdNYtv1VEWdyf3zZw14VJsuE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LsGHqlzCHKbotDQS/SjNaCxXrMxI5wTkguJn3B+i2Z0/GTpGs4wOXozVnrKGodzph8XYvsbEBS1ROkwKOBl4rxNJ9n3EXMM3QggPd93dBuUxowaivWlpSX1u2aXC/e0gnF2YP7kaNRGi0Ph1YMlFXJd/e6i4JMr+NFpj67u/cTY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=go0oeR3l; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a3604697d63so273375866b.3 for ; Thu, 01 Feb 2024 23:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860744; x=1707465544; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E28h8UOWdGbHYCD2Q/GcdEN9vZw1F8khK8fuudVwako=; b=go0oeR3lV/vh7kY2f0bhFnUG+9aY+y+KXz97Q8i7p21w079dad7qhH6een3YE88f++ wGu1K6tkx1NAJ2XbQY/W0zYlQyJWhOizEbErsToz0e07UKI1NcS0EKxd/IjZVPS9PWeM alvdWwFV+kdSNQWv/LYIj9qgeOD0WSwV2uBz4ruq2UaENHwpvK3M7Wkxs1cCPKwSSaoV J2uDzln+yJIvdPOXGEFV6Tc5y13UIhqqmNA3moINT9nU6cCi4VUk9bvWF6RrJBIdUtvj cGqjp/KfJcfrC1omrFPl5NWEKXibh/43DVJOLTqKphTX/4lY0zTn0BKbRj8ygY20zu/b H8rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860744; x=1707465544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E28h8UOWdGbHYCD2Q/GcdEN9vZw1F8khK8fuudVwako=; b=oxRBt34nfO15a+Iwgv053L9jzOAz5DgkeG4/pd27CYlQlZYPFRRP4e8VvOumKEi1xH HuNiZE1QwwE4UN/pm3v6sJhfA2Evi1M0oUls8VTpTJEj6d2yspiTMPFxYpTJpuAozKqV bakpEfC2ZUGjmPw9fx2G9pqwu/sl4vXTERNqrDA8LPitDZvYdQwy6Tr7n7AIeEUqhsFe WI3oAO77l+IVaYB2h9J01JgtUxW82jV6sRHxhV5ZJhg8aTzGlt7tV2EW3A4Wv9VTZ/fm Al6jXthmG7dhsPK5N5AEsZpOuWCmFQWmoNsM0Uoh8arsJZWCxGpY5ysSXjKOvW9OiPA/ dAgw== X-Gm-Message-State: AOJu0YweNqbatg9KumfsZUURmN0K2CiBzMtK4h80zhq/HeuSrhM9jvAb fYtwYZevUk0fVF+4jD7eO3iOJrlOuuN0kJfQ/eS8DyGNEorNNSBhjv9Ndwv5S4Q= X-Received: by 2002:a17:906:1c2:b0:a36:fc15:c6d2 with SMTP id 2-20020a17090601c200b00a36fc15c6d2mr826777ejj.5.1706860744034; Thu, 01 Feb 2024 23:59:04 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVix0ihpdOec/L7vK4fRSeO+izEcKXBhidmesrR3EXH0mVdoJMYbHVDQ0r2qyoHV4TbaippImQa7G2Ot8keg45J7cBHFWxWXSeFpv7K3UtK+aXAqfcwgjwW+zxxiqqUV8T+U7f+Zf1cONPlxvXW4hZZND+o8WAZQH6NUjUfzr1hft/IBNcLgojXSf0ijIc9+d0geEIxSiY4lCbF6Os+9n5nmwdWZ4v2vvKR9iIfVxj9xBkXcRkUDTa+jzcVKdTLRGerdWMHieXDWVgUR+WksZZlI3oeVqyTihdLk3A8fkbPdZ5r+/+9tIA+k06Yz+WrUKpz9f9LkQHK/kW3AvBEuSwywTdrRTLLsFrT4rsrqU588ujMnxWZw2Thk6mfh0xBDSJEUaN8VX7xr51C29LniFzB9U6TrqSWJgXyIPHG8+KF+WEeS2oXposmP9+xydCMVeOMswrTS7UguM07U0XgHvuVDWCWWeg+2A3l0TPDmAnzI0rnxR64ClUhbLmOQlTLC2RGn8wtM6gzig== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:03 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 3/8] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Fri, 2 Feb 2024 09:58:44 +0200 Message-Id: <20240202075849.3422380-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789868658298198904 X-GMAIL-MSGID: 1789868658298198904 From: Claudiu Beznea pm_runtime_put() may return an error code. Check its return status. Along with it the rzg2l_wdt_set_timeout() function was updated to propagate the result of rzg2l_wdt_stop() to its caller. Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L") Signed-off-by: Claudiu Beznea --- Changes in v3: - none Changes in v2: - propagate the return code of rzg2l_wdt_stop() to it's callers drivers/watchdog/rzg2l_wdt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index d87d4f50180c..7bce093316c4 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -144,9 +144,13 @@ static int rzg2l_wdt_start(struct watchdog_device *wdev) static int rzg2l_wdt_stop(struct watchdog_device *wdev) { struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); + int ret; rzg2l_wdt_reset(priv); - pm_runtime_put(wdev->parent); + + ret = pm_runtime_put(wdev->parent); + if (ret < 0) + return ret; return 0; } @@ -163,7 +167,10 @@ static int rzg2l_wdt_set_timeout(struct watchdog_device *wdev, unsigned int time * to reset the module) so that it is updated with new timeout values. */ if (watchdog_active(wdev)) { - rzg2l_wdt_stop(wdev); + ret = rzg2l_wdt_stop(wdev); + if (ret) + return ret; + ret = rzg2l_wdt_start(wdev); } From patchwork Fri Feb 2 07:58:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 196469 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp263099dyb; Sun, 4 Feb 2024 01:06:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvSq1iWBL/8OP+2P6xk2KuHCpgfxgHUNpwWTfjUm7omKewHBFRLNRDplVch8EfFuZp6yF+ X-Received: by 2002:a17:906:b2d6:b0:a35:d634:ed71 with SMTP id cf22-20020a170906b2d600b00a35d634ed71mr8562655ejb.23.1707037615309; Sun, 04 Feb 2024 01:06:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707037615; cv=pass; d=google.com; s=arc-20160816; b=LklFTBSk5ic1UB/cJQ1UsXLDmP0nRe6XeJ6PRiVB+2R9haSi+FGX/CkPqeX5uKkqf2 4knvShgWj54mrF4sWJgZLa8shZeHW16k2nLshGYq/aay4SiOc4JCLYN4Gkx87vSDCjsJ NYj+xsDEDMAcuucF2OV4QoNm20i/pkt01HYzHCCA6pEObRCQRYSx3U5dd20PiiQCCY7m Xh954YLR9etfHUblvH59XC3/8lw5s5+NzUg2o5ElGMbb8qucaQcPfa/a9WblGgGDlBwB l6Ftts6wzahi2pvksR3XTohy1BrIGA9TkCG+rCNzOkz4C7EhJbewJ96vP4Xxx9DX/ghd nFuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=a1Oj/CgrtGpKMdvRbhpf/2sTO6agf/TWbytJOpr/Vm4=; fh=nfp8iGL2esYITRw75o2qqxy2IKZQbV8z0qiBB9a8VQI=; b=li5TZpcxJCVlLkD2sQqMim4Le7Ku9uYe7hMLDa4ytEm4otFCtH8T2erucao+1IOv7S xp4GRb2G6edewp9VUXkORqFq4/9KJ5ornpy6mRBGzx341DjOhRcTMbNhESAOWYRnjxr1 nZjXSdKyEX+sY6qghrP1mzdaw4oxxrf2gEL7/lzbOc3+sdY6vEupqOoRIhJc3WemV6vI A8RUy3rTpqXEmg27zykwcDYvdbuUkYOuV9zjkCbbEbltj1VErdS2nSAnHUYihaa/okyG Mp4XanpG2gEM964tA3UeYlHIly7Gs018gx2O7FFxkQvczrd6rr4hQeGQGkjgDHXe9nar XTMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=Hh6r6P84; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49398-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49398-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXu89jUjP9vGq0tCdhOFk90Bw+Hk25uzzprzlwpXRvIgObRmwiuMhYZYuuEg6E+3D6P8XyC+uRmL8kAMMROL/zTCfoCJQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e11-20020a170906080b00b00a2f944ff7d2si2804652ejd.842.2024.02.04.01.06.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 01:06:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49398-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=Hh6r6P84; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49398-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49398-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2A2961F29982 for ; Fri, 2 Feb 2024 08:00:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D1891AADB; Fri, 2 Feb 2024 07:59:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Hh6r6P84" Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F1671862A for ; Fri, 2 Feb 2024 07:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860749; cv=none; b=G6wIv3BGJqa6xc3j3Q4mUKtL91l8VTDng7JzwB1b5oMCKhI5OF8pkZp6C6G7va8EOYEDq2VeWH9g8quUNQSeTZZxhr3/dixlp7G0XvrObycdP/FGGGv/G9bE+VctkDtbjNiiH3aAj5GRWkQCVtTQObgLNfZ+LCBiE0Fp4rWyDuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860749; c=relaxed/simple; bh=OsoaWHXehq/cxZQ9C2k2zkgfmpXq7DmB/mm/lhXbTgA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZGyqc20wdcXVBmBTL9FlEA0RSM4b85RLISTmMXPfuAK6pYYKTFmb6iJNJEuO55nqqk/iBwnqeLDf2VgY2QKHv+zrXle+itFDLJfjrObVppuHG29Eb164vbAG7b9fFjsTW5DaMnjVCcxECWwk/s3dC3Wj5sKIkuAQy+W2PdpP1To= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Hh6r6P84; arc=none smtp.client-ip=209.85.208.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2cf1fd1cc5bso22380791fa.3 for ; Thu, 01 Feb 2024 23:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860745; x=1707465545; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a1Oj/CgrtGpKMdvRbhpf/2sTO6agf/TWbytJOpr/Vm4=; b=Hh6r6P84qGWDTFEidxdBoMDTZcw+mvqTSY+bxXg2lTqsPQU0SK4/bmTsaaPCaNJr3n i+8geiT7U7B7K4jovAWGXskquEacGTL+/b+ya+PupuMWXOePUjeh2erS70HF1M25FN4w d2fiEQapp5XAOmYTYA3kKjWGjVM7WYZeV1KzjoIoFlq9DCgz4cp8SyRqZ8PqiR2dFNjE jDYrQwnrJSOR41yezoC9xqXAWySCQ6HVyI7XeIQjdZCnyhFCKvEpxwIhZRVeYlEgsKd9 aIHTmu7+4PflZ+OliQUlXmakD7esObFvNKSAqmJ9rPFr6WZ6vm28avemRztxwlTT9z7i jNBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860745; x=1707465545; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a1Oj/CgrtGpKMdvRbhpf/2sTO6agf/TWbytJOpr/Vm4=; b=Admyx5OD2C+bB80UQYA8ZPl8Btno1rrpeGwXqKRusedsjmuxEv1kPcwjXNoTaBaLWb DpDFw3D1EpnjZ7PPo9oYArzTlpqC+3GUxcB9Mv9FXm4p5CYDqBMKMp4+lFdzxGF7xTl0 zgJXditjLAdWb08BYhhqHcZ+J26Fg2g07mv40R0wIWPyjoe/jcmRAToGOiTjpZNDv3DT UH1F2Xx238CnfJS+LF8imXbfdFV6hSqGCvLY1PHddgfJyheMieObYGiItq9BeNzUwhuq yq7jmfuyDtUZv+xRZthZgbyvCBHJlhSfGBbuzqSQng6SJ2KRE2QzMbcSnrhqRnTBea/X VGgA== X-Gm-Message-State: AOJu0YzRzy/BJG61dXmCrk1eAKKX/5YSpv1KbDS2i2tv/tWNSZ6uDr1l kMf4MSmBqte7REUS8Ldalf/il/hUeBp6KDys/aWNnyvNz+zI/p1pysZ824X9u5I= X-Received: by 2002:a2e:a703:0:b0:2d0:69cb:99b5 with SMTP id s3-20020a2ea703000000b002d069cb99b5mr4235887lje.44.1706860745468; Thu, 01 Feb 2024 23:59:05 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVHP6Odj9Gu/VNQoi57BATgZ+f74cL/tDP1MFGqrTBEloZ/YIVr8mCJSsQWD+CQSP0slDuyyDFSyQgIsX27tNaa/AQxible/1xlk/6mkTuyyYuG8tIL6AIOjkW/Wq41NgKqAPIXrKyHxNgDJp4Cdb5FMjfCr18fooiM1QgFaPyEyoVKutKkrtY/PGj4u+32epS7X0BTDiwz84+qsVvn+CsIRrNGBCsuAjBbgsJ9eh5Oku2FrL5pR6OOLfe4f4RxuclulWntjmnS7u/Q/VOYw7KMgraTT4jCC8okNDyULD4iMBX/Hgo55JjWP53qPSx9KhJhACjj1XxtAfAlnc0iIbPa7VoBbgIQPROAyACAL1JKEwySGtxsigX9XqRiYi/z9AwYNDQbWXU3/wJ+NIYmTZs4SyEAQwk5n869A7RxMgvwKaeD52w9bylw4Z+/l2wrhzLFdnuXetK9pcwDYdZOGljtdNEQGBHXEdL/3nALOzT4d6I3QUGCcXzDWkNXIji2JYkRq1bDIPmBjg== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:05 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 4/8] watchdog: rzg2l_wdt: Remove reset de-assert on probe/stop Date: Fri, 2 Feb 2024 09:58:45 +0200 Message-Id: <20240202075849.3422380-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789958674702134549 X-GMAIL-MSGID: 1789958674702134549 From: Claudiu Beznea There is no need to de-assert the reset signal on probe as the watchdog is not used prior executing start. Also, the clocks are not enabled in probe (pm_runtime_enable() doesn't do that), thus this is another indicator that the watchdog wasn't used previously like this. Instead, keep the watchdog hardware in its previous state at probe (by default it is in reset state), enable it when it is started and move it to reset state when it is stopped. This saves some extra power when the watchdog is unused. Signed-off-by: Claudiu Beznea --- Changes in v3: - none Changes in v2: - none drivers/watchdog/rzg2l_wdt.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 7bce093316c4..93a49fd0c7aa 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -129,6 +129,10 @@ static int rzg2l_wdt_start(struct watchdog_device *wdev) if (ret) return ret; + ret = reset_control_deassert(priv->rstc); + if (ret) + return ret; + /* Initialize time out */ rzg2l_wdt_init_timeout(wdev); @@ -146,7 +150,9 @@ static int rzg2l_wdt_stop(struct watchdog_device *wdev) struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); int ret; - rzg2l_wdt_reset(priv); + ret = reset_control_assert(priv->rstc); + if (ret) + return ret; ret = pm_runtime_put(wdev->parent); if (ret < 0) @@ -186,6 +192,12 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev, clk_prepare_enable(priv->osc_clk); if (priv->devtype == WDT_RZG2L) { + int ret; + + ret = reset_control_deassert(priv->rstc); + if (ret) + return ret; + /* Generate Reset (WDTRSTB) Signal on parity error */ rzg2l_wdt_write(priv, 0, PECR); @@ -236,13 +248,11 @@ static const struct watchdog_ops rzg2l_wdt_ops = { .restart = rzg2l_wdt_restart, }; -static void rzg2l_wdt_reset_assert_pm_disable(void *data) +static void rzg2l_wdt_pm_disable(void *data) { struct watchdog_device *wdev = data; - struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); pm_runtime_disable(wdev->parent); - reset_control_assert(priv->rstc); } static int rzg2l_wdt_probe(struct platform_device *pdev) @@ -285,10 +295,6 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, PTR_ERR(priv->rstc), "failed to get cpg reset"); - ret = reset_control_deassert(priv->rstc); - if (ret) - return dev_err_probe(dev, ret, "failed to deassert"); - priv->devtype = (uintptr_t)of_device_get_match_data(dev); if (priv->devtype == WDT_RZV2M) { @@ -309,9 +315,7 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) priv->wdev.timeout = WDT_DEFAULT_TIMEOUT; watchdog_set_drvdata(&priv->wdev, priv); - ret = devm_add_action_or_reset(&pdev->dev, - rzg2l_wdt_reset_assert_pm_disable, - &priv->wdev); + ret = devm_add_action_or_reset(&pdev->dev, rzg2l_wdt_pm_disable, &priv->wdev); if (ret < 0) return ret; From patchwork Fri Feb 2 07:58:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 196208 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp915128dyc; Sat, 3 Feb 2024 00:42:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IErA1GPpdxthkMoKR/awM1I2d6jz4fG+bMXA4CI8FwxIAsqAxuqKhrlUPDMrDDnjpbTHRzB X-Received: by 2002:a92:d14b:0:b0:362:b459:11cd with SMTP id t11-20020a92d14b000000b00362b45911cdmr4811141ilg.6.1706949759857; Sat, 03 Feb 2024 00:42:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706949759; cv=pass; d=google.com; s=arc-20160816; b=OoUOHbWnvim6VvTIQ3wzorkLRmBwhWdcuv1OoDMjvujaI6cJF9AFeXEPgUOEEcNP+v JEg2mk+3HZWc8094Dr+OW8AUGLxtL5LjFuRsRXvGlWI6UPnjVRg8PMtpBksyGPr7Q32n q5054vo2Ui2nKWiFWZJ3NAyQ5b5jkeoUcJ62Z3HJFXEqSovA8w2NgUJYTFqp4DA9CCcj BNHoHi/8wigjEBa4n6ALUHXOwfyQjW3h4otJgEHbCPeGVMonmHOVZ2MeQRS2idHS0l9x knkUij5H/4xokoHzLqUrVVJMCsxoo4hsLspBUHzK04Xnz6Ye3YU7qarESChQfi9RcpL5 ifaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=wk2sgSULD2EZlARjAWF2gEN/OqQBx+GrergIKsDdywo=; fh=PSTu7H8n49qkeKl7p74NI/viVEWYjS7RMcgIkkK/6O4=; b=OCssQLWyzLFn2kmk2vPfDhXVucKcWRr9cfSUCW3pL/wkvyMap8dmbFB5Epjt6j3LkE m2t+dsnu2n4OzpiYATNiKSLiD4Bhvt8J/Kr7p61D3pVDf66HLK5fshEnrmggM5sVTD76 iYt+oURYxriaBF6Dom4JFjIsJJvniXHYZVLTTe7V+nIvsP8J/ZgxI6soboR3sLDVmodf EyKy+a8T5gY0azNFGizQ7nXLyfMjXTF0gKLMcfomNt5ZUaFiVzvpCN7kiminDa/E08Zn v33G22UyoALo/kscHPMPLxANRkdVwAL6KuUrybZRltlOWIvotDeFsZ4c/hMniteg5M2g MI+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=SkMvOwbB; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49399-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49399-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCV9t88oK+DvZbKGNyo7oZUqZieROZIFMUuPeHZCc+XX/HQtnsU+Qh9lL0hfMDnxpbDvQT7opcYxX3P+Y/0PaxZAUmeLfQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v64-20020a632f43000000b005ce3cd4ed95si2925059pgv.94.2024.02.03.00.42.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 00:42:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49399-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=SkMvOwbB; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49399-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49399-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D60628F83C for ; Fri, 2 Feb 2024 08:01:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E817B22085; Fri, 2 Feb 2024 07:59:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="SkMvOwbB" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3205F18AEE for ; Fri, 2 Feb 2024 07:59:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860751; cv=none; b=bh2ThjZDxe/o51DhDO9afDwyWwLBaUMvSYa676rp8G1ICz0NHJpJMZTeBacJRt4RbkIR4zuZ+zDAr2ZKuzkv0Apgvg594eXgWI8I0OV1AwiiUX3zFd3zV1fSKnG6xlbPx2yeEhnGd+9TK732uQCZB8Qsr/3PMvJeXqk1PYBpSvI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860751; c=relaxed/simple; bh=+3HoKrINx8E+isoQN2zUwSYc2xCOP4127guZ+SvOjTM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aOHpbzGaVYBnnqO9FopEim1h/nSY6/l7nOwmyMj9MgFHBMadqp8PO5j3R3u/koSYwiMf9igqObPq8I5x9CazLA8YUwrLI+PQg8Xgrr3F8/XavAMWZBB/RO06N5hw/Mo4nUYsvFaY0RQO/09f6oPBOI6lkHXTeTNH672AeDtPt2Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=SkMvOwbB; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a350bfcc621so216597666b.0 for ; Thu, 01 Feb 2024 23:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860747; x=1707465547; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wk2sgSULD2EZlARjAWF2gEN/OqQBx+GrergIKsDdywo=; b=SkMvOwbB14SBShezZ2cY30RI+BupSPUNnGnvyWqpJg5wLnNycHqrPxcmWjij4OIM8B btS7Vs7ZKOWzXhmZdFBRvrYVqfs99cipXSZetCFt4Pl4Npgtdi5N35+darGsWVS1ohuK dr0/2Cq6DHuPIa61JBNMCbWZiDba2+qulOhoskhydh2mdNOcwZg1+YMIDEVofjyVbc8K TGK37PGdqjHj4J79x9B0cddS4+0DxWfFwCN8KEk3kEb9eEjdCZfyMkuzXMRYi8Zm7smy 5cI305xOydpC5dOYKD8IXyNzC/PyyjOE36wO9HwVu86HFfvPvOohTbd4fMt4iHMmiFio 5xxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860747; x=1707465547; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wk2sgSULD2EZlARjAWF2gEN/OqQBx+GrergIKsDdywo=; b=k4iFPsheeZaI8yufIORNlCQ418HPL/4dtEsJnZ2D5vT3cXoc6bASp1HuVVFLJeqCmk oSmvQLtjG4E0+BvbYTvpMO1BltSslvARcHuoyEchtRZqzpi/n7DnQFlS/EzSRJVmm9Sm 7ykM9t4PZJqXz6HezIXhNClUVKLbkNfwu4JJzu8Tc2B6HCV0xdRtI8AdU0Jkt4psGGYF wKiLEeuiPXSD4OF6ayhddMcxBys5orsFq7WpNWgL1/1GphIWBjfJCweJBFAEgHRjhXDQ by+n952xUZSWDox5HpYm6WbZdCo3tGANX0F7XLF70qGvr1RyTSEY26XYV/7D8GqwTQRY RikA== X-Gm-Message-State: AOJu0Yx9mX/202TDdu8+r9FtMWTGQ4mgmLEJWw0+Hg0dKjgnTMNfOG7K xuvFSTbXxHSn4vU+qtmXvUODNnQe5+KUyViWsurd4roRyqi2ASXCw0zsU0AP/eo= X-Received: by 2002:a17:906:d10a:b0:a31:58fc:bd83 with SMTP id b10-20020a170906d10a00b00a3158fcbd83mr962292ejz.10.1706860747016; Thu, 01 Feb 2024 23:59:07 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVLdJx38gMdhqHaunvA3yjh3MJnT8FYni2DoIecRvOOHCKb5u5bSqVX1faQieKPGFlJqn7fMkaZDjiIu26PwX6DKL9lNIWrIdbWeW3IUplBecaSVUzeNrRz8PFs7hrJO5yEnOW6EdiRQKkV/PrH6+kwfgVquXatxu3YfdeY6z0MJIkp2EH8n2rhUJzKVogc0VDpb2leTAUlCYEkUX0voBftLqSL+Y8wj/jfW+arRjuAz/fftt4SfYiyXMjxYJO1mF7zmcJ2oDlovbSelqROCm59Jdb1oHPQLyp5ywBCIs3RLqKA2uQBYxJvk8cTGITv7aDuLywVKc+2soh80q673gDHse9rP0LCuR05bI8UnnS5rwEBaTe9vfRNpspLLw0cO8FElvDSCOF56oHlcF6KtypVZxAvtjurTRXQ/JfHWz80rDrB85JWJp2I5sEXhxtvZVfcKXE1+fSS4MhuW1IRiZcKyvUbsTlYfkY/oiysfMSKzbBsDwuQ3cSkcGEBo93aGoaTEe+Evtt5tw== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:06 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 5/8] watchdog: rzg2l_wdt: Remove comparison with zero Date: Fri, 2 Feb 2024 09:58:46 +0200 Message-Id: <20240202075849.3422380-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789866551512448514 X-GMAIL-MSGID: 1789866551512448514 From: Claudiu Beznea devm_add_action_or_reset() could return -ENOMEM or zero. Thus, remove comparison with zero of the returning value to make code simpler. Signed-off-by: Claudiu Beznea --- Changes in v3: - none Changes in v2: - none drivers/watchdog/rzg2l_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 93a49fd0c7aa..29eb47bcf984 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -316,7 +316,7 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) watchdog_set_drvdata(&priv->wdev, priv); ret = devm_add_action_or_reset(&pdev->dev, rzg2l_wdt_pm_disable, &priv->wdev); - if (ret < 0) + if (ret) return ret; watchdog_set_nowayout(&priv->wdev, nowayout); From patchwork Fri Feb 2 07:58:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 196217 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp926451dyc; Sat, 3 Feb 2024 01:17:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtapqB9mqbGsK13U/tm1bx1atGj5Wj+T0XegTpSIejY/Zmb2OU3Gu7gb9SwqHfSG+yJaiJ X-Received: by 2002:a17:906:7188:b0:a35:b59c:fc04 with SMTP id h8-20020a170906718800b00a35b59cfc04mr1092426ejk.25.1706951845596; Sat, 03 Feb 2024 01:17:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706951845; cv=pass; d=google.com; s=arc-20160816; b=TvSmIP3h8LEz2+/dpq/xV0qvyclVAND1Cww1yQdsWFzY7DJwZKWM+LlXC8cogiA9jG DvuljdwHnSMJmz6ytu2+GrrNSjI7wFr4jnkeXQsdEfQpqXmG2Q61aczjbuWZa7SPv67C eRSiHZzUCnRlOkzgOjdUpV228L/tHqMGZF8KoWkZO0lifznp435OpsHQuEe5zkWTspik RcutKdID3/7JGadQB9r/qmduzU9gStQRpvcAU8Q6vhI3vM7HfW5ki+WArYhhmh3gnESG zFeK1yNlYytFYf9YsjYhjuYQgni1ZNdO13hzk8e0toSGBJtAZXu1FzTvJ7buMSrarnyG LwMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=afgPC/1Qd2anwjUfxalCjRHvn48KWLJjo9fZSR1GECE=; fh=Wjmn6+aM+rehrdbXVEAuyblgn6YaLZG1yicINj15E/g=; b=sGLZLJJLh+Baz9X/FMAa5LQCHONeL415RCXoyZLUYPUSa4BiVjgFxnHR0U5QKBjaNs bZBDbygJpQd/9kUjnKfh4AL5YJlTdGcPV8c6j7IahRdnLyRYs9I3IoiifT6o35z/y+ip r58YM+hf/RsKgHt7xm/5HnBg4j7ow4UDmQT27lfexL/9aMCijfjE7XwbLVXKqFPzx2LP FglUqIQSyxQSWZrxhAAWdpMYTf1z7hgr/um9WB77ApmNp67EmOsz5Zsl6mkXuxsPJ0R5 +T87yDWTwkYRzqMl74DS84hi314dFUqa8ei7QQPDmpOQ2i1RIJ0QUXCkGThYKMpbdax1 Tsyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=hbW7ZCsg; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49400-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49400-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWPeXqARgVWX9S2C0IDgjPy0cURyQ5oTNXguE/dFnXsJmzrulpUt0sTSbbpV5mi1CeAi0TGPw7Rc+q/JA3LDHEg2Paqww== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e8-20020a17090681c800b00a3756bb1547si291710ejx.746.2024.02.03.01.17.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 01:17:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49400-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=hbW7ZCsg; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49400-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49400-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 293311F223D2 for ; Fri, 2 Feb 2024 08:01:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AFAC1AAD9; Fri, 2 Feb 2024 07:59:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="hbW7ZCsg" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26DA518C3A for ; Fri, 2 Feb 2024 07:59:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860752; cv=none; b=TS1QzSBjMHEjeFDTtHe+Y21kT08wVhZC2l6kpcnwU/QDDmoKFOuyERikonXPvEOKLQ2SlVxV1dWDXLLfj1Tgp39q2vip4AJfPjHRYpRnL8oDuTCjNiS10gjXpu8+O/9CJSDV4CvXJRG6eUTt3El0Bh7HwqKfJti0drvCK96PKV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860752; c=relaxed/simple; bh=YT9kMKNvkBf7Q0GF0hJ2XHgXoQLtF/WQFWX8if27yXM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gzgx+i9vNBaQDRX0egEe8MCaugm7J/bhyBO4YRqbsNPMhXcrrDxj9S2aMMA/+cWBTw3dR21HW6BeFUGgtq5PC6yVsjMw3c1ILUTTvRsya4snhevetXrOhJS6I3t9f1ifkY5rfzNR8s7k0Q/kKs7o6INO+WOcl//lN3M/AFe65SY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=hbW7ZCsg; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a30e445602cso625054766b.0 for ; Thu, 01 Feb 2024 23:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860748; x=1707465548; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=afgPC/1Qd2anwjUfxalCjRHvn48KWLJjo9fZSR1GECE=; b=hbW7ZCsgSK7k38ZOBb5IIh7wbpSEGc7Le1Wtvx5tV22tUq8lMFttBLZgTwEy/GwyzY 9P3WzdPbjDXJwzXu08DWeMHrtPiaDFUKd8chWuukFmtYO5axkRczziBEY16XdKdmgPb5 9/6OZUsslud3eVGXuo01lPtZs3VlteVSiEFZFGpWqgQXHMK3jYjq/O+0PgBYrgFft8oN 1PF5cKOej2fJwLhnzcP/UulSz+cwsuoFND7HS5PO6jojX2CGKGJQuiA0MxcfvbKgYL/m K2iHz7R7/ed0yzvNH7EP9mcDYpzvKJuAHPDAH9Saju5jbYkd9R5rD17VBekrJ/edIclu ZdCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860748; x=1707465548; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=afgPC/1Qd2anwjUfxalCjRHvn48KWLJjo9fZSR1GECE=; b=J29ZcmnPETPqMzYWSUHaY1JrY5zyHN5/I2fMAPHKU78IpsNXjHBhFV/mLfo7+6RDWS wdm0i3oKQHe/CpT1N178YvaBjbmiYnkXyYeCdT4NOrFAnscF1at0M1uklgjuQ6+vpLQl wBxRFP6LAxmlZgqU8M1a28EFV/rSXTbo1/9howcGmXtoUvcVwkIhYgs6ILiyJl5yifsM hb++WnssC422ch0wL+di97Iu1SAzpQl/3Pu7L2G8VRA0DIxrrBse9JJVFGlVrhUkunWv quf2Hw8cq7ww4/jz6MpdUYdJ1ww1ke55dIDaugszBJD4i/z+eJFIWLMfUU/bzMcc2WBU ol4Q== X-Gm-Message-State: AOJu0YyQNN7MrQNr32Al7Op9IREzQFUS6t7vDOOG1RsDnOP6jFJncmgF EOYgcxBQW7eXvCt7czPShPfYYuqgYM7i1LNMXGoiAVa2ylY1v22BJJlXR18vxBE= X-Received: by 2002:a17:906:d10e:b0:a36:5924:77e0 with SMTP id b14-20020a170906d10e00b00a36592477e0mr1116105ejz.10.1706860748423; Thu, 01 Feb 2024 23:59:08 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCX3Zyc9a/vBUQgysq5isBBnJXbx6TtlNdkkx/mGepeKtFas8mjwhl45ff6Ac/Il2wdVvfK8BTxmkg8T4yKVbWpApFLLXTpjplcp4lA/NmbXXTqY8u/4ZPl2HTyStcexFDE8VPmvd2YMgf7m6UGbwq4g2J2pn/08d474n4/PLnzOu1n+9c4vd4bu7P+yufqPuJRhJ0u54jGFh+kuKQdIyDi6ejF1/ajbnNsDfX8TVGJFm/CI3a9tpMf/ktRDZHDSAMzfhQpSUUG9PJYofg2ISaldpcUmdYcV9P+GGnn16mN5jW5a4n4u7JLyoCujqTss+yu0bURp6virXfh4/wnXjJ5hWzMrCttTjI/gLtQzGf6HNSUuoRfasVKdY+BehzUwA4erM+d4j0LlORM0H5fEwKARKNCJTOWAq4t/NFELIyePlq5Wy19/BKf1sCAJxILO/CkWwwJZpZU3sXVLirUL3Ia2hDoDjhA2HUj0H0qviBrHQixylu15EuNft5PId7VdCGSJv9pFKqsN7A== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:08 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 6/8] watchdog: rzg2l_wdt: Rely on the reset driver for doing proper reset Date: Fri, 2 Feb 2024 09:58:47 +0200 Message-Id: <20240202075849.3422380-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789773533625661068 X-GMAIL-MSGID: 1789868738545587726 From: Claudiu Beznea The reset driver has been adapted in commit da235d2fac21 ("clk: renesas: rzg2l: Check reset monitor registers") to check the reset monitor bits before declaring reset asserts/de-asserts as successful/failure operations. With that, there is no need to keep the reset workaround for RZ/V2M in place in the watchdog driver. Signed-off-by: Claudiu Beznea --- Changes in v3: - none Changes in v2: - none drivers/watchdog/rzg2l_wdt.c | 39 ++++-------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 29eb47bcf984..42f1d5d6f07e 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -54,35 +53,11 @@ struct rzg2l_wdt_priv { struct reset_control *rstc; unsigned long osc_clk_rate; unsigned long delay; - unsigned long minimum_assertion_period; struct clk *pclk; struct clk *osc_clk; enum rz_wdt_type devtype; }; -static int rzg2l_wdt_reset(struct rzg2l_wdt_priv *priv) -{ - int err, status; - - if (priv->devtype == WDT_RZV2M) { - /* WDT needs TYPE-B reset control */ - err = reset_control_assert(priv->rstc); - if (err) - return err; - ndelay(priv->minimum_assertion_period); - err = reset_control_deassert(priv->rstc); - if (err) - return err; - err = read_poll_timeout(reset_control_status, status, - status != 1, 0, 1000, false, - priv->rstc); - } else { - err = reset_control_reset(priv->rstc); - } - - return err; -} - static void rzg2l_wdt_wait_delay(struct rzg2l_wdt_priv *priv) { /* delay timer when change the setting register */ @@ -187,13 +162,12 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev, unsigned long action, void *data) { struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); + int ret; clk_prepare_enable(priv->pclk); clk_prepare_enable(priv->osc_clk); if (priv->devtype == WDT_RZG2L) { - int ret; - ret = reset_control_deassert(priv->rstc); if (ret) return ret; @@ -205,7 +179,9 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev, rzg2l_wdt_write(priv, PEEN_FORCE, PEEN); } else { /* RZ/V2M doesn't have parity error registers */ - rzg2l_wdt_reset(priv); + ret = reset_control_reset(priv->rstc); + if (ret) + return ret; wdev->timeout = 0; @@ -297,13 +273,6 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) priv->devtype = (uintptr_t)of_device_get_match_data(dev); - if (priv->devtype == WDT_RZV2M) { - priv->minimum_assertion_period = RZV2M_A_NSEC + - 3 * F2CYCLE_NSEC(pclk_rate) + 5 * - max(F2CYCLE_NSEC(priv->osc_clk_rate), - F2CYCLE_NSEC(pclk_rate)); - } - pm_runtime_enable(&pdev->dev); priv->wdev.info = &rzg2l_wdt_ident; From patchwork Fri Feb 2 07:58:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 196216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp926365dyc; Sat, 3 Feb 2024 01:17:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKrCPDWVntBo0tm0HN9+Ss8fk1AcuphkqB+3zlnWn1OdoljlKzUcFfW4UECemsvdB9qW1x X-Received: by 2002:a05:6214:500c:b0:686:ad6a:9ed7 with SMTP id jo12-20020a056214500c00b00686ad6a9ed7mr1004772qvb.57.1706951830097; Sat, 03 Feb 2024 01:17:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706951830; cv=pass; d=google.com; s=arc-20160816; b=qw1jYxi7/dKT4kG8EAAD0d3qK0i3u4Ml9J3hFsJ3M31GU328p08GOS+ueI6ev/XXdw aJHkY1UhFmVUP6kY8S2KlKiLbkpSBY+7waejk3cXbpREfHyMTO1HdAtTr5t/0uqin9L/ NQVU2hEGyFx8ailRbbgmm5QbUjc1/K2Yu93/eznZrm5sKGywD6ljczirYh+Uq4m/N52G udawGMGQs85EjNfyXtTl8qe+Ify9v/WS9zvRK94nxusQ1nCGJ7ecjoML2KcDCDphvTfu WP/vSo+g9Nt6S0keu9IoyNXph48VxLHdoZFZmWPVGkhVVgknsUIvVRZeOyVA0vpINyLj cUcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=MfVK6XRPMqlFzKP2qmkaBnCxYUhq6mpRwszPVemjL+4=; fh=Hp9WFC6rpqyL7U7IRr56nShr/ZVSX1KpwGDSiVKSqIk=; b=APsLwnmK7MFXLhXIKtBpjx8Q0qZgRKYMU9BYIPpqFP+PGgM91R9GkchBcQ1+/bWR0W ByayFm0xBTdhazrl2p0UaPSYgkI+OIvX0ooSZqpPs8pQYxkdGZciJlUdkymq/ubyj96D DCCf3ySh173kThdm/uRXjAX/qmOmbwz6ydz2G6htObNLyb582tyAJkXK5hOOvigXFJp7 Hq2WnmDCioUBwZOIeqZluL6yJQqlkgDylsOC77pQp9G0f6U13MzDKlw+ahZ9LGI6b4P0 XjnP4afAe80BpKwU+yjROP6O+1ckBBl05WVgcVTFIXn6KzaL2NBbGtOuNym7yHInFgxE HIgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=qoLWx8sz; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49401-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49401-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVmRQwprgueFO3QELBB5qd6M2FQG5ZCc46z8sPaKS/ZHtNcyty3Q+xcnvGT4xylGssQ2f1sEq0UXoTVRULUTmGdsJ/Eyw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r8-20020a056214212800b0068c9315e811si723436qvc.90.2024.02.03.01.17.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 01:17:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49401-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=qoLWx8sz; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49401-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49401-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 30EBD1C29A49 for ; Fri, 2 Feb 2024 08:01:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6AAA93F8DA; Fri, 2 Feb 2024 07:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="qoLWx8sz" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82F1718EC0 for ; Fri, 2 Feb 2024 07:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860753; cv=none; b=EcXkf64td7nZ7y7zCkRBXf6dzKPda3CpSS7cbFN0r8jqcB6cZ1prft6w5Ta246fgMEKLTCzpAcAS7wilKuhWhVmUBMrIrG34ObVU+gok/n9cWy+w0XZ9OQK6R7KG5Bhl1eZFsu0b46UJ64xF41PrKQ9Jsgsx4349U01+v6KRdxg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860753; c=relaxed/simple; bh=aIf+Pu3HweWyoN7lkEi0qmM7OKFln8UmJUtFm6v0tPY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Dm4aCfICiXNHudQT0K2DuFmz2hqKwSelXun/1y8wG29iJckGCflIsnvpFirwQ2elzn1bqlzjQLek/gNtvgd58TK2uCm0W7N1rpDV9me/ZLU+PvI+0yzuuQbCHUNy4yoYo+QpRuRX0ZfcKZ3wCoKH//8H0Op23iLnCl2R1N05PJE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=qoLWx8sz; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a358ec50b7cso94095666b.0 for ; Thu, 01 Feb 2024 23:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860750; x=1707465550; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MfVK6XRPMqlFzKP2qmkaBnCxYUhq6mpRwszPVemjL+4=; b=qoLWx8szTmDZp5TRODdR6Qx83EhCkW+N0soKhIHX0XAqzKfNH/Jc5N8CJ8iQjTSeUm Z2IilCA+rB8w96hDx0wigUmd8dpuzHXNEIOPyjYbf1x3ya6exASz1UcvPxxCBAwexQyv /gmP4CR0N6KTzOgboaTSehsLziQYw2aDlpmxJS0W4ZVj23KafyfID0KKaCa7zXbqsun3 u3DAydbbbH8PGeAVimVYfznHD3TPbRavsvG80w2qg1eY+cP2QSFxEuwfa3O5H4QM0Xd2 iVBS5zqH/tOc31//CHKAUBjj9Wk0W66/y35GwhNPVhRhaPF7Q4hd6z1ws5AAKyw+gQFy tIYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860750; x=1707465550; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MfVK6XRPMqlFzKP2qmkaBnCxYUhq6mpRwszPVemjL+4=; b=ZompNuRCgju0rpFgG2bF8RMQavJDnD/wuBzSjyiko9AiUI9E0vARSGfLZIQhpLXUqR 0dBvaJhVVeTNY+mo886Q0lQhvmNgTnpR1sFTMFjyjPOBvikL5FqykEfZl44RZ2NrG64m UEhgtxmoNfP5WuNTQE9uj/kcNOwyIeHC40jmNMvGzdsvUMCsZjUHN9AmTi9MZCWLHMWg /IlQM5UQXf1hDsOzcKMh1VL2Me3C78B7nEMdNlMFrQoao0AkWw2PasjMVrOaP1AyAxu1 0tBhTp9iGYB93JfblZ1pEe4HAzvNz6sFQeoNmVpdZJMkvVsuUAp/nVTyDiqWODEuYHNN pNyQ== X-Gm-Message-State: AOJu0Yy5z9BzIBOOV0vFQpOXptI+nQCOCmeI3iI3XSPm5ppNthu9EvvX 5rwAMT9gxPwn1y5WepRU5MXJEfNj5eYBVGU0kDSwM1tjSzQEx2q/ubkwWonAAyo= X-Received: by 2002:a17:906:cb8b:b0:a35:a12f:e363 with SMTP id mf11-20020a170906cb8b00b00a35a12fe363mr1047795ejb.10.1706860749862; Thu, 01 Feb 2024 23:59:09 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVWC4J+UJPCvDPLkKBdcyGv5dMGq1Eq0xR2AqnW+Av52NTCcIAkSsddPOzNWcyimr28m53iZTGmWUmL0bLxMfIfGZ4VPix79HFw6ACNyGaP069ghMxT8Jlu7IeVvlYHpnlQJ84kVb3Ff4fImb/2EUFa6ugdTL8ji36jLWPtbeI2AWyhCWcx+DDb4SqD3pOpN6MadVzOLZzCqBt2Q3cipNLTyB0aOU3iZxpCMR9RHTwEkFPIC+hwlpTHYLcjhyQZSu6IfDfVVOBxCRKN8fuzrCHoHzPiKtqfv6I6y51kXMqcvUYf8ybATkyhBr72/XBV3JjpR3TGvS8ofTN/tXoMytWa0rlfJs6pYfU1UI2EWoOldF2ZUSPHmgTkLBebpw4X898XBwCDPvgnx1AbQjD3jWj11KR9is89+Kz24gzmDQ4aEKR+en9tKADlFPnoafi1ZKEgcYVUptRSBEdqr6utJB87atGEMq8pSHxhbnDV45yG95GTk9++GehFoOe7xGFAXw3tzked3MEDkw== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:09 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 7/8] watchdog: rzg2l_wdt: Add suspend/resume support Date: Fri, 2 Feb 2024 09:58:48 +0200 Message-Id: <20240202075849.3422380-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789868722403980210 X-GMAIL-MSGID: 1789868722403980210 From: Claudiu Beznea The RZ/G3S supports deep sleep states where power to most of the IP blocks is cut off. To ensure proper working of the watchdog when resuming from such states, the suspend function is stopping the watchdog and the resume function is starting it. There is no need to configure the watchdog in case the watchdog was stopped prior to starting suspend. Signed-off-by: Claudiu Beznea --- Changes in v3: - none Changes in v2: - remove the usage of pm_ptr() drivers/watchdog/rzg2l_wdt.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 42f1d5d6f07e..c8c20cfb97a3 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -284,6 +284,7 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) priv->wdev.timeout = WDT_DEFAULT_TIMEOUT; watchdog_set_drvdata(&priv->wdev, priv); + dev_set_drvdata(dev, priv); ret = devm_add_action_or_reset(&pdev->dev, rzg2l_wdt_pm_disable, &priv->wdev); if (ret) return ret; @@ -305,10 +306,35 @@ static const struct of_device_id rzg2l_wdt_ids[] = { }; MODULE_DEVICE_TABLE(of, rzg2l_wdt_ids); +static int rzg2l_wdt_suspend_late(struct device *dev) +{ + struct rzg2l_wdt_priv *priv = dev_get_drvdata(dev); + + if (!watchdog_active(&priv->wdev)) + return 0; + + return rzg2l_wdt_stop(&priv->wdev); +} + +static int rzg2l_wdt_resume_early(struct device *dev) +{ + struct rzg2l_wdt_priv *priv = dev_get_drvdata(dev); + + if (!watchdog_active(&priv->wdev)) + return 0; + + return rzg2l_wdt_start(&priv->wdev); +} + +static const struct dev_pm_ops rzg2l_wdt_pm_ops = { + LATE_SYSTEM_SLEEP_PM_OPS(rzg2l_wdt_suspend_late, rzg2l_wdt_resume_early) +}; + static struct platform_driver rzg2l_wdt_driver = { .driver = { .name = "rzg2l_wdt", .of_match_table = rzg2l_wdt_ids, + .pm = &rzg2l_wdt_pm_ops, }, .probe = rzg2l_wdt_probe, }; From patchwork Fri Feb 2 07:58:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 196215 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp926286dyc; Sat, 3 Feb 2024 01:16:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/Fktr44PQ23uG7G8nCKAuNecaLVJYwgGZlKNNxZWUbrkxm4V/kfpi/R2H2ERsU8qFt7DI X-Received: by 2002:a05:6808:1496:b0:3bf:c979:6733 with SMTP id e22-20020a056808149600b003bfc9796733mr2861313oiw.14.1706951813504; Sat, 03 Feb 2024 01:16:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706951813; cv=pass; d=google.com; s=arc-20160816; b=pJq6qH7xlmTJoXFHE7PmLvoxXe0SbAxPRac6ZImpQM40/yO77/5XalNEDNp2dbjbiP lWQuzfI1U1AZt+fIOxFVNnPij/2FNbS9O+BNhz9NV2o2yMuijK14quIqj5dZXebxgcXV NCb15q9pGbel3Ouxto6BTVbvZ0vDNDv9kD/z+mrVR2s0mQj0u7wc9XsJQ6hs1UpK/f8p jlCe75I6O2YWJ7gxponYPZXtFzo9DE5AFUALuHc430BDlp/YKJUcfh+dc/LkPZpcBecl ++ucf6o2t87KeUxziZPT2TclRX2oXeUUHsSXncsLTP+IBikTO9SWGQNZDrO3HaAvnzmw b1Pw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Q6ThDsg6UEiz1glmUeFqXiY5u5KHvWrwpDg8zbhv8Nk=; fh=biXo1PO2PPsCgKEzwnCWR8t0Fn+JilcX43/9bCZT9pI=; b=TF9Del5+N3DTALi1TziDTqqzBGcMJLQ2tGIHuJQ537hr4keTr6XOWtGmAMeAT0by33 5/s7brAuZBLrTchD63VJVn0xU+G701V8c/jZ1XRi6I3gYcA2LHgEHwLn5nKDoovwuHwx Yu2F9DPtgGM+gKBsBDTFO+C8H9AIk6lOW5yGmVes+9aSKeXOSVRsr3Ckq7XI/aeQHd5i CMSHMIRk1goOUsOMDJ5tNH/sGwmHB48tuEZkpNUA6LWS7uYNtFUUs9GmPTazUZUWBmpW lY8qCgYh1GShWRUy698e+FAJgUwg5FJK6ZY0h+RlOnizyhtrOxrzMz7/2lkaknNf87MW SNqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=RFVuMCPU; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49402-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCU+LCLWjKyzJWbq9SU/gUnha4I0nVXLM8rZQJZjXL3OBjfLxjkxs0xTUZelbrPsuDU7LdZi10o83SWFXnjTcaAaAhfM5A== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v23-20020a05622a189700b0042c0e10be1csi1296937qtc.106.2024.02.03.01.16.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 01:16:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=RFVuMCPU; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49402-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EB9F01C29C8D for ; Fri, 2 Feb 2024 08:01:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9045D405DE; Fri, 2 Feb 2024 07:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="RFVuMCPU" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 105D81AAD7 for ; Fri, 2 Feb 2024 07:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860754; cv=none; b=fBL0luOv2KBsBxr6CmRnLgHt9u5mmu0DrDq9uWoQrbYZTGWQAhVzVWZjkWitZIMhkW7Z7KSKZ0FUIM1my8HswTPw5guRxBqqgXoH+BeAU7vF8XwmWR294H/kj0gSVZwe8c0ed384XpYSdRrlEsSv6iqGr1cTBl+t80LcG9W2t6A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860754; c=relaxed/simple; bh=Zwc8hMqLgPN8bD3UJwAwqjR9H5olcfm6X8NvTVgAYpg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FW9N+xYVFS4eVTqh5eyUmcgG9EsnzrTsGw3RMYb4g3sD6SbBL4ySlK94v2+IuKTYvjKZDv0IY1L4pdfoq1ZrwN3pe1lSUGZeRyoV6Nh+e0Z4ZX/ck9eihbRVIO1yOVKYMz6upVmPdqQ6kIqsHyJapCyELGuMsOsGY3CGJFlP5tk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=RFVuMCPU; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a358ec50b7cso94098266b.0 for ; Thu, 01 Feb 2024 23:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860751; x=1707465551; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q6ThDsg6UEiz1glmUeFqXiY5u5KHvWrwpDg8zbhv8Nk=; b=RFVuMCPU/lCx91Pa9CqnjHXzU/+c/6xnSfYkOBZ7WXHY241sBXXcW2ux4fBE1lfNK5 JrNyt1yvccv0w+Kxb4gVEaBiHeS0KZarLecSc4UCdIMREmTtjnV+/E2Si6xFSWMFeYcr qjzBT8k0MLBk75oiwip6Jj3n2/V7nft20klTNYLtL0pOaKnVjyCrZppMN1fOMc0/zd44 J/g3xvZ7ogQTNY/c9bBqzFQZUN0oidiRSnEZ8Ufb+Rf+H0qL6kTibbiMHS12fId6Ug7J 8qBKCeXXcTxwM0vkw14wWmRbG6HRzWhK6Fr78xEoXzHhFt77vvpfRr7c0Ek/XpzU5hQ4 ucRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860751; x=1707465551; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q6ThDsg6UEiz1glmUeFqXiY5u5KHvWrwpDg8zbhv8Nk=; b=dMueQujOz6wg7iLkUseWlzWdWX0GCvlAjy1+nb52I2BX2odKLNBWbtKAwk+vrzfe81 YxP0A7xZrVk/tnc/GItO0Lv2d/w8pCJ4D+/nHdPxA5J5t6hmCZiTS28lFEfNMrdJyLcQ wimIwKisZleqWiiP0+eQnTXVwJ/aB2ESEDMKUBADXisEDYcP8DRjt3Iw+8rGbpXLfWQL t+Ct17Hyw+GIJip7Oau8V+WFH7xHUXL+6quJZuws3K5y6OqY1qMehfPbF4a2tEYBPrLB J2dBkgt1OkLTK93Wco2Gpa1zL37zyZuRaRpezkzVu/GqmrzMo3YhWdKna9s3nLgXHc3z t75Q== X-Gm-Message-State: AOJu0YxwV5MD+B7RgzCbo04Kq/w3vBo7879aBG/0ZwbzvOW7AnlHfKDQ VeyMcA5EYAgZSOyspgQz10cJrk509xmUWO+zIquyJMVGtD2jHc0fiGDn9oBPwGQ= X-Received: by 2002:a17:906:539a:b0:a35:b59c:fc04 with SMTP id g26-20020a170906539a00b00a35b59cfc04mr1003170ejo.25.1706860751304; Thu, 01 Feb 2024 23:59:11 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXO15qrGo2Lv+43BwItNC3BX8V3vW2zwTNeUoF6lxb9YqIyIPZHidtKkuYc8frn9XDCGwHu1MxMBl935n/1JaCrTh6HmmPup3BB/CYTHRGthqNklLg3MM5sAnLKZDckhQFd/9TfgNIdY4MYhgmsT+hXQY+R8GvsHR8nxJ6VvlwlpnURczTBcEUI4UqHbYuHxRgcB1x/yshDHjeWoGQlzfLMmtac/D4jfSq2YlRVrZIAQjDWnuI+tiuoj6ibuDF3Q4sa2hcpsHsIzUS6cD1ai0wANCPKH0rqHvJpQxpDLk3BKt/3zzIK6OVo8uwmk4P6cA9MiZKbLYEodZ+D4jppa8mMCiPnaruCZCeMzhrVvhjPO0etp5qR04j2VPTAhSJyrbpTUCiyuyWFM6GUnopLPo8WbfaHPtij9B6nsnLHszLCWEmQmbOahY05EXHDacl3BaHLQN9+SDYXn7NLTTP8SaDXSzP2NSDBBqDBcgcQ2NiN2DjVOyIoWcQtZN2lp2RmZEdltcNoMIwrNWIScG+KMgofww/CU6Kzgh5VRa9TxadQHZphlZE= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:11 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea , Conor Dooley Subject: [PATCH v3 8/8] dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support Date: Fri, 2 Feb 2024 09:58:49 +0200 Message-Id: <20240202075849.3422380-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789806067559694595 X-GMAIL-MSGID: 1789868704775820610 From: Claudiu Beznea Document the support for the watchdog IP available on RZ/G3S SoC. The watchdog IP available on RZ/G3S SoC is identical to the one found on RZ/G2L SoC. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- Changes in v3: - re-arranged the tags as my b4 am/shazam placed previously the Ab, Rb tags before the author's Sob Changes in v2: - collected tags - s/G2UL/G2L in patch description Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml index 951a7d54135a..220763838df0 100644 --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml @@ -29,6 +29,7 @@ properties: - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five - renesas,r9a07g044-wdt # RZ/G2{L,LC} - renesas,r9a07g054-wdt # RZ/V2L + - renesas,r9a08g045-wdt # RZ/G3S - const: renesas,rzg2l-wdt - items: