From patchwork Tue Mar 25 07:27:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 876927 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DB59252914; Tue, 25 Mar 2025 07:27:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742887669; cv=none; b=OwtdebNx7xrODF0mpMCdWfCPgCYa4jHh4Cq1E930TJFwhjG0E3MS7Kwbona8eUlu+yU+eC89/k4836Qnb88ofZj1X5hbpVIela2dSW434HFw1sfb1AGrFD+8Tria3r7CknKGIGrp9tMJiKO2y4EazTKGDJuRcT4yZIDBcOVE37s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742887669; c=relaxed/simple; bh=hLmDo0j13wZm0z98fG6esxZQVY5Sso4WiGan9W8ZMVQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r0ATffQ0rq54hRcE3jApkv9mxRNKu59UKA9xSuvmByO3bzsnL1aSBGwthdLZyNfHXf495plhZhr5MAqgEnYQZYenUTywqLieIzH+JkcYZPcyzciFNaSvI1DeJW7cYdK7fwG85N2EqPt+ac1ETkcK14D3bVQ7pB9Cp0bQXzAGFfU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BD3a+5Vh; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BD3a+5Vh" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-54ac9b3ddf6so5252058e87.1; Tue, 25 Mar 2025 00:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742887666; x=1743492466; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=vcWyZIGRZ0V0VnjdnEmGXkiK0tOATgxayTp5UfiuylQ=; b=BD3a+5VhD+UtkrYyY7n3MkauCSsrX0ssg23R5+Qwm9jej3NFL4wTY1cIPvfC+YinN7 TVg9O7MS0S6teKPbX+CQX5wLcabCnOZqfJ3OG/1o0xRvFYlVZbUOk14Jom3izAH0C6wz SSIZDcRdHabNr6CxuGcEvDaT4goH92qqsq4QQ8+jBL1qmnaqI4g/HqiT0p4/wHCR7FXI 2gX5oLzknWuull8xvW+aAvike6tdpz6kLD3smN3jhP8YoftfECn3QAunm9irmD9mYcRz LrNQdfpEg+7c19FxbAnbl0uZDTjLGk90ial9vc47Dtl0LjjH4zW6N2H1jzf24h0uq5MF Zwuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742887666; x=1743492466; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vcWyZIGRZ0V0VnjdnEmGXkiK0tOATgxayTp5UfiuylQ=; b=JU3ZHuPa+/cD3r+H4GjOqCMag9+03MTQ3Ycw8o7dnjSB2SRWeIKeaXxFo+gJrXSJIp aJqDQcg+3dmuSf3e5zeF3+MKtJ2M0BCkezhkjiys6J7qWqEM10DmE0Ist6A9ik7X6UQO pjh/AUCZ0jpXo29qb4590ZrgEAYkMUnDOojIXlU/e1xxH97Oc6ZMYsDVGFI4PivAba+F CniDsBE79IhvUYl+aN8bIQpqi3qyuEP128fmPt4cHNjkgS0iSO1xrICWCCTKJ66s7Nl8 xA3aukDdiGW9nmq3zEoHftT1V4vTWfjDexG77o+EzV5EmQTk4H9pkrnGE0lW1WWi95u3 1xYQ== X-Forwarded-Encrypted: i=1; AJvYcCU4fCnZ8zk4y8MKvEqKhJT6BBliRnMo6AlfSK5foeI+QPGDT/UdZGUFpXNJYd9A+eii/aFIarcbjeC8wqY=@vger.kernel.org X-Gm-Message-State: AOJu0YzyFxYP9yvviLXc3TuYLAoLS4X9DwAUoBBjG2Th1i6kqS6zNZmP 0iQHzgbN9P5LfJ7BHT0601mC1rtTEt5WS6fXWiKsgiUn2Y1R9klr X-Gm-Gg: ASbGncs3I7Yn2ku6y5DWqA5Qr2eS8LuD2hZ0rVooG3en29CRTeAJiz/eXr/6A0r8UKg Auvzv6RVyXwv7aQev0FFLjbAVry48RoTWhrx/9ee/xKkcHTD1ndvQUseg9hitUXIJv3ozEVI9N/ dIPWNH/x3IpYV8st907Ep2t+K9nM3HXoEWpPuSnQbpBX90rWhsN/zlNBF2id6CjQEWVjvqUsMFn UpTIW5TM/xmH1XdcHDfnFzGl4gW4cxfMxR2WSiNego0RqLVjBK7CzpkJu9fVYQ0aTjoJ9RBlX4C oWv+MlzaT5AHBVfJMEeqv73sopDjWyO6j/nJPTp6blusSF/usTaAaY7y+ywzaOUY2qIEdsQM4qs rP9O9Dl4eX8n5 X-Google-Smtp-Source: AGHT+IE7FFiW7JXr57+j+0FJUwzwVCLK8Zkw+G4PGno4kobEjFhr+H/V6N3eF1pDICu0klIW87vKGQ== X-Received: by 2002:a05:651c:4cb:b0:307:deea:f576 with SMTP id 38308e7fff4ca-30d7e2d98e9mr68707721fa.34.1742887665564; Tue, 25 Mar 2025 00:27:45 -0700 (PDT) Received: from [192.168.1.11] (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d89661aa3sm14307621fa.31.2025.03.25.00.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 00:27:43 -0700 (PDT) From: Marcus Folkesson Date: Tue, 25 Mar 2025 08:27:12 +0100 Subject: [PATCH v2 1/4] watchdog: da9052_wdt: add support for nowayout Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250325-da9052-fixes-v2-1-bfac3f07b4a4@gmail.com> References: <20250325-da9052-fixes-v2-0-bfac3f07b4a4@gmail.com> In-Reply-To: <20250325-da9052-fixes-v2-0-bfac3f07b4a4@gmail.com> To: Support Opensource , Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Marcus Folkesson X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1211; i=marcus.folkesson@gmail.com; h=from:subject:message-id; bh=hLmDo0j13wZm0z98fG6esxZQVY5Sso4WiGan9W8ZMVQ=; b=owEBbQKS/ZANAwAIAYiATm9ZXVIyAcsmYgBn4lrVlhf2NzXYQHtZU+bwbmgUO3jYI5SdQimcb 2CLcJ/si6GJAjMEAAEIAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCZ+Ja1QAKCRCIgE5vWV1S MsQiD/9fsuYwvTkMwJ3UuTlfl/hO9bj256odNd6Q+ANeSaPp2FMsfmCZPY4r0QhKHQDghcpwCXO D5t3JiYi3cvWDBYfqvQZiYWy/11NkxACQ2NEgcrH2qQhgpiKme2s8W/dM7XLwuIRK0ZemEeUB2J cn2ayqu9Y2KGUMIZB7rxN6/VGteVFv1Dn/dWSXM3kqCrl7vusIIrmDqNW9jfTV0/7qCpt/sx1NU iookTa2/2TsExPsAnRhZvxkZL1ErI1fmPXL6iYgdHqFnexTfaKlP9WJXNoxjhDlwGkJrI3eM6M0 7/t28pzjP19dQmkzCtJ8pq+jybogicTkeWp9QpDsgy4i4rp+eGWCN3AbJPON1EfWPFxWiqPYYa6 UAvgoPl10ALw+PqeuH9WYLb6j/SS3flce7u+FTj72dTR+m+KDLq1HOf1Vr6gUZBSR3oMANjjvHx s+FPQbSQ+EU/5LTRpNEMz8a1lsYmvGAB/ct088IO4EoS4U73CDIWvAzh8Gro1tmjl0sHiHIn/rG 9ICI3H10uuSzjAtxfD8u7F9gAnSOzc8EOcwei9YarkJLSDZnuwlqNF9N2L2bcUzPOGngedDz8AE hvjEPWhU1q3R9TFE243PjedfJgLE5fRotVPHNWkh390euwzsowIRDZ5DQCZU0p1g6jLX2TMyGdN OGEgRdKZpoKnL9Q== X-Developer-Key: i=marcus.folkesson@gmail.com; a=openpgp; fpr=AB91D46C7E0F6E6FB2AB640EC0FE25D598F6C127 Add nowayout module parameter for not stopping the watchdog when userspae application quits. Signed-off-by: Marcus Folkesson --- drivers/watchdog/da9052_wdt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index 77039f2f0be54273df1666fe40c413b6c89285a1..a8ff1e6a7903f6f139c5bb60d7d92ca39077ee04 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -30,6 +30,12 @@ struct da9052_wdt_data { unsigned long jpast; }; +static bool nowayout = WATCHDOG_NOWAYOUT; +module_param(nowayout, bool, 0); +MODULE_PARM_DESC(nowayout, + "Watchdog cannot be stopped once started (default=" + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + static const struct { u8 reg_val; int time; /* Seconds */ @@ -172,6 +178,7 @@ static int da9052_wdt_probe(struct platform_device *pdev) da9052_wdt->ops = &da9052_wdt_ops; da9052_wdt->parent = dev; watchdog_set_drvdata(da9052_wdt, driver_data); + watchdog_set_nowayout(da9052_wdt, nowayout); if (da9052->fault_log & DA9052_FAULTLOG_TWDERROR) da9052_wdt->bootstatus |= WDIOF_CARDRESET; From patchwork Tue Mar 25 07:27:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 876305 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 00D63253F00; Tue, 25 Mar 2025 07:27:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742887671; cv=none; b=lJGT8gvp5wL0Tj+gfyt6nl0XWhCI1TFArGJ08VeDkByJ5XiAj+n08xQ2FYV7thjahNUd1Xq5YvINmJHCLuEiZE4x9JFVbE0FM2V9lwyPYg42AzSloMOUUkyeIMff2YCFCy06HBt2Cs8dO119mxcQ/r7UGHjiwNIQI8/AqMHVQSw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742887671; c=relaxed/simple; bh=6Bw7Z5pqrFp4Dfdtst6FATAGsH9+hZ6V94NiRFJRyrI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HIn72108GMJLAN7kVecTZYj2zNoq7BfkWyc/exQ8Iak4Ey+t4hAtRRq6rkbnFHz1jBXnSRmTkqDMsZuluRSpWiwjykAnNQzCFmgtqslH8x/GZ9TmyqVI9tsbuZ6tcFv4B6fsx6IOEwkWQ+F3zYop6vATC1jWdWobrIGkE7QaRVw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PZgH5s8P; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PZgH5s8P" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-30c05fd126cso46895451fa.3; Tue, 25 Mar 2025 00:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742887668; x=1743492468; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NSl8xyKeQ17PRGrc6DnGNwaWt4mlGOqzwR8Cl5P9HxU=; b=PZgH5s8Pnl9nD0PuX9y0lQI+Q97/NL1ufxY65xM5QYDstU7ATBpJQvVMsWT+uU47ZL koZxLADeL7EUOshb7sAb23hdyrX0MOvo4q5S7UW2jo5hVolMh0k5Yf5kHp44qpGGFWf6 fZCkXlaVo7HyrPLOFc7CKCesVnUOjJN9de0YaxLFrY3SyozaigcYLwHPRX+zYeUn6vqM N76cTEjVirAuOv9KEifwdxbsfp+afC3RIbEi/IgdrR182cqhdsNOjLGnVA36bZOpZhnD Niwt8qPyWz374EmbiZ23HXREHhuYCBP5Ku3MkUj1d1QF8e4Uuhw117uft/xF8UtDe2ww YFMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742887668; x=1743492468; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NSl8xyKeQ17PRGrc6DnGNwaWt4mlGOqzwR8Cl5P9HxU=; b=mi7dG9vv5A37/gi01Xgs/VZcOp7+nwjLj4RMs+2e3QKM4VlI9ac0aUbpz6xv/6Odr3 dRMm77A1NzS5pG3dlL6OU/WzqF+cQ2lCWYB6wJh1sqHbzFb+SNc1QYKVhIrH60vrT/hS EpeOZvYui4Z8oxGUOc1/oQkwr07PNxdMRqzHiZMowuW++e3ViGqhWsA5T+6OdBxceyvJ Upac3kjNNQr/Hy9sTDoTitNVDJSqurXxpHhjOVGV/NjdH8M0Jjp/ROG/cU4y+BGk63An wlrdYMX3OR1FqqilNf/cThmaB+Uog+lSfhbQr7FOykYYkHMoRT9rHcYX6KS0zlOjt14A urOg== X-Forwarded-Encrypted: i=1; AJvYcCXeovYDcykXsfvJFCG7QolrqJdZKsNpKVUFKFHAF9DKFLi04uPHw9avpdnakWClavv7CU5Le/Hs6LUG8QM=@vger.kernel.org X-Gm-Message-State: AOJu0YwU43kpN1Jh3nScg3wNYOl7JT0b/b0BPhDray8FhZI3IQf6YFTS 8udK4vseKrJIXQrtSmT+qD8Iqt1JvrC4WFdcJs3UgRxMnDEhPmZ8 X-Gm-Gg: ASbGnctqJ+eUyEPGZjTkwGpeSD1oe8nnJr+yHQoVP693j/KRlmqME9UL+nfyGAEnm7m 88ea4ULAUStodlcPAyE4HWIjtiNqEUD2PS8Vj246D1/zf81G3FNe67t8De8UyXyOxSJtypOu1A1 MiwqfCBkSHfaW66q8Lt2s6lH+QrlNaXNomNmRKPe/A3mzppzBJlUNPbeGK/JJiAmRhp3DTVbRIy wOovrDMNg6Qb9+lcw1tt0KzsYcGXFq50KE8uEAU+Zb1cxCgkP2PyfDsrs9dN0FKV1ocpXdwtRcW sGqdfnceGALzjOb/rXL4BvuGFgAzHljJsdonkRlUJiIanfh1O0JCXozNwCJOXWTeQl/vJCQjJd8 ielNFbWlESiyN X-Google-Smtp-Source: AGHT+IE3p5wibeZS7r5Wizd4SZ156tClVZzLur1TaWLIzUUNXeGnIutFxr1qbtaOfXc0rLDoD5SkBA== X-Received: by 2002:a05:651c:19a4:b0:30b:bfca:bbf2 with SMTP id 38308e7fff4ca-30d7e2011f6mr61912521fa.7.1742887667802; Tue, 25 Mar 2025 00:27:47 -0700 (PDT) Received: from [192.168.1.11] (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d89661aa3sm14307621fa.31.2025.03.25.00.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 00:27:46 -0700 (PDT) From: Marcus Folkesson Date: Tue, 25 Mar 2025 08:27:13 +0100 Subject: [PATCH v2 2/4] watchdog: da9052_wdt: use timeout value from external inputs Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250325-da9052-fixes-v2-2-bfac3f07b4a4@gmail.com> References: <20250325-da9052-fixes-v2-0-bfac3f07b4a4@gmail.com> In-Reply-To: <20250325-da9052-fixes-v2-0-bfac3f07b4a4@gmail.com> To: Support Opensource , Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Marcus Folkesson X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1425; i=marcus.folkesson@gmail.com; h=from:subject:message-id; bh=6Bw7Z5pqrFp4Dfdtst6FATAGsH9+hZ6V94NiRFJRyrI=; b=owEBbQKS/ZANAwAIAYiATm9ZXVIyAcsmYgBn4lraMFxEgiW1s3jnQa7Kc2/ulfbeb7Q37s810 NTFa61MhWOJAjMEAAEIAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCZ+Ja2gAKCRCIgE5vWV1S Mhd4D/9g9R8uu7w+6pBQhdPN630SyRAHYQkbranlv119aQtfdlLzNQMdPtNyCky58YPOmogG8uE Y6v4NW1OZlGsDr6sv4c4EqIEq07X9toqFYo3jKUL9KLwxauu/Av4cqKUeU/qNBTuGG/YmqbExTm yuWbZ9B0+HawLZea7Kk1IVD2IEmk7v5QjvKU9d9Esv91oT1NkQr/8SOwCxd3NXrU6Xs+ObA5Fkb FE2VspwJQwG/feNw1zf9X8tGNia/W8G+iImatKmORhd52l5P52zwsrkumNMJ2cOiIegvOh0isE6 i+hsH0tmnr/1D1JxdPrML6Ovzkda8OTjedZyZEA38h3/JLWxfJ0xLcY9F+vtvstLhzSzZYxLiQx KRf5tTQJbXFf1PT9zEW/IrKm9TjOOOF2LIzS4rYOC6Jt4x2Wpso1SVV9A+EUorQS9toE8b+f2Ed qT9KwgNU8DVI762kYz90BAXJNgd7NOK1/WtD41rsziMNUtwceakHU3NJHZLsY8HpBuK221FQrrI tze+Myl2SzXI9aZSoHM+VePjaezrNN/3QlNuUcdj4D/+/oSvZs+Notv5NSOhIOSuVj0hcnyTdX4 omBTM7EZSAHSahdoJf5L9oIPoUNSJWahCtyL2m5ZJH6YRTVlTGZ+alMUihwtJFZ8Q6s4cBNzTEP UMxN9YPrFfbzHuA== X-Developer-Key: i=marcus.folkesson@gmail.com; a=openpgp; fpr=AB91D46C7E0F6E6FB2AB640EC0FE25D598F6C127 Introduce the `timeout` module parameter and pass it to watchdog_init_timeout(). If the parameter is not set or contains an invalid value, fallback on the `timeout-secs` devicetree property value. If none of the above is valid, go for the old default value. Signed-off-by: Marcus Folkesson --- drivers/watchdog/da9052_wdt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index a8ff1e6a7903f6f139c5bb60d7d92ca39077ee04..fa9078d4c136a52f1193768fe93dc04189519679 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -36,6 +36,12 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +static int timeout; +module_param(timeout, int, 0); +MODULE_PARM_DESC(timeout, + "Watchdog timeout in seconds. (default = " + __MODULE_STRING(WDT_DEFAULT_TIMEOUT) ")"); + static const struct { u8 reg_val; int time; /* Seconds */ @@ -178,6 +184,7 @@ static int da9052_wdt_probe(struct platform_device *pdev) da9052_wdt->ops = &da9052_wdt_ops; da9052_wdt->parent = dev; watchdog_set_drvdata(da9052_wdt, driver_data); + watchdog_init_timeout(da9052_wdt, timeout, dev); watchdog_set_nowayout(da9052_wdt, nowayout); if (da9052->fault_log & DA9052_FAULTLOG_TWDERROR) From patchwork Tue Mar 25 07:27:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 876926 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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 31DD4254843; Tue, 25 Mar 2025 07:27:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742887674; cv=none; b=PoyT5iIW7deZdDzMxa6usBk3hudKorRA89YfFP9XmuS0GqJErlU0rZb+egckntqC+vkoKSVySLaGamXuTuvgFU7ZM0yavoJmS5wcQnKS15cTKCHMBayBP1ds8+J9f7OkFOfiUO95rfuIosvsIOQburYlYAh8BR2QTTLSrJrWU5Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742887674; c=relaxed/simple; bh=9/EAEv5asPM55GhtBdL4KSWn8n4jP3zQOqSm7mRMI+A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iN7YMIPqxdsZCbwwLevvHt+luYARJ1yb1jhEXw56+XtmtKGzLKhFBYb5v7vNi4Ya9u0o/c1tHrMhnL5e3N+M473+bERj6paE4SUKw+YX7wwAP4KZK10jXC2HmzQzYU+yJBhB0K0mwK2sL/ulWxkJ9i9r360U/SgergUXb32D2rA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jIQYXfpd; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jIQYXfpd" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-30bfb6ab47cso51167441fa.3; Tue, 25 Mar 2025 00:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742887671; x=1743492471; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=6TlubddJC7aKC9kbsNOHXDnaBgqxpRfansLyLGsfqUc=; b=jIQYXfpdvlkCJGqv4WsbQS2hZELCKnN0zagXL8N1sjtlEdQqXhVQQ2YqdcpE7A/AAj xKJ7+stAxZVwi+phxAlvFamn+yScp8cXHmW6x6e5A/kaUp2w6+hyAaG6lowxArGi3GFy a9URVHxFNthxZF91iJI3BfXUmC9Xne9d0y8F0Audjf7/WeYuvqLtYmtkRjRwhDrPdjMN pEj2tzPhdaHKBGzJOHNwEhe4OE5ikQAswsxN9Z2GPqX3CFQ6eMwA+YXhinqhX5KyCQdG qh9ZntiB4Z1SJ3FFnnyHSAKTxp3VATcpzqqyvzsHP9OCQAd7Xg+o58hci5O8KZsm59Sb 74zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742887671; x=1743492471; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6TlubddJC7aKC9kbsNOHXDnaBgqxpRfansLyLGsfqUc=; b=a/NHt6sDMwNnqDobcbuTdoCqigXaOa8adPOmu2oyPxdoBxrjIJbZsXxZxlwr/NbGhl sImuBTnxh1O3JLkd3z9CSXNQTmMNCQCYVtjXpl/abhEPKB47xuPFQ5ssrZkAOnV0QzMC WOYzGDIYjOUcCtzZHdoNUunVlhDuPr1IOqrFqgJly+MmCG0ZZH2f4HB+um/+QBwAeeys y5GagRP9bp6Pxwxu/oUEGAUEpk8Gabq87TMSnMuAQ/8MIxziOm/jrD6lSRzVBw7vyzmb 908kf+ZEPTV/dl+w6xION9hA57YTLNf3mKFwITyIm8l52CgIESOuWeHarIvPdz9PWH3Y zHTQ== X-Forwarded-Encrypted: i=1; AJvYcCXjLoIz1PfirL2G3KjcFqUEQjEdsi3Y/WqOpVEpmnAkb3Cy2seqKReN6/Ovb2HtUC6fLq1S8PlLheaYzW8=@vger.kernel.org X-Gm-Message-State: AOJu0Ywon00wHNcGd6y9iqS+20BOP02cm0mZwNQLedddKBnUzJBjXa1H UU3AYEnPBy0PdqZiGyM1jcN3ko+fCsky2xTFxiYe5p5o1wRYycDO X-Gm-Gg: ASbGncvoPAqmwCxxxBX/2nroyNhnMGZbJUngdEwMd7A8VTrLo+valMPkR0ME7LCsStt CE4Ciou2At2ms00rcq/BJ/Pur7dT2+CUKAYIuNE1AInLYRx9UhQvnQsnLnvTcHXl58llBagabGR /lIq9O6y4OM+p4S6ADU5P0irMhfKWgYmDvPhqM7hdJvJqwtBt/uVGUb7nHYd2kQqWvT0phAyDHo /MbltRHKp4PwOTVEavPG1vnbWMxZ6+DOk5Bp8QSbRy5B6/W1grtkqeidHgvnHYBW/WFZbqBHMZO SfkkWp58b7FZkTiTeJM3IuzE4Xpha15rCi6LIBb3eJ8RKnktqiB4epb4xBNMZDrjNcF7iZEq3qH K6lduOBNRp4bw X-Google-Smtp-Source: AGHT+IHBazGgEbs5nPeu5DJAYLFlO5+O6BeSSpspOCZECa2LWhi/sIsTm67Vr8xk509H6r5UPCBk3A== X-Received: by 2002:a2e:9087:0:b0:30b:f924:357c with SMTP id 38308e7fff4ca-30d7e223dd1mr51735341fa.15.1742887670928; Tue, 25 Mar 2025 00:27:50 -0700 (PDT) Received: from [192.168.1.11] (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d89661aa3sm14307621fa.31.2025.03.25.00.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 00:27:49 -0700 (PDT) From: Marcus Folkesson Date: Tue, 25 Mar 2025 08:27:14 +0100 Subject: [PATCH v2 3/4] watchdog: da9052_wdt: do not disable wdt during probe Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250325-da9052-fixes-v2-3-bfac3f07b4a4@gmail.com> References: <20250325-da9052-fixes-v2-0-bfac3f07b4a4@gmail.com> In-Reply-To: <20250325-da9052-fixes-v2-0-bfac3f07b4a4@gmail.com> To: Support Opensource , Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Marcus Folkesson X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1278; i=marcus.folkesson@gmail.com; h=from:subject:message-id; bh=9/EAEv5asPM55GhtBdL4KSWn8n4jP3zQOqSm7mRMI+A=; b=owEBbQKS/ZANAwAIAYiATm9ZXVIyAcsmYgBn4lrff3yD91KYR28hnH9rV5tLL3ho7A2lBgmoD 9dxNNH7mNaJAjMEAAEIAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCZ+Ja3wAKCRCIgE5vWV1S MldeEADdBLnVAAzhsCbbFyjjV/MOUVwdH1zizw01ypekYaQB3JoEtmMQVlbNIVBF+RhR/KQwsGE Mk7x4g+9S/4AnyiM53xbw7RLTPteLQMxuVcnrgyrjSrpWV+edeCCWMLUnMCnehQNPLBnbbvWhui ihXcS8G78erg1MU++BE4Tf4T9gpBbLvOqVlJw6jJh7UHizLOr/MqQyXjvA8SNSnxy+uCCjAqvA0 NQ0ZzEUcSjFa5m8njcQWwS1OAipoLiJLiSadTnOXK4LD36FMUNlPbTUUleIMH8+mSyP8lOP9y5K kEtE6tX2cusB/tyTbB/EoLmaKOrvm9+EVkcMWfchdQiRh8TqaPpWW7xSIlEqimtYngyJMVKF4qs ZBLFxNGDgDa4ABAE5chtJJ8Inq0GomOO8jYOHc2IuyUlNZuM8QU68GNRMn4SNiqd0rSY035R0kW nKaizA6/IFtG2VYLBn1InjsIkl+2P5DbjuzSiLzru4uQul3e6j7BnIR6YdIhBj5hcU6PkYlCExE LlDBlKTysGIXHHp6l1Omak1oXFb07FPS6Dl0LUllfoOcu2x3IFJzzjaWo7Ds+sbypspaz87aTxM d4/Xd4qIKF54gab2X+xUX4mqR+yns0S7pDIwILB2y6b0shhWQEIYa7UXiVuCENeRdrROqWB9ZbZ YTJg8UQ+ObnFZHA== X-Developer-Key: i=marcus.folkesson@gmail.com; a=openpgp; fpr=AB91D46C7E0F6E6FB2AB640EC0FE25D598F6C127 If the watchog is started by the bootloader, we do not want the watchdog to be disabled. Signed-off-by: Marcus Folkesson --- drivers/watchdog/da9052_wdt.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index fa9078d4c136a52f1193768fe93dc04189519679..b821006fca70480bf3b23a62bded4e66851a537e 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -170,7 +170,6 @@ static int da9052_wdt_probe(struct platform_device *pdev) struct da9052 *da9052 = dev_get_drvdata(dev->parent); struct da9052_wdt_data *driver_data; struct watchdog_device *da9052_wdt; - int ret; driver_data = devm_kzalloc(dev, sizeof(*driver_data), GFP_KERNEL); if (!driver_data) @@ -194,13 +193,6 @@ static int da9052_wdt_probe(struct platform_device *pdev) if (da9052->fault_log & DA9052_FAULTLOG_VDDFAULT) da9052_wdt->bootstatus |= WDIOF_POWERUNDER; - ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, - DA9052_CONTROLD_TWDSCALE, 0); - if (ret < 0) { - dev_err(dev, "Failed to disable watchdog bits, %d\n", ret); - return ret; - } - return devm_watchdog_register_device(dev, &driver_data->wdt); } From patchwork Tue Mar 25 07:27:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 876304 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 EA54C254858; Tue, 25 Mar 2025 07:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742887677; cv=none; b=UTbE0izwhYM2L9wMN19libcX0PkS6V1yKsSFaaBD3UB8nAtRSTl7EYOSJapEUXCXyLODtWiZJihuQTC7NJYpnvIxI+j9ch4/T/AzFmTdioTbkAe/m2ZoID36Tv0URhcrVahH9C4mSnSoQ47zVHCUfs4TzlCKyCT5OBcUaxiaxEk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742887677; c=relaxed/simple; bh=cKLX0CYGXCgbuT+agxT2tRVi4WrqxSVTWlH3Cy35LjM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=daabElaaa9fjvW5wndHKX/JO3gdsRyGGz5VBEFYzPXJZDu3A/+BqoWdvuYyPujFm2odhX9Q63HYnuMwrmdJaoysHPicTow/tOh7bdJ6IaN2+oGcqNZwSja7oNvV78KOrLVvKQrDPLWCrq8r1fEPyl0qBY1Ot8XxUay95XsNZaCs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Uo/iWcXv; arc=none smtp.client-ip=209.85.208.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Uo/iWcXv" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-30c05fd126cso46895871fa.3; Tue, 25 Mar 2025 00:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742887674; x=1743492474; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=OoaaHsdPl+I4arazHsglZMZw2PNB+dtojddpnNQGJNc=; b=Uo/iWcXvBcYr5bJAQAD8dFOjiRO2X85FQ4XupKJJL5qDQ85oMOzPCGRNJsTaOlcycf dVcyQLimGJ7uEdU7oRnfjaODwY0Vyt9nvjVp4vS5j6XmFHOjWOU5xyu5xhZMNT/bwU3j JP3uR0JWrPcHHkgemW02ZJFRsJSJEDugIAjwH4MddvN6knRW0wgMMj79GW8It0WVQQgH yLUVCz9Elnl0vRQcGzZR3VhdvS2M6oXt8KMZVO4VIBPkaplePUef6ngfGwbCA2kQVjFK 6A5HRboghFm9DTRXWKQGxeUJl8n1DTA1u7SVLIiwYGfOnrMZwTfDc2LKzU7PD5KVRoJF s/4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742887674; x=1743492474; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OoaaHsdPl+I4arazHsglZMZw2PNB+dtojddpnNQGJNc=; b=sIycUX8DbPA6rKdl0l1El4PrgH7vdb9kznI4whThEVzPXNEHpLVMR4i9XGBPC67Gsg sOolIptPrewMSSub9Z7+Hi2Evr9UuFWMdUHypVdGkzef6SwlmLmGWSv6c3U+WpTSbZDD t4wI1AtbQKiDIBuzt5dyG9S2HYvrrfiLCbrJXYiM1xhThL2+IWz2hq6T8HzpZmy5cd6s ZrqZH6BN40cRyxtJlcHWhzkH4r5AgP4oCf36Ak+nQ0OkscmsdXL7ATQH6e6nVNhDknGX uzN+VDbS6qfKcH84pZn8NLb0MJoje2fGsknpU6kng8lzIKPh8sD2t5TRpbEuu1pAwETM /Nww== X-Forwarded-Encrypted: i=1; AJvYcCUTjjVpBs7Do2oY/rErUK6yeiwat62iVYocnlbIV0nV8jnMFmYVzeVqAAYPfYecC8lJmcRm+mQfA9f51Zc=@vger.kernel.org X-Gm-Message-State: AOJu0YxwZjiTeix9eGc6tHxyIwpfmyphdXN7ZuZTw65IF+JJTsbNbVMH xp2uaTcbDrXx0r0l0twqTyXWEERcljqccUYDmYsVv2xJdx1M3/Lb X-Gm-Gg: ASbGncvEVYphKROcOK/h0GXSlmIC53NQMqDVWRjOoWyuPopBpRYGfLu154x0itziNRF iok1CKebYfl3XGt/N7sK2V3P7ETgXNmgHEWlwgqsHhokE6dhlNC1axk3s3wGPYQPf7Rlljr74Zn Syi8rzZ05NtBA3el6SGBJIoFLNXHRjMM0lJvP2OBVT993I95D1pLNeasHEDtULEx+hhPYJ1ZhHt aQHdWFD8DC0AXCBoMDXf0rHxbUBkIAL8RCFaSmDRuBba+D39Zj9bUPdLMY/4PvEp1IR3CMEJByw ixMZk8ZVesJ1fZVDxZVaBXIm6gxgGZklkZpf87isTZDlHn6ioUjuPCOlt6i5LKgR/5TOEWiBKYz f8gJAzfozxYg+ X-Google-Smtp-Source: AGHT+IGgr5m8Dk0n55iv1MKqVZzx7TaJS18sRJPfqiAWtlbeZi2/V7bDveGQntwRqXyOlwlFB/yLog== X-Received: by 2002:a2e:bc04:0:b0:30b:cc6a:ffd9 with SMTP id 38308e7fff4ca-30d7e0c0a5bmr57914071fa.0.1742887673905; Tue, 25 Mar 2025 00:27:53 -0700 (PDT) Received: from [192.168.1.11] (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30d89661aa3sm14307621fa.31.2025.03.25.00.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 00:27:52 -0700 (PDT) From: Marcus Folkesson Date: Tue, 25 Mar 2025 08:27:15 +0100 Subject: [PATCH v2 4/4] watchdog: da9052_wdt: respect TWDMIN Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250325-da9052-fixes-v2-4-bfac3f07b4a4@gmail.com> References: <20250325-da9052-fixes-v2-0-bfac3f07b4a4@gmail.com> In-Reply-To: <20250325-da9052-fixes-v2-0-bfac3f07b4a4@gmail.com> To: Support Opensource , Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Marcus Folkesson X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=945; i=marcus.folkesson@gmail.com; h=from:subject:message-id; bh=cKLX0CYGXCgbuT+agxT2tRVi4WrqxSVTWlH3Cy35LjM=; b=owEBbQKS/ZANAwAIAYiATm9ZXVIyAcsmYgBn4lrl9g3pMK7L9AF6+oHJEdEExzLMF+t2lM1CU uLwvAzMYP6JAjMEAAEIAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCZ+Ja5QAKCRCIgE5vWV1S MnBZEACKaQtv8n0h6VX88DQJggE2vCwJGzV5urJti3dMwh5IaAIlU+FibQq6PthuGez4y/xNCHN tXI2fLYtocamSFb0ldO9KQQUvge9v0XzGkRvvt6dGQRcmigQRcxa8z2seuUP5t6HonNrSK6i2mv QqyxoZbs5cTO7vuEvFjYEUcY4hwfFU/KXRS8vWGLuc5trTSM2UATmk2d4jqj0701zPmB4CNUX92 y6hHGgJQ0k0ISekoSBurAV4Kbe+KWT/5iFNGc3bOBKcdWjY+/uUMQkfXCGf4yuKat3XUIikIoa9 Tak2fUW3MF9EMcO2TGbKp2IIdAk4Rks2eLP27PtlwG0muEdLjkXNsNV2+RAMR2k8m3m7ID9v0LP 69DdSj36Tq8kUYwlqGkoyEhcs6d6tRnN3Tnis/7qIjFYnZzz0qFAtuYGsn5YtKp7XMwikXzNV+W Domlh4EOz+oKLsP7eXRiRInqZmw8zfTAgu0ZIeS4ifzkF36cD0C4LXcl0ACI1Ip3rj707YfF4pe DDC+C4jZfywVLIo7688cU/evn2ijkV+gmyN38LcHSOrDtUrhYFgApz83Fy/LBebAuNyKQtfN0AA xIDsfBCLwanC+g2HB638qBQmxHfKrKVuGNOPEWdICdzkrp9HsXXZv8uYhBVKjWBMmv+Rb8ogKE/ mBorJHeYT3unlNw== X-Developer-Key: i=marcus.folkesson@gmail.com; a=openpgp; fpr=AB91D46C7E0F6E6FB2AB640EC0FE25D598F6C127 We have to wait at least the minimium time for the watchdog window (TWDMIN) before writings to the wdt register after the watchdog is activated. Otherwise the chip will assert TWD_ERROR and power down to reset mode. Signed-off-by: Marcus Folkesson --- drivers/watchdog/da9052_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index b821006fca70480bf3b23a62bded4e66851a537e..1e49cbae7eaec3015264dec891032a56f56e36cc 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -179,6 +179,7 @@ static int da9052_wdt_probe(struct platform_device *pdev) da9052_wdt = &driver_data->wdt; da9052_wdt->timeout = DA9052_DEF_TIMEOUT; + da9052_wdt->min_hw_heartbeat_ms = DA9052_TWDMIN; da9052_wdt->info = &da9052_wdt_info; da9052_wdt->ops = &da9052_wdt_ops; da9052_wdt->parent = dev;