From patchwork Wed Feb 7 13:07:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 197922 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2213683dyb; Wed, 7 Feb 2024 05:08:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzCZz/gTxH0L53XMLcJw+yE3ZSkcd6+olSoaPb2i1stIqyffgxkvA/KEluxPmFmp6z08aT X-Received: by 2002:a05:620a:24c9:b0:785:9ed9:b638 with SMTP id m9-20020a05620a24c900b007859ed9b638mr1420143qkn.71.1707311312921; Wed, 07 Feb 2024 05:08:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311312; cv=pass; d=google.com; s=arc-20160816; b=qBJqxdod9kKutJ2ldS03TVDMY+usTgo7gPHJ7KYmSzQPvDMnisuKnVhbfloRU68Jna 6Grxec69YvE/mIGrM9HAGG3brm0IXqtWmAsP9oHBWXKrZjct9Xtq8JvPG6NO4UG2vIe4 NFqYwzD8AarJYnNlUVDGItMjRDk4nnbGUmQFrLeyya+p2BsLmCc65NZ6+8k4664YjfrG veAvYLbZikSpQo7N7UgO3sWHyvCmlaP4TNOS73euz81NT5p57VlqVqjhcb4Ip6AO99S9 63jRpDw3HaXh6sZtQWhLiq8LX/uZgdn5YSqb6tJ35TFpvZpD8eY5QdbDw2bP1FFJPnKv 9c4Q== 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=uW10i55FY3acv30aAFiJ1SA7rereFBOBZltidmdP1vQ=; fh=EAl47lG+tdqFFlElo5YSQIjLb17sYMLVZNgkld9FpIc=; b=dDIejZsYemR0zZinUZ/MhiGyjkHlHsmGd+0D5bhQ2Y9X7Gx/TETnUHSPlmoREL8dqn DzUE1gSCPoNxl11WjHTzu6THH5zjLUIyVKa1PF7owF9/B2FqST9gpBtK5FBENQDjvnYM 6QHJmkQRsQwsOr4nNS2sRbFvGbM1fHQfbqnxJzPVWTm6NmI/Smc8lGQrmGTdTRigrMNB h3tHZ8ahI8rXX3jtWXknlMAY8y1tupvsHmrEDjmhf5XRkTDrX9CVWHRuG0vTVjSqLrxQ G9m4Rvj1RCcVVKR31A4IqOVezFkzVfBsvK8TszIM+nbAv2HFmSnDnU1TtodzusyKJ1KM GpWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=U0NMg1ph; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56510-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56510-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUpFw9QULkd+8uP7oPhqHP4fKm1gv1QYCGXb389dUA2mqu3lDEy5Y7/Jy+3/VqD21QYo3cssomma6lRHeImYMznnVnv1w== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u12-20020ae9c00c000000b0078401376700si1019481qkk.764.2024.02.07.05.08.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56510-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=U0NMg1ph; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56510-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56510-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 B2F901C253DB for ; Wed, 7 Feb 2024 13:08:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4519E76C6B; Wed, 7 Feb 2024 13:08:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="U0NMg1ph" Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 5B66176C7D for ; Wed, 7 Feb 2024 13:08:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311282; cv=none; b=ZfmcCd+tE8jognir17GvvNAxS54hcwlfy/O0TZO4Vm/3WY5SBAubql8JuYnC8BPKCqxwMw/50AFOznsi56xc0pfCepvgm5lpIP1ZVy/KwXCN8LfDSD9L5hJTExwnnG25IUEeqmxyrAkhPEygx1nqCtNgFtuFBctTQAidsBQBLro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311282; c=relaxed/simple; bh=EkmY4sElqM8pbcli7MR0xp3fs5dAXCeOD57sfGa+0FE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GAQ/BYoQsNEKeF7/lUAwol9eiRPRz6y6yln4JZ0yC4mZgiTFFQzmJZVgvUw/62zU9R/BjWm39oJP+3wgtZpiavaSqwKuOVtbowfMwl/uBCKQuVatDgemXqaZjMWrC232nuX792HPaRhhz2qeW6AYGKxqH6fMyQRHZZxXP8wYY/8= 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=U0NMg1ph; arc=none smtp.client-ip=209.85.222.175 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-qk1-f175.google.com with SMTP id af79cd13be357-783fa618997so33595585a.0 for ; Wed, 07 Feb 2024 05:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311279; x=1707916079; 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=uW10i55FY3acv30aAFiJ1SA7rereFBOBZltidmdP1vQ=; b=U0NMg1phZZiuORuUyAh83Icpl/YgwYTOZreJw4bcyxQK3WAERVxeRiHivIg11QZWPD XISnD4eeWnylAWFVU+lEpiaGQert2zxqvuRsBT6DvFSKc2tTHGCrxMenyfm9Dgx+dAjR Qo5C9Ia7RXvXAXclXys3/+ruVUIMfAVxlViGbleng4l+aFVgv2XXXVE6qjeSm4Ks8qwE Jw3uT79tNuLGr9FkhCOY/l9G+ydR+TyRBRWB6gTn9uevCpwVqSwpouey5FhSc9ksb7so ZvYY8LLXnH+r3GVhw9q9NiGoR/3XmqSt39Rfw8h34V+F+Q8SLAhSXFg/htwYJJbcCZy8 Fa5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311279; x=1707916079; 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=uW10i55FY3acv30aAFiJ1SA7rereFBOBZltidmdP1vQ=; b=vnLy5dYJ0jS1rp2eEjZTzn/WSTZbHdDqtXJSEbmrrzj0DvPYrTDVxjqs8B9Oe7VZks MKG65XCFyDEK+e/Bl9Ke5bkoeEETX/5rMaGElEplUhyfUMefBJQIpLLR08qM4pyeNEcW nlLUIq9UBM4CLvyU3x02fldzGAOIxL2y800iT/i+SKnbZpxnI8kiDijP2CcR3X/7X21Q fuvpDZam3j0FvNTE5PNcMrGUoxjFGjUxpd/tOInbOrdf2T6lOI1u1FoOSAwiy2phFr37 mGUXtfU7Wvlcv0m5fFWeNBLt0EyjZI5S+HVXEfcJuiDOm79yD9EMnPLYSHuaMBoWBGs4 WsbA== X-Gm-Message-State: AOJu0Yw7MNSV0Ns6AZBB2nlCSdzNhRfxvEl66vrvpG+IBxNZilRD7Qxh uwMcGf9TLlv1ZJNCMM15uExuXW3np0D38lidgDeBHDaCwzXO+Ui3ts4+JSOZ3IM= X-Received: by 2002:a0c:e1c1:0:b0:68c:8f4d:c754 with SMTP id v1-20020a0ce1c1000000b0068c8f4dc754mr4521665qvl.4.1707311279237; Wed, 07 Feb 2024 05:07:59 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXv9OXwnC3yotcFf/aJQSOVHvMGtgXuuhsvJ+XtjxfQ2A4hI0c31+nEroGqBMjp4jF2RSB5EnlqSw2+sYhHZnoMyfzvIu627dWL6mKpm7KDb6VM16uPyPKs/nCXHXmPdGNk6uNMhaPj4SB96ak+W5Zb9gxgSo8tzIxXQ0JwkpenGmSRoV8EQPj3/cSd72/mlXi6XcclbcTvEpb6oDmbt5uO2HxQFEHrDN3ynH2/2JbD/VDYJomqDqCTyKSBSd/YxY0wbpjCmPr2WRqynmuuKatdIbrGH4li+ANjS3daEn7eVh7OHTTDg3XPhbarc42bc9vKKQCuPhhjpMyb68t228z0h1pC1CH6z84IVTDPo0IETrKvK0DQFMkG5HDt4EaEbYdQw5bWS0I2l11gGzcmDR+Ep1k6qNbr0btpMdmPH4ce91MOj8QmlefuXg1S2SgU/zdp2GzP20/E/nPKEOHw0vT011BUAI/zxavCmZjQY/jWNWHbnFVhz0f6JlC7AhIuBrfvRNbB+GzV4w== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:07:59 -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 v5 1/9] watchdog: rzg2l_wdt: Restrict the driver to ARCH_RZG2L and ARCH_R9A09G011 Date: Wed, 7 Feb 2024 15:07:37 +0200 Message-Id: <20240207130745.1783198-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790245667499281946 X-GMAIL-MSGID: 1790245667499281946 From: Claudiu Beznea The rzg2l_wdt driver is used only by ARCH_RZG2L and ARCH_R9A09G011 micro-architectures of Renesas. Thus, limit it's usage only to these. Suggested-by: Biju Das Signed-off-by: Claudiu Beznea --- Changes in v5: - none Changes in v4: - none; this patch is introduced in v4 drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 7d22051b15a2..f6cb63a0d889 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_RZG2L || ARCH_R9A09G011 || COMPILE_TEST select WATCHDOG_CORE help This driver adds watchdog support for the integrated watchdogs in the From patchwork Wed Feb 7 13:07:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 197924 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2214156dyb; Wed, 7 Feb 2024 05:09:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV8giGhxb9+Lz8B6Cgh7R4oWB8UwLIy1FFmonR0MOnhob0AwSNRCIWQhtvJQ7281X4z1lqU+1Ug+m21zcPI8P2v8vRubA== X-Google-Smtp-Source: AGHT+IFM+4puwiXpDL9HyCr2GEn04P1x82CzO8mpb+/+wBO58chBm2ifQq7FK36CxU4Hr/8SsoU2 X-Received: by 2002:a17:903:28f:b0:1d8:b51c:6b79 with SMTP id j15-20020a170903028f00b001d8b51c6b79mr6707927plr.7.1707311352006; Wed, 07 Feb 2024 05:09:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311351; cv=pass; d=google.com; s=arc-20160816; b=aG6xjpp6coK5sjmyUchjl/4tRr8EboqGvTTGglOQWsg1Lc3R30JVJUX85IkZhn937q ZuvZkJ6Q+kvku7n7/jCTQ+bVlT5ZU3lxt2SWY3fxY6+LN/7OryBgNUFTeSHLGC2XHPrh vuOG4zFmiA8X0I/h0crDYfVITh9jwO8uf8+YDvooL2ICk+7u7fNpWKo1pqa9BdHVTRwJ R7gsh/zeYUCUezcF3GDzUkU879XtGwBqMhEJdUMVegXE6uthtC/8+e0uwnqFwgn7Kmmc pcVJfX9HmZysZ+QS1JPu5qKMUnOGkzQLk+dS79lHLDDfQ+Q2c8V5HHpBTB+nHkbZ/83p IEjg== 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=ob7yffFeJDPnH/PhT3IJv3UmWDx8a+BmeFJCAJI0aa0=; fh=JYLxJg48AxUVBJa1xicw9NHAROvdXIysCXdufosogfU=; b=uZDmCXk21GXd6B/4apcOa7gLqg2ZRpJMCAMxyx3YHwJl9uLwfWzAW+FodMJkVoZcT2 uqg5DDBvYr/0iGWAHhg4kQw9BAb6brBzrsEgDGY0r40qsttHXkvcRkRYzEel8VGwNopM NVkxlbI1LKuOTTz7t8AQexA7/fs5EDSKAbkva9P1gTdTPXsQKYWi2KMrfIEfp56Oiy/W 8hjJwEC+NvOqx564M718b4Y7Hh8JNIvHH/YUft22c6Y0/vRjZd9O+jf1mTtYM38inOii CsAA5L0rQICbM5AsX9ob6IkUTGYI+cUlxecXovR2uGzl22aFP3gJiSmB0aNoEzT4D600 buWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=lLIikA5M; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56511-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56511-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXYYfRmiMFwq4GA1fDshpeeDRnLu16UMwoaALfXn2PBCnxRHwdSWECHiC2goqbjreUC37iSyTTVGyJb2PoJ9sHDZtczgg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f18-20020a170902ce9200b001d981d6e0f7si1660745plg.572.2024.02.07.05.09.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:09:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56511-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=lLIikA5M; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56511-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56511-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 92B64B2404B for ; Wed, 7 Feb 2024 13:08:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D70F7A71A; Wed, 7 Feb 2024 13:08:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="lLIikA5M" Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.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 573E377644 for ; Wed, 7 Feb 2024 13:08:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311286; cv=none; b=jezyd5JeX2YzECd/yHXVWczNhzlhMKafMuhuMnPJXvBn0+fSOGXXhyXXrcQNLmpLKG+p5KnHJSzXQVlujR/0M6gIj/21btjrXhjD/C6731p5Uz+BBhivpn5FXC97MmbiP1ebETdRJ9qA65zqfBGUmtcNlf2WZiAHdoThfeJpl6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311286; c=relaxed/simple; bh=lCkPIhg4eqOebZq2DSdEYJNxd7Hk5Ji+XPkonxMZ21o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ONIVAeeKPGHtMgAJVkiXEd1VZdCZENI0fp8O5vgfC5Er/QU/+5Ovrw9ImNI23zj3itOnlqIkig6nhDzXeq3OUbXsf5E60kSJgrj4AUIEiChUbhzeGYSg3I6PHND/tJemR0C8bANtqy2V658vIOjqJXTy8ZaeuzmTVar2RAeOhIs= 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=lLIikA5M; arc=none smtp.client-ip=209.85.219.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-qv1-f44.google.com with SMTP id 6a1803df08f44-68c4673eff5so3295216d6.1 for ; Wed, 07 Feb 2024 05:08:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311283; x=1707916083; 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=ob7yffFeJDPnH/PhT3IJv3UmWDx8a+BmeFJCAJI0aa0=; b=lLIikA5MRP2evwQoJ3ZFQQ6OkK8AbZfVxIj8E+cRkyIKjXO3QQZ/JOpWUrWcquXiRZ U5nfJcQdSiOjpjzHizMh64y6vAG1H1q3kcaWf0O5Rrs/IHfgjr/ksB/qB50Ws8PXJWT2 jDF9rMpQvM5DBWkP7svIw/N6LuEdwKrC6OEkCRf0He1etmVM2c8PF1NitlN/PrsZIwiF Jsbdr5yJjrf82vzg49Y7ap4m4OUfq6i551Ev2zErlHXokbaxRNcF64R9CGYsGh5b7HZ5 x4eA7/yiKsf486syDORLMevPwEGD1FFyoGGdT7/RMDH+S4o08m52o2j13kWaDF7YpBrb +q1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311283; x=1707916083; 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=ob7yffFeJDPnH/PhT3IJv3UmWDx8a+BmeFJCAJI0aa0=; b=IqpdFrtrH0EZutWLSTfbZSwtzwTeF7qxY/PUay2J9SL6asleRLMe0A2EBnR83dVNoa zPHSOiAW5wAMXzRBBdCfDieuas1lkXCeCJtdaOZlzQZDlZvT6qbWVdESsZWoWkr19BvJ ObxwBQ+/cY/+hUE7dPCajZpzsBqDgRybzi941bhfLP7aUipH8GG06wOIRNRzgvdgR/01 ZRzsXeqxoODwlbC63utcK2TVYpR0LgkHudgcaHjuaKpu3mnbbsBdFYKH+swrISrEDGqo +9F9XMnHf//oTCu0tMvVRPACRNVg/rNB4ylGiAn7AwzGSmUzZ1fqpFxiSQUD7K4s7Sne C8kA== X-Forwarded-Encrypted: i=1; AJvYcCUGGYw0qTjLzFoECVBpJm8kpc1o+etv5VDUFDJ4yCQkqwOsJZw9/DcrV4sDy+WKShk4zJjnzhPj6MnrkeLHbZOgfj3cpUJ4vWYnK0zx X-Gm-Message-State: AOJu0YwToytDXkSZ01um4xXS8SriDKHBlb1wyFQKORCmZiF2lcDy51Q4 6Lj46uiaYozjY8MKgMr2H5FsqbOVgDeRIp3+qGSBsxnDHn8EEsouvPheY4kRSG4= X-Received: by 2002:a05:6214:b61:b0:68c:8193:61d0 with SMTP id ey1-20020a0562140b6100b0068c819361d0mr6939090qvb.64.1707311283227; Wed, 07 Feb 2024 05:08:03 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWqdtEAhXFAGWbz8AYWQn8DAL3dyGGxVaveN45RfKe62dJzuG7lJ1xInYHLamsMR+tviWJFzWlXozBjJmVEtWntPM9BbNZwU2XxNKaXCLBJU6qoM5NGTHK1wCYXZbY2CLdlVEmhdq4eZu56mAOGqhJBU/SbiFOscJYbR5pVTJAH3plExMJ0vr7WXYfJ57ZVWZVQys+Q5UKVZkFPvg5AQkKjP/MPGC29tDieSh4VTXhHfHc2f07PPFX7pAfspn5Lt4XBi4KhhlUYowoBXMveSckEd4pgWVwZL+m5csMegRUH98K/4DcIJnM+Pu16xhmX7JbovHRPxGq2SB+XpEtQh/nZWoQiJ4g2/hVPkKZdEShtDW5DLSGKIE1boG76wWPaVbxi7PTRNyqgmkPRdxx+rTGQv7pMN1dVKTQDG3tmzC3phT+yTUuAo209GxYMohWcPgU+qFGD9dqRah44ljkdCEZKfeZBW1CCNi5vx8s9oVM0Syy+Js2FvBy5L//1qH48KssvbN3y+SM5UA== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08: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 v5 2/9] watchdog: rzg2l_wdt: Make the driver depend on PM Date: Wed, 7 Feb 2024 15:07:38 +0200 Message-Id: <20240207130745.1783198-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790245708378679614 X-GMAIL-MSGID: 1790245708378679614 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 explicit the dependency on CONFIG_PM. Along with it the dependency on CONFIG_PM and CONFIG_COMPILE_TEST was moved to a new line to have the code simpler. Suggested-by: Guenter Roeck Signed-off-by: Claudiu Beznea --- Changes in v5: - updated patch description - added on a new line the dependency on PM and COMPILE_TEST Changes in v4: - s/ARCH_RENESAS/ARCH_RZG2L || ARCH_R9A09G011 due to patch 1/9 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index f6cb63a0d889..dd0fc44b1ab3 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -910,7 +910,8 @@ config RENESAS_RZN1WDT config RENESAS_RZG2LWDT tristate "Renesas RZ/G2L WDT Watchdog" - depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST + depends on ARCH_RZG2L || ARCH_R9A09G011 + depends on PM || COMPILE_TEST select WATCHDOG_CORE help This driver adds watchdog support for the integrated watchdogs in the From patchwork Wed Feb 7 13:07:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 197923 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2214061dyb; Wed, 7 Feb 2024 05:09:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAfiygwnlptjNoi32QUFwmkT6J0ConXp2l8iaYkOghVIJW+F2B9LYo6jAobBJRy7t26xel X-Received: by 2002:a17:906:b217:b0:a38:76bb:cad0 with SMTP id p23-20020a170906b21700b00a3876bbcad0mr1287168ejz.23.1707311345017; Wed, 07 Feb 2024 05:09:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311345; cv=pass; d=google.com; s=arc-20160816; b=Z58kLHHeMlYnLd+jU+GjVtJdjH6KLwmuoqqIB8BCP+R7AHR380UELqAQVEwN9d2j8U 7wkq3Ox/K86KmydQIdt1++f64YppZNfm3RulmqpTHxdfDh08+YjRBQ86ZM9KkaCWB2Sd QYGEctjqCVdmNF3KPnsohH4JfvU8TB9O4lRBoZmzn4uPRWdIam5B4kiBySg2nUkWTmLV ANO+m/16WInhMvUhInHIYVbZ2GoXIU1tMYqiAd1d0pzTcd0A0JWPZlbGoi6xLV36HZqP l/OqKBgXHlpJFDpqvhI8j00ox+mXa2VOBaD0xMU0YMtMOHxJLqdcznFrWQrMJM2cF1CG +yXQ== 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=Mz2e76cy2G1jvNc9Tv5K0X3L6EcoQBWjCx1l4t2/PSs=; fh=Q1WB5XVbBUwbca2jwwKEIiES+Pbw0Q3zalucbqf2yrQ=; b=oqXwM1p4UGNjdpn4saj4i54AbXY1LI9FT1xJMrCL0CejEd0vKfqGA/UkK1QRNtv01f GzApibTpEgDaZItyBGROzzEg/j6rdiQ7bAIaUDrdvln+P7L4KC2UKmwdGXtSAyyq3LOz B+msXzUMlulfJg74UxSsVUAIRuOeXMAAyBh8EutLgn5QGl+o3KtWTC9pvHN8+oJ+tGu6 flY+IZJekVMF29XzwNKqq6n3HhGb1eaUrMWucA6TxpCwvHnsZy7DapeiyoOnVPrv5CcI +lrejDZCZYcemeYpSUAnYmRK7ww3n9Z4l8A6yw0CK1e0mtoc2M3hi1s7GkFMv/HntVhV P40Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=MHieDIKh; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56512-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56512-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUoKXqGV3s9iwacW2iIWQh9g6QUcQ0+N5gADN4MYJw4AYwroDf8nLLGU226Vki598Ssx+seDwikbXancG+QRhx8/wuPHw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o27-20020a170906359b00b00a385135b0f8si889210ejb.750.2024.02.07.05.09.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:09:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56512-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=MHieDIKh; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56512-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56512-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 9FC291F2552B for ; Wed, 7 Feb 2024 13:09:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A7A07C08B; Wed, 7 Feb 2024 13:08:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="MHieDIKh" Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.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 D0D9977F1B for ; Wed, 7 Feb 2024 13:08:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311290; cv=none; b=LA3nN0AOemDe6ugto5DIyWtufTzHm/Ep6/Cj5LiiFXHNP6qwOY4fAdPdGtzhGI8WyRMWHIE4EM/ikTAL73/D2RTx34n/mRv4RXg+zDp6Lj7coi0d+vZuiruTO695bxV+x6qcndLR5yZlTOrpcKy/5sMtNyFiCTfWRWLasXR4QBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311290; c=relaxed/simple; bh=FF8wk47/TcFJ/MQbMeoYLR1AQ3+e7GoE5yBfYiqyb7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VirHzYZr8TSvx4GSrqRrqPWn8F6lOcSUnOWZtZuqBbLXiczrcVlnhYJiACn08noOl9ir5qN2v+R6PiHbuy1bOV4G/7laNxlYGcPwKJj5kzPyEzpc+MCNYAJnbkhJ29lpuXrsqLEdrvuoqQ40X/ZJQ7hWTp+cXsXp+lAudGzsJSY= 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=MHieDIKh; arc=none smtp.client-ip=209.85.210.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-ot1-f48.google.com with SMTP id 46e09a7af769-6e1226b30ffso298252a34.0 for ; Wed, 07 Feb 2024 05:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311287; x=1707916087; 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=Mz2e76cy2G1jvNc9Tv5K0X3L6EcoQBWjCx1l4t2/PSs=; b=MHieDIKh0XDgNubUtC60Y/jISgPsnWbt1VUk6aHFldeL1USHLNHdCrsZOrR0RpZ4yt l1prqrqWe/k6tSI6Mqy2XLPfWIdYX/x22r658lArO+07r8rr7WejtWTR1EY7YV1l+00m TlLBbjGyYoV2qyDshJPxOkfWFTekwIWHyOaSie1ZinSLn4W0c/D4m0ItIRupKNrM311c w3f+QEbzw+x3akpsMXWymQyWdvyDld2AN2DGp4eLXBI4dxjZ88OoRo3B5zDS8FNJqmja Q1CDFQppGcDQVrhVtvUoJiZgCZb2wIJNqz3uJLbXZb1J2FtctbyHmHgHadIopdWIN2PD l4zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311287; x=1707916087; 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=Mz2e76cy2G1jvNc9Tv5K0X3L6EcoQBWjCx1l4t2/PSs=; b=Uy+MHjo8tuM4dbZFXGOE9m150IKvkZPRHtbhcX7RbkB7D8TNlHGZHcShsdoTc/ZHfN KyKbRMf04UEZOl3FGiSMJcnFUraPdSmtiw1xf5v5IufJcn+xUCOJNVOuQ/QyVT2KqsPe /JofIeMP6dar8Q8zIBv5pxs8+XLNvIRxqg+BLdtF5+sLwmSxVukxZoGWF+IOYq8qCjMD ljEl6Z5mELtvZTgsCmbs6w4RUdPbEgs3GRs6nMPkl3MKg0pH8xN1kF1wk/L4Qe0dLlW+ Nzax7XSEoyO+FN8Mzm52THiHbk7puvPP2KDX8m7tzlLVXa4Kjb8Yxh2OiwLHqufyJoLT IquQ== X-Gm-Message-State: AOJu0YxSHWmXCrBUtgpCsZ60qSiFwjD3rFfCUwvyGHEYkjfe90TOTHUk cFNpu66jLr3AJU8lpIkUATF+ouOr/qp7c75nXTNfKbZRjoab+VPEPwS1vYKAJ68= X-Received: by 2002:a9d:7ccc:0:b0:6e2:baa0:76bc with SMTP id r12-20020a9d7ccc000000b006e2baa076bcmr1091321otn.26.1707311287085; Wed, 07 Feb 2024 05:08:07 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVEvcNgyV17O0Ogb+Haf4TBO+ibKFEJ1F83Uqm1jIQNL/0S0SxTdVTh3mUo7X5GPm/bIio05AKvbC+JELabVlT/Kv1s77LtFlieMLelJb55tjgsJJ3TKPMZGejoLePsLqgX5JzoB1cpqGa6TZMuZOeWN0dJ8rz/WuRY3dmag8xOpvtRW+b7162SmGrEekovdeS9EcHfmrEzPL6CT0uH+zb+JsKlt0lEA1qtttHXNdfJtZ7d6Ag00CqUFAPya/ACEej3CePs4Lcl3dipWcTSywbEPkBESsRlAlG2hhUqp9RUBoPTzlrwLS8f6TSJOWAYsdTrXNly5Fj/w+HPOpHxbUn3UW1VWWYcv7w7xcIhwL+NcIutWV1VH1UvxJfuwfNCiRs0LfsQkxhpmlnduZVqmBVLIdN53Z6zAno9chOlRXakwfCfjyaf9wft6uBr4geWCFvkXdArwWuOpQ9Lc9I/IKRnDSv6NQKZtIzw0G8LwR3YjKYhGEte9brgK0tnO5wdG4IbwnEiXnXBcg== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08: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 v5 3/9] watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get() Date: Wed, 7 Feb 2024 15:07:39 +0200 Message-Id: <20240207130745.1783198-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790245700736282214 X-GMAIL-MSGID: 1790245700736282214 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 v5: - none Changes in v4: - none 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 Wed Feb 7 13:07:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 197925 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2214256dyb; Wed, 7 Feb 2024 05:09:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHa+uwxtvcSgvH3xzALLiCMt60eGt7SCV5O/jkRXZZNBAAId6SrWFSNzrIWZq7oqLE5LrxM X-Received: by 2002:a2e:b60a:0:b0:2d0:a6ef:651d with SMTP id r10-20020a2eb60a000000b002d0a6ef651dmr3596442ljn.47.1707311360987; Wed, 07 Feb 2024 05:09:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311360; cv=pass; d=google.com; s=arc-20160816; b=QTSHJ1F+GR9mywyCGPTihK964+h+C+bIAEf0Yneg/4PNj6YntyxXT6vAc0Qle4mmj0 jsbca4XbSdBLJl4yDhCA/bT/0tpOydOj4rgqKrec8SfWPgKTI7DAvp/jGii7BgtTKUGQ P/dxrZ999rhR7x/cPztPDHnK+R1qzfccnMFX77C4YxIjjttPENN+m5hptUtb4Vgt8twx FPuEdKmKe7jDd0kKdrU0vqn//5XjGRlUZKcOZmLsYbYgtxr4an2jqGXgQDDHrLCDu+xh OSbObWbOeI8zFvxg2booP6leJKpAOlON0QttL3HF3QkGYahcgw+7MvHrEzg7rJ/WO3z8 3fuA== 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=TsvoQxJKgykHPmELvvoo0iWdxFiWSLC86SAFUlR5Bv0=; fh=cT7U86jikwgsVAHCyZOvyYuVD05KHdbsrvR8YbAyJq4=; b=nrePVWgCA3u0wu+01jVlJC9Tb5+Ey8H2AvLZmvEGwdJtXh6qRKPAzW07TcrMp/ag+s Td8PXm94+faNoHjij7dwfHvAd+UvBUli/oOgVnlUBFWS8pzrjT0uxbhXxzBy46hSzS8m AGNwbW/vTmP09PknJjny3BB42RGWEub0nXGsmyrVoBfNHMN54PUrIuEoRVOW5mn8cUGi Jk6gW0CYXxKzUKcUx5WyBQpjGCPLg6QB1KA+HLJlVe8YVchkocJMOK1oB1MiK5v2RE6L qZWEh2OP1ZkB8cG4fCEjHM7iIhu3pFPV5o8ZRBxA+seUpy69a8JEd965WEIfTdkOYv9B jVWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=pDLC+FLf; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56513-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56513-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXqIF/1X5Bmux1YK1p/5HCXKtvdXifK8gypiZqWPMhEuN/nw6ir5lMKevBA6MByTcEyEjzVap/D2plVXCSYEuz7iBe9ZQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w3-20020a50d783000000b0055f27dea051si833157edi.347.2024.02.07.05.09.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:09:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56513-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=pDLC+FLf; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56513-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56513-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 953631F25713 for ; Wed, 7 Feb 2024 13:09:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8E0976C7C; Wed, 7 Feb 2024 13:08:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="pDLC+FLf" Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 064797C082 for ; Wed, 7 Feb 2024 13:08:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311293; cv=none; b=HgfhOjMncP+EqY/9Z1Tp97dNvyZmeC7EQonZcCNvVderQ2WK3ZBQ3w1xD7vWOgFT2j4oGOkxBi1OaLMpYuDCOcZBChaJ1/bL+EZ6cirPZ4H479DfKbTF3BXbmryDhT5AVp9q2yw84Ino8nGtzblC8SqV7XO9ZVysi6ivbYDM2xI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311293; c=relaxed/simple; bh=0yYe2isV4O+U0xGShILWSjk2puDw/sFjq7PGbppMq9o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eyyT7BN5VvTCRGuqcXX2iBYvearXTNzJiOLxEcW0qE/XtoHlz/89Zyf1mv1/9zu5IjPScNNZO3FmZJEPJRv0WdfldTdth1t8H+LMIEDH1USC9Kr8LT5h5aVbnBw4nZ2pcwYDQaTtV5XZv8o4A4EIoOSr/uB1shUt6N5oZ++gIQM= 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=pDLC+FLf; arc=none smtp.client-ip=209.85.219.49 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-qv1-f49.google.com with SMTP id 6a1803df08f44-68c4300518bso2902296d6.3 for ; Wed, 07 Feb 2024 05:08:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311291; x=1707916091; 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=TsvoQxJKgykHPmELvvoo0iWdxFiWSLC86SAFUlR5Bv0=; b=pDLC+FLfeJjrKP0bZJlF3ydUYL+1VI32q39fxVeqnHlVGTcbm/p0H6u4eteACwTVR4 OyvQR4SA6TLKMcLEk8nX4rtxRri2TcJFlzs8ztSm4Gb0o+VQG5BhLazzhVqfmjtDBuZE evYrPgrQgLNJ+e6Jfx6U+9kGf2ErptMA5/9UARZ3msRblIxG1NswpOtJ2+4k+3iLjvSo bnbfTKIWZL3bFV1LU5M6KOSIchinwEdaVGwlqU24XLUC6s2jbzsGE+D1HMqA6viZfGMA gjc+puOmtamXE4aT/R6R+vYuZubUxbAtT85RhwWrhXBH9CFbJXf5D4UOwVhb4RHEuhSg K6MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311291; x=1707916091; 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=TsvoQxJKgykHPmELvvoo0iWdxFiWSLC86SAFUlR5Bv0=; b=KNydbmFNso++RQRCej1fbqaTvy4tC/sV546b2gyHUM/BLRvOfCPt9DQgZP1rgCNP9Y +9R0SG6QtgLaCGTAiVxRcWTNLxAyamV5mIWrO/seH3+GJBdWYgZHNS+xHz/+MgOkj0vV PD9tB7KE9KxvUvENIMFnLUGqITibhLFyVNBuVZnDpyJ6tPWMr06JiXKjbHfmyasWPtYQ S+65oEvOb7Gn9L6bhxvWwuDrMvOj5ZdtQSK15qdD2tHyfBssOe6AuPglXPepgyTM8rui Y+cRsdHi3E0lID6JnyR1f5pQSr2cPSZc5XATOfQVACPLEGXIMqe9xobxE5K0LgZJYVvq IIZQ== X-Gm-Message-State: AOJu0YyoWhK2bRT7Yne9uBn7B5Fi0iPwdUksb0fm8y+IGFukUDi41Tl/ sSErlltEsz7nW02EoiGhqQ1nke5qVQYWoitWD4QU37LrCwnPwr6hnrQOBVH8h7PFSUTkYA7zQcj a X-Received: by 2002:a05:6214:29c9:b0:68c:a6e3:4db9 with SMTP id gh9-20020a05621429c900b0068ca6e34db9mr7021485qvb.57.1707311290933; Wed, 07 Feb 2024 05:08:10 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXhGi7Rh/av6SAxjEZKo61ucV9ac9cE013IgHnUT4qbvYPO/o69rvKfzj1nKmYnBh8eIVWtftlmXfIWJiCfr1aNYD9mdnotCXqzvfRj11Qu5GtbQGS2R3qjMHxcV05DnGUZr+IcIL7i4fSwT8tAHbGoMe8i250QKEoCLy2IZYe+8TYDFbGF7uT1XG5BypZ93el7z68uGlVO4iiJd+QfgviHPhu3lpmKcx2izAe8gpj6Mc75aPG5+90qFBd3fEY8tNQkz4Jo700Qfz8W5hXb/cEQuakWWHYHHJW18eqOczNyWF4+BQP+HTl0TmPUFbLop0AXSy/yEOQGjbtcg5ayW42KUBUiYHKFmiaSaMjNw0bxrfEHCWJvOSPax8s6oBiQB6YlNNfK1VGeKSenb0Qa3t7FZyL1HfxryV0kDXXAOMeyqbPh7KxtNTEuTfbmSGYqzr7bmyv14GlwHzVlE6OeX7XnRuqSDv+d1JMQdar43tFGSqgREyjVBV5Vq2Ji4B1rpdYH9E8TuxlGWA== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:10 -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 v5 4/9] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Wed, 7 Feb 2024 15:07:40 +0200 Message-Id: <20240207130745.1783198-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790245717329491046 X-GMAIL-MSGID: 1790245717329491046 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 v5: - none Changes in v4: - none 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 Wed Feb 7 13:07:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 198841 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp809755dyd; Fri, 9 Feb 2024 04:20:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnApRew6DngumR3f/AZIGWL8l7oK7trt6fR5G2EYCCSDHq8x14aM1Pfj9w9Lw4oDQCXqdU X-Received: by 2002:a05:6870:ac06:b0:21a:1702:d6f6 with SMTP id kw6-20020a056870ac0600b0021a1702d6f6mr1062814oab.4.1707481234784; Fri, 09 Feb 2024 04:20:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707481234; cv=pass; d=google.com; s=arc-20160816; b=iyQqArNTu6Wk5olDNT1i3gJEYu/5FMav/+axx/ELQMCqfdaMujYFXf5+byp4dETbgc FlBrFS46wpP8o+42bo8iyQo+SjIBpipWM4y0e0fSP8vVKO92unGwEhdBZt+dHkg+O+PG lVh/A1LVfL/oguTU1Gq8y3JK769lsufD7x6YPUiYdIF8NSYGvKv2+P/ibjWZ7PtE0Qbn EKzXj6TaEQyQ7Hv5gC4KoWiFLErnhJyJXX2ADX6KKmjV4exrDNKTCVS59WIIMoCt9TRN VjFxM03QLgup8R56Lgi0LC/E0G0gRvHKoW771CpVaf4yvU40dEGBMNjyK2GAggD35SaW 3xqQ== 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=mpquoA6MMqGx6uzsKq9/tx8DFlYrpZmyLYlIeMpPzbg=; fh=xV3ydjWOEiqnB8/c4iPdXSDP4zmqi5XryVrlgAGrKiA=; b=zit5tEwqJc7v4ulfqC2mA3HptULgnmtb7gtINJ65McGtiI6btnXkjj0I4y+MUZh8pP naUhdmrzWdaIMZFtz+Yubbxm76E7XvUeXl4bStvwGlK18YEgoknTYD/0iNFatW/Vc9du NmfpgUfqQAIg7tAn0LYu65FfsnBSPmNJlYPTyfGeTU3mFhpLouuaBghtvazJLzvncEIO DoV1qyZW1bw6YkETDWjIrkDbUyVgWQllaH0lO9IjIBniLUgejwqvTb+oPkESfedgGVT9 PnmxU6/59s21vu/00qLhzSvcclUhBRjMu5GOfn+yTwIqHJP6F4Hgboblosvyuzx5w4dz HqIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=IkRIiG9O; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56514-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56514-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCU50RlknlB+oTppvQinuV9U9Hk4zD9hrYgubB0H9Aj8nob4Rd4A0JLGiPBzSa12rhh1vFW/TVBTdVPxwTnJaG4club9Yw== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e24-20020a637458000000b005dc5295dbfasi1340199pgn.683.2024.02.09.04.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 04:20:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56514-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=IkRIiG9O; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56514-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56514-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2BEA8B21E56 for ; Wed, 7 Feb 2024 13:09:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECA1C7CF22; Wed, 7 Feb 2024 13:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="IkRIiG9O" Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (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 A55E17C0B6 for ; Wed, 7 Feb 2024 13:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311297; cv=none; b=HtqPzS8ZuCnKeKvxHTg/Ip4mDawekrH7kVhyCVIB8IfcKZedMMhyPADkcgclOCzTJevSGUuRtZCaSQTrFlAiXYGqtEU8sWp/z880OuvOKtqYjcuPUQHrZTrDaL2U5+9fCUu5UTde27ddjQtiG5613tOlZfibuzhRn3GMeZEAB3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311297; c=relaxed/simple; bh=Jsakn6A7UKMfGVBLON3X5YZSna+0/BiSeUcjEEJh0TU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MN2pZxGSYXr/zraNcqYrIDb6eDyer5OZTd8xNBpuKoBs9z/9CXxZulQecmQ1Q0AWSnobxvahwcbiWwA/uAktX1gUhawSEyvZJMbGVdtjlEz0Vg2NEtTO1yDsGiVEjydk9aq9ThpB+B3JpYDQU2TDKpNckHpMqtsV+RkDcJY+Avk= 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=IkRIiG9O; arc=none smtp.client-ip=209.85.219.43 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-qv1-f43.google.com with SMTP id 6a1803df08f44-6861538916cso3046266d6.3 for ; Wed, 07 Feb 2024 05:08:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311294; x=1707916094; 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=mpquoA6MMqGx6uzsKq9/tx8DFlYrpZmyLYlIeMpPzbg=; b=IkRIiG9OlOVH/oUKl/0rl5H8HbQAPiGuNe7sRJf85FBIxec0eMEuKvUdBZTVEbXi1M 1+dZgb0S0qHIFEbzOoNxlBsuYH899CCR0HX+IC6Hv/fEL5IBraOhpamRYaBEzoBTCA2g 55sWP5Hn+KJ2K4oasW8mVoPctMzyJHVkGVSesQ7QNLRuFVLdhDwsjDULe59FOh9SqJyB t5/norTzULZV0mRDyxPKPTHO9J+FyFxR434NDK2uJLZbbc1Vx6RbqIbeZ75EN2B62E+v Tm402oSTbB96fgM5cFlXbNu1oX1mI981tvo2qdQnLT24A8RwkqQd+YoKOYgJr1aLkmfI rJLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311294; x=1707916094; 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=mpquoA6MMqGx6uzsKq9/tx8DFlYrpZmyLYlIeMpPzbg=; b=JjG1q5bwgjdPXL7t9uS7+fJJo2REp2h8LetMMz+3M+nKhW+x3Rj4xJtKVRkry3AtFN gz4aB0caWTWJeMd5a0iJe9cs0CwVqYtHtRaTamiBIbHlD7N5W9T0gz3I2ZIuPXZJMuCH N2Ayiuyv5Qu7Xts4TPbn99IAYlfYd9kX5o052qg1fpnPwm5BSNyJ3hIkU3SIYm1ASRAK OdaY1D8uCXz2Z3jtjOqn1tBbf7pyWOSxMG7laOo0cglV/HeZBTfqCV/gczW2YLnJXTdx IpwbD1K6cKn9aQID/C7yC0U0wu3YIUy8ojUkjE6V1dsghGErXGeOX+7IC73VnQXXGLKk aTgA== X-Gm-Message-State: AOJu0YyO3e2/JrAwGniuMfNmIp7XZcAJ2eHGQljBreeQ08YXo0YaQdqx FpPLYuH3lCR5E88kqvzxHO4D1aKxKju0yr9l4MOVSKQg/zMAw6sYWW8hvQm/mJs= X-Received: by 2002:a0c:f0cb:0:b0:68c:5cd9:8d85 with SMTP id d11-20020a0cf0cb000000b0068c5cd98d85mr4664556qvl.63.1707311294681; Wed, 07 Feb 2024 05:08:14 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWxdVaeLgth/oeTT1wHYtm/ZmyM3Ph8btp3EFM3P+U/2c6BCh3KrK8xF1Wph/GVd5NYOLWKUEqzLFKBj0R3ZFewrlkdBROJbHlqlvn/5nI0EsrgflXifcXA6cuGjWoBzykJyPujPHTf+OPSqbsXCAFWDaVI+8qTwNGQx8WX9HczFa7PlMXC0YkF0Zgoz+jbGggoPInmgvS0ls0NjmDosS46Eg6qb0OGpNlD3RLWxmDcuoRDhaa1KqUPtJWTFvkPDcFSOmloBHLUCh4V+zlYOs6t+jiXSy4imhyC31T3T/TizsPLvFLlkipe1ivZdw/NcnfaDLHCTUc7bR9U/pKk7ivMxYO/Ng4Fjo7HMioA6W7u8ubIE45sFTBTaqsoBYxwNzA7MAs2yC2gha3RXpz+sg+zYieJNMDSKAiE5VNribSo4lB9H0K8VxeWn3ucOF/73VIHw6fn5jroY1c1NavORiVa0sQr20JbF9pGODsE3OUA7nGDEf635xTGp8yVsJ1gC20R3Mwwh4rx8Q== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.08.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:14 -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 v5 5/9] watchdog: rzg2l_wdt: Remove reset de-assert from probe Date: Wed, 7 Feb 2024 15:07:41 +0200 Message-Id: <20240207130745.1783198-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790423843386038028 X-GMAIL-MSGID: 1790423843386038028 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 v5: - update patch title Changes in v4: - none 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 Wed Feb 7 13:07: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: 198353 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp117293dyd; Thu, 8 Feb 2024 04:09:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPevEF32QGbxCWKHtSlS63wZyrF6d6QqsOU5yeh9t52fDa2WRsPIH92P1/LbnSbcdZsbQUPslVLNbd9JkjrCVE04ufAA== X-Google-Smtp-Source: AGHT+IG/DUQZPAdUmiqJdIFtXiW1Py7+zuBw+Leq9XtkDeNwraIXyeNNz6yr6CcWiDfEyTTxVv+v X-Received: by 2002:a05:6358:e48c:b0:176:5c73:393b with SMTP id by12-20020a056358e48c00b001765c73393bmr5537891rwb.18.1707394145946; Thu, 08 Feb 2024 04:09:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707394145; cv=pass; d=google.com; s=arc-20160816; b=FymGXvJ6LugXPl/ud/rTtqxx8gnUiIZHMqtMhhQCmubNT7p4rP8y3MS3Z/qUsFuJpL v/Z60+6pJdx8ftLFFP61sKyi9lBLs0jLfclv9lsrJ2CKuEjRCfG38Ok1C5e2Ka3AULwp gIUgPQPkp62ZaDLELSOETR4bHkHsUQEukvwuIYTJx91FESRlYs79dlZKLcU+NvY4JpxV 44P6qLiykDkkqO9Q0uWZj9NrioMLJlK9dLHaWYZDVtYT5veUatVJIu2axVzzRkNc0n2f tTPDeGXzezIOFzp5DVpEeu0CTlzpA4XKgpFFP73q6T9XNWe2KrOd+lg2kyN6hzzipJxv YR+A== 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=HIX4JII7//m3ujlODU2g6bbKkBor3h7MnzjAzhCkf0M=; fh=z2sPau1o+Xg2d7xtRrbzDrIaYAhzLRVhaZnbwVMGYUQ=; b=NFmacvnz1IkO12KCf9x4vpQpyWThDxAfzkG4UZ5VHWrb1yajwIoo0EjmdzYfWedk7A cBvAuL6P5jPgM+IvyId+2+qBBPSrFI+JPFwzv8eudM+DSS+/xTi1qV4x2zzqzo4biPwg o8RT/Ab/IkFCy5vGU9c4aq3/UZ8lq3oyI9RCueMBMhgkERTuew9RxG52/Nr9x6j9NMrm 8qc7g//DCw/BsEphzIJZVHOo378JZ0kzPYANr+mZUvVkdAciqgfqZaVwvaBPt6T74Jrm PG/6sfyaUGHWap/COjju45/OV8CkiV177nZAaRtc66wpdy3Y/q13qbZtxph6e2ptCYST qvzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=hIR+Jquk; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56515-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56515-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCX6y4JHJbK3PdPfTqZz02WlfR8uvt6N/G0vH4GjjdW5PhfizAwfJQo8Zk2pnllAQVhpRQ8R4Q0DwKSdrEFIAmFrK1ReLQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bn24-20020a056a02031800b005dc359d7e93si1910630pgb.806.2024.02.08.04.09.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:09:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56515-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=hIR+Jquk; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56515-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56515-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 E44E128BFAA for ; Wed, 7 Feb 2024 13:09:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49AF37E564; Wed, 7 Feb 2024 13:08:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="hIR+Jquk" Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 829F27C082 for ; Wed, 7 Feb 2024 13:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311301; cv=none; b=IdGeuSrWNoSujI9dfp3NrRa+CfK8YhHvMEP4gJJ/cQzbd6hd/TV1ame00AyvCBY+DMJjJo5eOsuzAwjjZ9jdM8mXX0D4VmiBBbtE79DovR5KwJZr4vvjUVNTd+YsDP5SNYWpcbzTXzByapFmatcAOplcu1SObNQkw/IRfukXlww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311301; c=relaxed/simple; bh=9wS2DKxIpXZhnyOIVOsE8hyO2NTVWLU6eAkpl9TOTpM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=a+xNm+0Ls0c13Wfj0hcdIDINwPQbFTCTb77AJhuOajdCTj4H6v1BHQowYXB43uU62NnmyFvnSWPm2Y9cwB0+RdXsoBU1oHiIqZKCipRwXbiVdrIaYWKtMPKqXOGytuT71wSm1vddGfg09r2i6yRyp2DoxaLpiOSiigLlHl9birE= 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=hIR+Jquk; arc=none smtp.client-ip=209.85.219.49 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-qv1-f49.google.com with SMTP id 6a1803df08f44-68009cb4669so2667716d6.1 for ; Wed, 07 Feb 2024 05:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311298; x=1707916098; 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=HIX4JII7//m3ujlODU2g6bbKkBor3h7MnzjAzhCkf0M=; b=hIR+JqukmlM1F+MW/mWPROlIJ6qkgHNmXeLnBL2xc71t1roP3w1XNrpSvK9boQ0TH3 O1TbuiHBzYoNth621jFbNlGvs6+Lx/AcsBMmfDmUUbB+VKq8TrMR223H6ZqyxO7TEPW5 pubvLP0+f8kLz37mfpeGs9D8M4bHvNdW5EaBgAIc+VnnK8magnwd9QLavvAFiR4mNKTT c3VmdGpSZVZINW8tWHOIXWrxcizo0L8iviBTY1YCLv+7qcHM5ooD/BjdqJXSQx5mL0MB rJIj5MlnCZiKL9lqO+aRN2vDwuK6G3oF19n5AkMlRqoKRbQqqHXBRi7UGhesogEkjcpz hxgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311298; x=1707916098; 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=HIX4JII7//m3ujlODU2g6bbKkBor3h7MnzjAzhCkf0M=; b=NJqJO07/ecNoDMu7h/JjlPLLeuKmLwp6801zr8N3e+C/MI+q9roZmyGaAKZOIu3ccg ILPQbYeuOOanMj4cDXf2vlv+gSaTZ6spJ6DExQoD9y/nan1NXOAtWCXD+PfkP8RNKz6A tzhxjOniGclhJMfsrUEtqKBqdtDQv8vkSRPZkncft4T/4AOB4W6bKaMe6yeehgtLOeWe SM7ECuBNz5tgad0zTdXTY3UHjQ+X6SLNJJpDBcigipFOmckzdcfokSty0oSh7RQ2Xvev GlNtSNxjv4m8JcVxa6WB4qJV8xEcFxON42h2WAFCXlWGseyoKcF6Za81qIQ8ayZpARtn 8mdw== X-Gm-Message-State: AOJu0YzOola7q36B+DV44psqBkxHs9MHWFp1PrZKH++0+oJas9j35jIM s5Cd1/MmappqEecpxKKIc5FeFI+jXdqGbNJwqi1R+NPVLIQz8xXzgFYPC4kN6Ks= X-Received: by 2002:a05:6214:20ea:b0:68c:9109:b5e2 with SMTP id 10-20020a05621420ea00b0068c9109b5e2mr5782448qvk.30.1707311298353; Wed, 07 Feb 2024 05:08:18 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV6ptxpV1OEftg89HCU//c0Yxt5d4zmgA0bWR5RZrL3VW0RJQXzal09gnKPvPQ/w6iHcH9Ib7xN6djFzSkhaE5vY7RU5L6VGGVkGvucos/RLQItJlGmaIF33B3CCpaoElVdtvRQUFxGFnwHUP/EloH6NS1BZDFaY5ze9MYMj7mZfkgyjgQ6HMcPdbkzLXuDLiBWUojJuaAHGQFLl7TDBtW/VerIBTuouCkhO4X9GdL2BaHsmBwD1W1FEvwiDz4eBFpta3edICWM/fjZTqeBWUrwqukZ6mbSL0V2CFYKzGSr7zUovd+pCG0BPP2D674DeZxa/5BCjH33TwyjGQVTfbua99D/CJ/73ZjQdKjRVji/EdnhaZMXrzWx9IVn+zmDJvdUhcImc3n8wx91kGdsCnZLgC0Saa7BBYwtfYlz+elux3iSNlKeCqv0nwddZEqha0BfQLURE4lScw9qWuX4KXQII9INiRSMZ4/K/S6TKYyaGkPXynOc2fwMGoQjSWw4cNmOAcrZcwEYTQ== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:17 -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 v5 6/9] watchdog: rzg2l_wdt: Remove comparison with zero Date: Wed, 7 Feb 2024 15:07:42 +0200 Message-Id: <20240207130745.1783198-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790332523841766278 X-GMAIL-MSGID: 1790332523841766278 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 v5: - none Changes in v4: - none 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 Wed Feb 7 13:07: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: 198363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp128550dyd; Thu, 8 Feb 2024 04:29:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUPposPU0isV80qrIKYn5OFQbMeHaURy2A+v5Mj3vKK6YC0lO0/yZtTPkwrlBkjY4yGktlpq85K8nsjyCOi2LPLpqe/sA== X-Google-Smtp-Source: AGHT+IEOOjjbx1ulyF4E1Ll3dYmP/KyKq+NR6/rA7iXh4Rbfub9U6h4IFyFfjZFRCz+0Er3UF35P X-Received: by 2002:a05:6a00:23c5:b0:6e0:7249:3772 with SMTP id g5-20020a056a0023c500b006e072493772mr3355817pfc.14.1707395392160; Thu, 08 Feb 2024 04:29:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707395392; cv=pass; d=google.com; s=arc-20160816; b=tynRwaXPHpY0vugN2jlBBgVT2f88yNfj67sUTVMbMn5RhMN29Dq8SP921R9pMqLIoX fQtj6FDGv+LxONAnV9RXkhRxpQPrF9iqtHVdQDsU8rOkh1Y0fq0YTYpIkmAdmcpux/w0 MXaeE7K6Xehf5PoAS1sbavq3ed4K91VbrVzKR1Bvr8zYcCXc+zJMaXOD0UkePkchJ+vr F80joumUscOIki9Rz1GFvx4xvNBercPtkfVAavC1/4kOk9fIhaOY1H/e2oxiIos+9ePi iv5ty4PD7xHn2HGMFfCuZdtN3KbWi7tzpeA8dIGYUjNpa6+75GmZl9MWYZVw9cZyDFD2 rcXA== 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=DdZmyBQABHXS5RYhtmrbY7TulTRRnEOQvfA6Wg9RTq0=; fh=E0j4GomQ+EoqjEQyEGGgv8BOCODqW05v7nSiQHSTQRg=; b=Tvz8tX4urqsZy+oCMmEZ7IU+YS2ptO8cX4VkBm5sZ9pSwxIuX7IF0iBZ6Zw0d1OZuT aUtiYsSUt9GXog2H5nleV/BlxI9uCMODAE0nDLZ7gt98The6q2W+ut2FV3aVa3iMUr00 nvChF90sHUhwN1d4Rki6Ra2HtWkWUJHydjPFhuO55TXiugndQGo2EewC6BaJ53kcz9Pf FwEdvjJyaV2pQ18jTjL2QwrsTZ0Xusjq1HBhi2k2TYQDgDIG1mEitrZAwWkSkOJnQNmH GPsPxPFcz3Ca0tCREUzhUaELilp1vkJ/5/xgfATiwXOFdy8IK5GhSp9llq3WARWKuWV4 fY6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=euSYdHtG; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56516-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56516-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUsUaUK8TKTL/Cpj1G/voTIFR2ITnKHsYEgQywyBAHoeSfZ9y6f3ZtiuSMuE5eTlCrl6bVwHacHmp2C+fOBMyxgDH3BjQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b126-20020a62cf84000000b006e04f0080f9si3525022pfg.405.2024.02.08.04.29.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:29:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56516-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=euSYdHtG; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56516-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56516-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 431A228D0DD for ; Wed, 7 Feb 2024 13:10:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42EFE77632; Wed, 7 Feb 2024 13:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="euSYdHtG" Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.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 151E47E111 for ; Wed, 7 Feb 2024 13:08:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311304; cv=none; b=GIV4OF10PfTNj5K/OEiA81sUCiKOfIZ4xsDQL86p6c8P2UGifo0EjJ+vV3pcashrEmPxScmsU9qQsg1RqAJMuoKmQ1iSS9bcEffuF36wM0zxmy0pMoZYHLHJECl86RUXy/sATDN5RIGF1om7G1YtYrot2tto7I1XPdqx2QpC2dE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311304; c=relaxed/simple; bh=VjRgEzn+RWBPQdaD+8b4HRFQviXjhD/e8LrJBJoKCQY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hsbeyVtRCOe+B6ZAYVeYeheK8yBAOnv1q+AqQZA9fL0Y2CzfQPcZbZHLPObinjHVt7orh1+U7BW0IXm74Hqr7q38ey4EFAVe9g/xBSBoRU9AfQ98hh/+Ar0j7uR6jMP/55O7E6Akgk2jnP6jo7zA09C7h7gyvWiRLSk1l+O7R20= 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=euSYdHtG; arc=none smtp.client-ip=209.85.210.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-ot1-f52.google.com with SMTP id 46e09a7af769-6e1226b30ffso298435a34.0 for ; Wed, 07 Feb 2024 05:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311302; x=1707916102; 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=DdZmyBQABHXS5RYhtmrbY7TulTRRnEOQvfA6Wg9RTq0=; b=euSYdHtGo2TMd2aMAJ0C8J6FSy72tc/O0mnWWDyEr49OO4Di6W+rpqWxQuqx5NUkUN 0T3Mrmbfi5tE+JFd7WEiieq/B9pQC18MQA6WqmUBVUEWIabIb4iLp11Gl8uip7QXFIMF 0HHIxScxgPcCnavtAdov7JQ2oXnhQjPniF0MAnaJwQaEr4oUoVoUf74MkBt1NebcnnLy alv+tiIVl5hN097oEXPDZL/G+NlpPJVwy/4SV+AL6dwL9lLBhK70Ajs2kx6ZNgmeC8/r vYag9kX9lMeeOGO7uzqio3R+F62ExlA17UtM6adZau+g2JYVVCpV5uVsNy+Jp+42FFno CnLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311302; x=1707916102; 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=DdZmyBQABHXS5RYhtmrbY7TulTRRnEOQvfA6Wg9RTq0=; b=HRgG/9IvzEKpPcXJU8JMqeMaWtjQCZwE7uD+42fR1JaO0wMbqanWK34CUqtPwE/BTA fiCYj37zWtnv9dCkHw9wmrrxvjO8B3DNrVADXUaEKdiFITXSp4pE58V+bQqYCAkG94dp 4kybrFPSyBovb39yg5gvsrXV3T6cqB6OIQ51z5wsteYa2WxQFtzVOdoJdpR695NwgL9d odGVYSzlI+xQW9d5tlZNT6j/41SS2+cUpdgxIzOSZ/ssSNxOngz7t2qt2VutlzdnUDW0 cBY701wIy++z5nLqUzaP4/FT1Oy07PRqLFx8/L2kQ8m+wtT9V+iFuaaPmRiusMmdm+cm lC8A== X-Gm-Message-State: AOJu0YxWWHyBTwwpV8M8vp8fI0l/oK22DyXhoHuwEP+DwfP+UDTRALrn Ir+cn2wAev1o7ramh2XA3crFcMspmBsApXTclEyYzVbJ9mOltRubGuRnA5C41iB3nkhArkj/BbX J X-Received: by 2002:a9d:730d:0:b0:6e0:b1ee:d98f with SMTP id e13-20020a9d730d000000b006e0b1eed98fmr5356348otk.8.1707311302126; Wed, 07 Feb 2024 05:08:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXmPYgG5IXLGv+c46earNTcKmwx81v47nDgjJJ0ia25XOsuHzDieGDZELb8ZeIr2p2i5h+FSvnLYyBPsiTfx/RKwo9YR8Y7haz3wsHJq0Qc9w29NHyarGib4wqy3osl5wJDntkZpkXznUl+2ZR2uAjpFgMBySzI7Mo99bXbl3iUPyT0ybyxxhvBxzT++T4v3tcDTE7O3E7d9b5XBT5rWq9p792iHYJeUUYfMFTrDxDn43Lu2JhXVGIe4GFBgkSBrNTQdMiHMckK2yEWcoBU7OuUuzpUfhrqr3zWLj3sgMECgY2tVleJN48pJGJGhEmgtokY2eOpqFRrXwYXFclp0U1DGwgVRpR/rviQQIJPqB0R1/bHkbW+291gXGiTfkINLf/qrb/3t9YQG4McbIgP4auf6ruC8+0VrkHpLingg4auYBGb/dlS6NxoB4nOjFgLqevxrMUaqJK6r6BUhq4NS6HGk+mu7dtY8LHhx0RdKo2ct5IFDkIPnWjzGe9RgzGCqPdfxiOu5IYNLA== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:21 -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 v5 7/9] watchdog: rzg2l_wdt: Rely on the reset driver for doing proper reset Date: Wed, 7 Feb 2024 15:07:43 +0200 Message-Id: <20240207130745.1783198-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790333830866611228 X-GMAIL-MSGID: 1790333830866611228 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 Reviewed-by: Philipp Zabel --- Changes in v5: - none Changes in v4: - collected tag 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 Wed Feb 7 13:07: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: 198375 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp132545dyd; Thu, 8 Feb 2024 04:36:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVetPsTuIyepae3/DM+D76iX8LVOC2cNgpPAYqidd9+1ayXjeuuzTfq5tBKi4jpMLMWqmhfdV0ACeDfXWgUKyyHde98nw== X-Google-Smtp-Source: AGHT+IEf4hOc0pzk/2iSWjvxUuU2HaYb9KCKCuN74gkIa/Vrdx0jsXTiKqsM7MagtGmSzSQwIZBG X-Received: by 2002:a17:906:b208:b0:a3a:779a:78a6 with SMTP id p8-20020a170906b20800b00a3a779a78a6mr1232243ejz.22.1707395798933; Thu, 08 Feb 2024 04:36:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707395798; cv=pass; d=google.com; s=arc-20160816; b=kubmjHZQekIxyGz3TZMMdeMTnLcPT8JoPg80gOTf/crF4Gzfi2uIYmfZamjVJOKl5B fAMmQJTUWpAkfc2yRtTpkIENw7YsaM4+uQH4kMn6dAvZgjyCavbSTY5rBK+HGJNwSfti g4ZSAnQr5D4ca3YG06kIb6GP0dkYrX5rbfXgpDEyJGktgLya62J7J+vayziVKsbWfUAq ibuvv9/S4B01NNJDyEaH9/0OjVHiPaHjdCAe3zy6wJRsdxuam1I0htPK9GmMv/2g5uFx Xe5p3a7YLEwotmlcOf0Giint60EEOiFvJpc9XzqF8sKWt/Ad6g8O0lxjCC/SFvzLJlq8 pVtQ== 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=XJ9VMSq8dCJ7LcLYsUSqAogT7VEVHvmzpU/dJCFCZP4=; fh=4M5fP64xcu5E7Au8IHtfAu8t0mw/qC5FP3CfP/ethVc=; b=wL111UavvPbVeNe3feI3a1ZSXNRltQuqtCn9FtQO75N/9uu+HG25kwF59LiSTJ30/L GOf3y6shB9SAZNQLkOHNlN2h/PHSho+krQ7uL6XfzQtXAQkQHxFAz/piK5qVu7onykQj Nnbox4xSTv5sqmbffvZOgf3KsFhd+CXsYCf2Cnde5oDP4PKqjCEQDupNkUcUXkij2XnV v7dUJWe1sbl1N7h6XLYPXSnDWiQg48vHAbHQaSOQjcCcobTDyBohUXfa0q0CJpzT7/u7 shD8wKg5X8luR8hiZWqdLnaKzORlzEKUcEhYyLNj0lVddU2RtdZH5Nt0Jj+7ZG13vd1B Ujhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="n/hryBJ9"; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56517-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56517-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUkXL0ZDfrilEQiQD9YDX3RtDkHwtetvlXWnrJnnr0skSrPPUVQelQGKHEVk6ma4IupC3ca8FVcC7RApp0zQrdYSZxeUQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m21-20020a1709066d1500b00a3bbf7245a4si153250ejr.599.2024.02.08.04.36.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:36:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56517-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="n/hryBJ9"; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56517-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56517-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 553001F26CDA for ; Wed, 7 Feb 2024 13:10:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A262176C71; Wed, 7 Feb 2024 13:08:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="n/hryBJ9" Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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 E9C387762F for ; Wed, 7 Feb 2024 13:08:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311308; cv=none; b=TFgjR4hPRy3YREqAxfDi1gy/gioYTbO6lHUm9Q3XMzagxXH4+I+1/qQU/lw8hZCbsFs/7HFuVj+bMOjg8yiHETopcNEy20AQQKaxXaP2oPPw+P5tGfgoFKRBVvJEQdK1TNa0LGdL7/pTaB+otku8SjKnHVEX2SLmvM8vvKOqHww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311308; c=relaxed/simple; bh=nAmedCW/ZC03QdOpqI4vfMDgm+rkTWV8JGUP9rO0OUQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KpFpQVaSI6KmDS3zTZkPLRhUyJ+CD/hSVMU4Hp5HMhMRHIDZYq4ZZWKwF76EHYtSaOKPUEry8v5OMvaCZSAaFC7HDcKVIkIQqrfwYH15A2uvVoqhL2bHLVLf8vHuyTHHbzyFfX3xGSiT8+8mHpZf3ynw9AZSUvYAiArs1Zy3ALI= 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=n/hryBJ9; arc=none smtp.client-ip=209.85.219.46 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-qv1-f46.google.com with SMTP id 6a1803df08f44-68cc2a389a9so665316d6.1 for ; Wed, 07 Feb 2024 05:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311306; x=1707916106; 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=XJ9VMSq8dCJ7LcLYsUSqAogT7VEVHvmzpU/dJCFCZP4=; b=n/hryBJ9yXntghd+/I20VJfGrJxUtnksFoYhvaBLqXOrCu/yYngN/dAey2uo+PqiQD 7vTuGUhWj3dPmxX+HgU6k+Hlbn8nNE6dbrWfbHNplMz/YlNyi02eWsKBpjQmzRkLike/ M+0khLVe8ohlC12RwtBb45E5KA6fz0UEvdgD04k5KUaU4MxhTiFSpXLdnuOERZTklOw7 0FaEchZNjagg9w1ZkTHo5ggRrBTbLAl92oojwGyzOy9fOqqg+YWZkB1FIUk3F5X9q/u9 FrFsrUGTYokJFhSgJiXu6JY5k2kEZP5GMtzKYTjfGj1YuPDzd1t/8H5B7IvCLDwlxyRP OqXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311306; x=1707916106; 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=XJ9VMSq8dCJ7LcLYsUSqAogT7VEVHvmzpU/dJCFCZP4=; b=FQmTXid7Vmkc9+j5nqTpYq3yQzA7/MXb8FNjcoIiRpvq+PjNzn0h/HKiK/aiXGkJxM s+VinfjaBGTiMdDKUxSCaSaM65D7KWpYG1urvnjG5pmN2/gFi83xKGyGVwb5vImoOdNv eu29n9/IAcYUSDUOMDvcuzfY6CCpiVtGOj2+EH696u6zx864/lSmkUPSxRJOnWEoB4Ex vt1DOKtD+xg0fr9g4W/5Ja884sm4KmR8ZNUVsm2NlV7OtYXsj/RO+9CungDBWnZtKIjN hn/werKc+fgSxcSiZ/O4pQYXQjSqqXuqThGV/z8fwW+B6ynJaHMnzPqeo2Fjv+mjm6/1 4Qpg== X-Forwarded-Encrypted: i=1; AJvYcCXhrj/8+0jjuDAinU06wSErDTEJRN57Prxx28OE7A42EhDuIBGQ675rx8KrJadxEYz90lH43a/zSBZ/Y0Jc1O7refVl1danW37rYmv6 X-Gm-Message-State: AOJu0YxB7FxHPexu2425LR8JfVDXU64XsJzVz++mT4ayaAtJTvhk6g0A y87/TyuKbGWwgYCqF969XkfUKzJlP88SkX+4Ukp+jm2RBnycQbzvPhPmvHSL1mP5O4pUNJzzmPJ B X-Received: by 2002:ad4:5fc8:0:b0:68c:b9a8:a41b with SMTP id jq8-20020ad45fc8000000b0068cb9a8a41bmr4622016qvb.6.1707311305856; Wed, 07 Feb 2024 05:08:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWdlQMnNUTAmKLGNAj7w8l6QHQQft3c1TPgl9je2tKKrAWPD8vpg4x5LJWQt1rHgYr1KEE8wdAH7or5V4I55d65V9Sq2BfZCDQDTTM/4AuDKGD2HmGa38u9SWpImRAmX4/aTaEQpNKSMLj1Sl2Q4c3G/7otIU2c8m5c6Sm8nw5T6V04V3w/7KkWcO1PGXoX1ah2GsMCrzp9b8DeGaJQITf9YxP6QlvDVFaZReR+dFFuCMlUZ2Qz3wdPYxA+lYKe9231tPGXt0Pz9TcsG4mYOnexV5BZLEQp70LQ8CzH52ShnCMCT8IF+T8IEGx3ohtBU2mtB0QbJgOBt9yfCnEv0u+s/OdtPWRS2+3zoMZZyLEzaSIWGGPlJV6IQI4kFKFxwfwU2nJ/RBu51GgJnVEgWV9u+ytP+eULjiXMBozEQKtuZAj0IsIH21TXUU5dw+wL/bLWmkhiOXUOJeF8tlgHHTfL9kM71x+ZHBupNgBvYe0htYhtir1fgyEPpaBHuwdPQAC9sFG/7oBakw== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:25 -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 v5 8/9] watchdog: rzg2l_wdt: Add suspend/resume support Date: Wed, 7 Feb 2024 15:07:44 +0200 Message-Id: <20240207130745.1783198-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790334257007071919 X-GMAIL-MSGID: 1790334257007071919 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 v5: - none Changes in v4: - none 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 Wed Feb 7 13:07: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: 197978 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2331255dyb; Wed, 7 Feb 2024 08:04:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2CWRKRoIjhD5+daSnHdN0I4nlJ1mhdMvraaKoZt3oBw25Zo8lzIQvsRPHUiwpLHcm97v1 X-Received: by 2002:a05:6870:46ab:b0:218:d374:9b7b with SMTP id a43-20020a05687046ab00b00218d3749b7bmr6974368oap.38.1707321851721; Wed, 07 Feb 2024 08:04:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707321851; cv=pass; d=google.com; s=arc-20160816; b=qh7k89WBSRNZVfw/HaMjv7s97AD23X+QTKwu8QA32ZvZ3EuiTSajBOJz4cH/Y9ZtFu TTBNAHc+hkaDFEzmlln/tXzRBO71FUCMUJZPGfd7HNuiJC23HiPSdf1FVn1PM/6Yw+hD MIaW+muHltroyOacd4hqqCRDHp1koFonePBUshay6ihM12xEW2K5zwepqLzdXRsLYApq 5HKrtN0HK/SO5IGKceKOp0awjZcIg8F0Qu4MNwnZsustaofY/V6+x/zoYURiFgi8cvuf fBGoK+xjXjm573pVPaE2p84LCnHprwNGbgKk03wDrmBlpjX2S7UWTKSN5fawZc3eRe5p TDQA== 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=gOdegQKiWMRLxYnVG69/8bl7NYnyCDQ503xbXTJ4Mqg=; fh=3pX/XOtmnXJ2gQMoA5syiJCywdbuqDcoYs6L0vqv3Hg=; b=nTNGSulf6PigvjiARm+UZYEugDMvRWOuMmgRutWCpVEMcMA9a52wc7sfKzT+jh+IcX vB/XCuO4k8UIJuelVLUmZ2xaUNR9aNspOoyGnI6py79AgN9cTVByH4B3+NrBQ5lEQUZd p4/TkOsrOW1vm9qD5HuaBAHp+t5QjvcEh5cwu65EDAbfY1xfmWOIdQ1Fg1RTsYIgRUhI 0ab26hvzSqEIo0JHXLGF+bd6wl4eqjG4h1DZPwvaNqMr3PRefEnugxCdfaOs+q0qM5KZ 4cVJG1R4TZ6FTAYgRIIOtOTixIY+ZqcEeqNAdNMMtRs2S/SWxpEaA8mG41FrfzhZT5Bx WZwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=CNoFYJt4; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56518-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56518-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCVjg6zSiy0ymULmWAal4jRq6+gBx0dg98huAhWPsBJXHwut13fqzFHogyfkXFYT6L+T2/mqrizmbHBoTvJ5B2SJXcgz2A== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bi11-20020a056a02024b00b005cf8b7a0629si2038556pgb.663.2024.02.07.08.04.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:04:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56518-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=CNoFYJt4; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56518-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56518-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 53EB8B26DC9 for ; Wed, 7 Feb 2024 13:10:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8501576C73; Wed, 7 Feb 2024 13:08:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="CNoFYJt4" Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (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 0D62B76C9B for ; Wed, 7 Feb 2024 13:08:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311313; cv=none; b=Vroh6BJJfLrDGFeYgVB9Cs2jn1FRi2Qu4pFDDPZzorR9b1sS7vqK/32XGy5zRDx2h8oz2ZoHea1T3WXo83W0l6LfKLV+mmXCJe12m5YN82jU0xUae612VqtgMm08+kmYeJFkKzFn3VXHZ8PUnipPD8sVzN6ewfThp5DpDkPtfo4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311313; c=relaxed/simple; bh=EBT/o5fj1f+aOOhaga/UA54ow99OuFMlbr0SqdGDEkM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JPVEJdvTetMOv8HADvBaRtK9t7dzbFSEK2KWsCKHs4H1iWC0NJ2LrxcXidyE1h/EEYDzEKb53xYUsatsJ9Idq4aCLeYGsseRasfelUCMuYg81RP3tIIMYq/hf9RVaBRGq8XQhz9KMNC3lLPdxf+n/UbhrS7KNwGddEP6s42uTB4= 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=CNoFYJt4; arc=none smtp.client-ip=209.85.219.43 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-qv1-f43.google.com with SMTP id 6a1803df08f44-68ca1db07ceso2944986d6.2 for ; Wed, 07 Feb 2024 05:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311310; x=1707916110; 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=gOdegQKiWMRLxYnVG69/8bl7NYnyCDQ503xbXTJ4Mqg=; b=CNoFYJt4bCXL8yVb8DBhTRHk5+eBLyNcTFpX+TJ3hcBDZZEcPtx83dW8tOebCCWYkK BIW/MESRltd+GgGgfwsxaNbF9WGm3Oj8ZohMUEKjJ/YN6i2sNRI0DqAQ7Ao/e5aOgOcw qbbb/yeznzKvkiF9k/JHL9eYJ+/1P6F3dyDSuWBm0ZMdb97Hjl5tP/1Hfd8ZP/dEPEmm 2QncFfqT66QmVe76HsAljuQzZ6V2zke4pUidISSEtcjessVmZn6E2Lo4l5m0zO1BmDNz 8USDLABv2CMwee/jC8VnvHJ9oQDIXqMun/dkBDz/KlpALBb+39o54czwjvCRFu/9qY83 OSFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311310; x=1707916110; 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=gOdegQKiWMRLxYnVG69/8bl7NYnyCDQ503xbXTJ4Mqg=; b=W05tq6xolChOJhZbNpZVEY3uAQ8BSatjDKkOgSr277fpui4sK2TbSsqiiYOoS3T4+D 5+xl14uhldsuepFB0CQBfNhVbnW1T1g3Yi+S4vRH3FyLZ5YLleRBZPyS72rPV4arbLXG 9ZJsi8zUdNKk5SOyqin3WHO+YrVNboUq+S1qMnz+Sx847mReEBlm4WTXE5ncGYkz5Ovo q5Tk0T5nmIzkybiVRJJ/HPZrm9cbtNr5d40Xc8ZmKueEeu5iObeDAxuFZK0dPO5Mh1mM RWGrojmto/5RiD9XE2HXO3hqv9DdqH9TPJHGJPFoQiQ899onxLsClULOgvePn2MHlQ/1 3RpQ== X-Gm-Message-State: AOJu0YzDFaYcWYdkB3qEd5OxOsVJbBPRiZzo+i5HMwl8Vvu5FK1fGJvU U2ZOcllex39LnUI1U+5xj+xjJIVPqjNZvsiTBii5nyUnPCR04xpbgrVsdYvGJQU= X-Received: by 2002:a05:6214:19ec:b0:681:9ea:b99f with SMTP id q12-20020a05621419ec00b0068109eab99fmr6857265qvc.57.1707311309982; Wed, 07 Feb 2024 05:08:29 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW5ND3WhNKoyXcJyyfmtS++THXmakhK7DoKyn0LS/tQPuo9CPOV+QF4LG87VmNX3hJE9EOmzIEbvE5fV8PV846WsEEXfaxQg/tPeSyi2nWTP17lW6vbJqCs+mMZ9zrkqlZKoREyJfvfH9c5fr4sEZ7Fnhozzb82CPGQ3LwnaWMb2lHUJH3W6eXoQgqN4B8BA6tsOSG5ABuD+ZXCekg8YsFTTpg3bx404YM1UW9Fe/FB/2IoTqyAHJPx7SGwBzn2m2AeyFdZRabfTm+4Z3/MK5Ts7PuMnNtzrtZAAn/7jFgX2VkEDFVlMJnIYRFDn9vwS5tuJk/hRqMGYkPaOkJfFpGCNgO6zl/dv4VhTS2ocKvoozhV39X2FckWZbL6TbGVZutiaFbHexksSOWT6c1ZV1O7FQOElKga7QszClFhC+/hOz/a0PHvzyLUr3+K1rQrgZxKy6TkGtyQqowp/Ir47iA9i4/cKC660bXI7IyjJUbC2BQDmBMf89ICKVmwN20w59G29ZmpeevyDo9BizIU61y23uO8Xj/KsOuTOCC8CK/SCVwMeGU= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:29 -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 v5 9/9] dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support Date: Wed, 7 Feb 2024 15:07:45 +0200 Message-Id: <20240207130745.1783198-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-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: 1790256717789775333 X-GMAIL-MSGID: 1790256717789775333 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 v5: - none Changes in v4: - none 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: