Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp517549rdb; Fri, 26 Jan 2024 02:44:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFV/sUp4CNwFsWz+TJoJCsGv1cZ1/GLWTeux3KRwC0NpCAxEkyn1TOu5I4/guixrUTlVv7m X-Received: by 2002:a17:902:bd94:b0:1d7:af2:869c with SMTP id q20-20020a170902bd9400b001d70af2869cmr793304pls.123.1706265896183; Fri, 26 Jan 2024 02:44:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706265896; cv=pass; d=google.com; s=arc-20160816; b=lWftfGoiTtq/cXtBYL+F4mxG1lkJWSDyjGIVlSXJnfl+aSPyu2fO2oC0MAsRMm5VCP 3JCFx6UWbBk3FAIQ9bo9N7Ng6f46YmzXzKBbhyCi595HKOEwIcxc7raH4+WArtmZrdQ9 q/+ZdkKCOP6O+FStXF5b4b9DVsK0Jkb0WKHMhBVtLsyvPzd12l9ceF1qGB71lLQTNFqj 5uK7Qu4wHao3gJHXwi5p6kPcOyaT/PcNLPvdLdGk8iXTPDh8qBllEIqaNkT2A6h1MICP 9LNu/KggeRVXoYt9+sAFahLwLxUX1tOkGc52XF5jwq2ppeguG1Nf3lSVD1NfWe81mhGt GWvw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=ewTLwyANv9bkJgZe1agECghfnILfAveBkd1fZ/yoRfs=; fh=4k/hBd5bniHYlcfGRcGNASfaBL4ptGqyAdLkGSvHCDM=; b=nqmLUE4uNDfkYclF5Izoo0BnJ8TDrZLllLUrOPttucZ0sbtXZO1QQXeym1kzFiiS+K xM4ty+AxJf/MaXlqzSgFKboYug3FqcY9NoXJiH7Tys+VUa2itkKzrKbikbp4As1waC4f hoZWVt7F6DYfGTok4YHgDwgqOSekKTRU/SeGh8PYaWOiSmIw4sWgzjN5r9dKNVIzIH8s ksJkkLGwg/zgnj2rriDio1gyo2wzoNCBcPPUrnPR1V65RhHsr8muA8JQhCrkYVouCOf6 3piijxBFP1DtmEyscTiESsRy1u07Lkxk8eFPW34C6VZKEcBm1QimvBHnRr9EnncdGHFP DbVA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ACZYFugM; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-39963-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jg17-20020a17090326d100b001d8a93ed912si43123plb.177.2024.01.26.02.44.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 02:44:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39963-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ACZYFugM; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-39963-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 9DD96299973 for ; Fri, 26 Jan 2024 10:22:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B671256756; Fri, 26 Jan 2024 09:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ACZYFugM" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.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 41F7B44C8C for ; Fri, 26 Jan 2024 09:57:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706263049; cv=none; b=bu3Rs3GONLzfPLUktNZeS6Is1cZByIQ0CDZPmynhdzVbJijigi9dae/xdHMmA33II++1mKBUYwooDnD7oBE/8Bha/ZtY1pxE2WyCZz22YhOz2rejB8nd/LL2YvmmuSnk0ufuIfIqktMiMv8kXLfgbTLsfzl2RQe0nb8GhJSblx4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706263049; c=relaxed/simple; bh=9X0YCXiCPSl+U1uwYM6fyvbzMxsAt15eysC37h6GhWk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tuZfY03CxKK421rnxN191XBndN44pnW8L6Gv4D8c6l+fbP5fpCoVkyowLLVvfNEhrstUWIh+GSxDnyOV04nRQBbUxKqu3kZr0lo+zb3jznvPc+VBqitdgpGex0j+q51zFhGt5CwSZt6DpLaS95EwEHq2Hi/QMcx5+mLVXow7QdY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ACZYFugM; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-51021ba75edso231817e87.3 for ; Fri, 26 Jan 2024 01:57:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706263046; x=1706867846; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ewTLwyANv9bkJgZe1agECghfnILfAveBkd1fZ/yoRfs=; b=ACZYFugMOjwralH3xNTiSX5MRZ35uc1P6BhXynurqEEeiDD5Fae2eraGw8AKXQ5WKu BPPMqnNt9+LhVO3BCFuVhS55gwH+peqEgn//gmEZQn/rYJwjNVPnL63GdxVtplUfzi0K fHI/nimMMXYEsmQHR2JYBA8evYYCW7b4U8epg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706263046; x=1706867846; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ewTLwyANv9bkJgZe1agECghfnILfAveBkd1fZ/yoRfs=; b=A5n64Pe7OecQCDSGXsuky/OdHfODYWGD/+4cpTearOzbvAuQ66C1maeMDPETyBtHXL P9zIuuqOPUMQcb3xF+whQtW3Nq51BH1eF/1FTv/qfKxvzG2O/mLGd3NB0KFLmly5GKd5 LnTZ7EwuD13GuBFEON3QfrJ2J2AOFeUiuG4cCMsR7bAaPvBhdNblV3uOu+sHDlElbz6t nQi9vv5DOddGQu0MuOYGiIOccU1NqU7dD6ZIWgoS3q9NAZfG48iWmJgSJyBP3Pjse19y OmuJuRSCZ6t7tjGVW9PpwEzz84VF+r9xOLddo4zAUzFnjXVrspld1JOBsS0atA9mr6WO KqWw== X-Gm-Message-State: AOJu0Yy1R44EgBsrf5erJQ2erzVP7N+7Lo1kFmyKu/kKRgdK2WNkvJAm cCam3TNLAIRsQboQZQ7uHVFFRy0fCupkVb4sxC38ziS8aCgfbfimTosu32MMrg== X-Received: by 2002:ac2:59c9:0:b0:510:1567:daa8 with SMTP id x9-20020ac259c9000000b005101567daa8mr554200lfn.106.1706263045738; Fri, 26 Jan 2024 01:57:25 -0800 (PST) Received: from cracow.c.googlers.com.com (138.58.228.35.bc.googleusercontent.com. [35.228.58.138]) by smtp.gmail.com with ESMTPSA id b16-20020a056512071000b0050ecae41c51sm129041lfs.135.2024.01.26.01.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 01:57:25 -0800 (PST) From: Lukasz Majczak To: Gwendal Grignou , Tzung-Bi Shih , Radoslaw Biernacki , Wim Van Sebroeck , Lee Jones , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev Cc: Lukasz Majczak Subject: [PATCH v4 0/3] Introduce EC-based watchdog Date: Fri, 26 Jan 2024 09:57:18 +0000 Message-ID: <20240126095721.782782-1-lma@chromium.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Chromeos devices are equipped with the embedded controller (EC) that can be used as a watchdog. The following patches updates the structures and definitions required to communicate with EC-based watchdog and implements the driver itself. V1:https://patchwork.kernel.org/project/linux-watchdog/patch/20240117102450.4080839-1-lma@chromium.org/ V2:https://patchwork.kernel.org/project/linux-watchdog/list/?series=817925 V3:https://patchwork.kernel.org/project/linux-watchdog/list/?series=818036 Changelog V3->V4: * updated sizeof() argument with pointer dereference * added cros_ec_wdt_id to the driver structure * "mfd: cros_ec: Register EC-based watchdog subdevice" has been already applied to the for-mfd-next V2->V3: * drop "-drv" from driver name * use format #defineNAMEvalue V1->V2: * Split into three patches * Supplement the watchdog configuration with min/max timeouts * Removed struct cros_ec_wdt_data and get aligned to watchdog framework * Simplified suspend/resume callbacks * Removed excessive log messages * Reworked cros_ec_wdt_send_hang_detect() function to be more generic * Usage of devm_* allowed to delete .remove module callback * Changed MODULE_ALIAS to MODULE_DEVICE_TABLE * Moved clearing bootstatus (on EC) to probe() and thanks to that got rid of .shutdown() module callback * Fixed/removed comments, removed unused includes and general cleanup Best regards, Lukasz Lukasz Majczak (3): platform/chrome: Update binary interface for EC-based watchdog watchdog: Add ChromeOS EC-based watchdog driver mfd: cros_ec: Register EC-based watchdog subdevice MAINTAINERS | 6 + drivers/mfd/cros_ec_dev.c | 9 + drivers/watchdog/Kconfig | 11 + drivers/watchdog/Makefile | 1 + drivers/watchdog/cros_ec_wdt.c | 204 ++++++++++++++++++ .../linux/platform_data/cros_ec_commands.h | 78 +++---- 6 files changed, 266 insertions(+), 43 deletions(-) create mode 100644 drivers/watchdog/cros_ec_wdt.c -- 2.43.0.429.g432eaa2c6b-goog