Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp777939rdb; Mon, 29 Jan 2024 19:38:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWj7bj7Vb0na2pYT3MVNJPOm3gD9sx8TeldH3NDJSDLorA1IKEf/pvEs7RBvQLRw6EfU02 X-Received: by 2002:a05:6512:131b:b0:511:ecf:e5d6 with SMTP id x27-20020a056512131b00b005110ecfe5d6mr3950716lfu.0.1706585909697; Mon, 29 Jan 2024 19:38:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706585909; cv=pass; d=google.com; s=arc-20160816; b=GvX4Jxm6JW8LO+MQRhJplZUxzppqS8XkzzW5vUJ2y5PXQxw5b6nFMa3HEDDrgvfbjE afadl0hbAzSUP/qa7PRx4URHWQXqRBdsZGOMdRfyGrQrJEuNqYDqRpVpbSLYfgPJP/Um feZ8dNjYbiMf+31k7i+Hhmm0HCusGXsDOsh6mqg+TFC1kUSu1FLguN7rmLGtvAnY3NJk FC2fNDj+yyXEt6zRHIb4NG9IHCRSPL5n/AKkNa+OY5zM1b0LDsh90NSVdgZABivY+A9n 4X44sHPXPeY5HAzUNu4B1nTLdel6OUdS9nGytu48rTk5WSwoK0sxadmTaEIQJdu96L90 JGmw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ZY/tF10Vv+/aL8tVviY2SYgV3POcMq50c4gtfxwLluU=; fh=SkOvYmTWEVaDZB03CPFpJW2kyWjyHwBtssKWKwJwh4M=; b=hRY0hB8xbVu6FP/yL0O42TE7y2+jTezEt1O6WHXNBk3ZZPzk8XMSMD5bkOG9JH614o 5pG61Qr2NaquUsPNXQi88jK4VTYcxt+DVO1qJvrL88dt1CT/U6qmnF6fcXHwMLJFEvt5 HsIVJOilF+rndbIPkH+SErhZKGb9bZNNiu6PcHCZO6emLXvkBUmzOOKcJVFOMbUBdzpB +LvpnhUV8qMVbULmOsE9XUIPX9dtaMt0QAnO4o/2/yqPVEDEo3jwvE0LpGSFac8V1Sox yIKcdCctr3AM54BdCR8tYHZ7HOdeH8gfoToO+fN2/c+1nT89Bz4sSQoAdQCbtxvkRLZh O05g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hg4RGQvh; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-43905-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43905-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u9-20020a170906068900b00a2ed1db3626si4096774ejb.570.2024.01.29.19.38.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 19:38:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43905-linux.lists.archive=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=@linaro.org header.s=google header.b=Hg4RGQvh; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-43905-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43905-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 344271F22C94 for ; Tue, 30 Jan 2024 03:38:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ABCA2376ED; Tue, 30 Jan 2024 03:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Hg4RGQvh" Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.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 3268937157 for ; Tue, 30 Jan 2024 03:38:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706585898; cv=none; b=eR6uTSvEgX07wOpXZd3BenoW1RKB6bk5wMJVjUy0DSDZkkVZ1HQhHb3UodZEk8+l4kguA854m3lTxvuJnmcV8QEcSCil3GikkSOs+2JI5+zrsk9rMhwU8urwmnx76M7cUdboL8GNJm1dqG0GuvVXjzvdzIkaNn6IYHbDH4zBAws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706585898; c=relaxed/simple; bh=fo5PvMLWrFsWQEOda98OGIIezzX46PnthpzuIZiwQ1k=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=GXd2DI+9eNTmdPLhlwFRcLfGm6QRhUUzsjHd/SaGi6IFAN5R8MKUyKkl7Za63rP/B/ZfB3gKK8GievSBtlYiU1Ebmzx/MiuumXPed04ANDV9zEF3pbhbdnIIiwLBZLax1G63FxjY4JhqHWJ6vKBIbAme6MuyUYvQ38zrRsBkQ+o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Hg4RGQvh; arc=none smtp.client-ip=209.85.215.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-5d3907ff128so2876537a12.3 for ; Mon, 29 Jan 2024 19:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706585896; x=1707190696; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZY/tF10Vv+/aL8tVviY2SYgV3POcMq50c4gtfxwLluU=; b=Hg4RGQvh2XZoBXyGuxf8LpETzO7apgmtzUKev5tyIBv4W6qvya/POp+PzdckckAm9S ac16sXCnPKVrmx4Bx/HhQbJ6FVrKC5iidaC8FlNXiXsctRWpDu1+mM1foLZKlZP6gYYH QwWlvgLchVt1IzJQUxbGgMcqwZ9agB5yBAbyIh3gp17BebBII1ImsO7LZkJkZc4Q+q4Z bGQVgWaGfPwaLmer5CTsREjiJm/+Zquzny0oHmsVcGEbjnDbtDYB1N/1cECG551MenQu fjvgJBi+Z4+NVRF3UT4ZNV1Go6B+ajhTXfHb+HYTM8ZDjzWygr+6aBWPcTMerYDsoihR 8g8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706585896; x=1707190696; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZY/tF10Vv+/aL8tVviY2SYgV3POcMq50c4gtfxwLluU=; b=uHGE4TqCRUlp+TUfMSs9NmVCEiVszfx0PS4/ebHtQvh5GZ2vEfBkGzkbzcRuf6Lq6T I+EGerxahfw+u0KRpZsS4MvmBTeeXIE5dPs1slaExGp106nIrRsO3Wv5qHVcl7Ri+mKf dOKeYOM97k6pbOMK9+I//g6yfv7323RPN2UOmQ+1hpBQpfxgTimej4bTW7GhCXhl+Dpu rHqbpnd3srTbGGE1ndbQwWy6OAKPKKvXvpS09N6lTjc/xo1lX8q7WEtYlG0d/CQlRaBS 7qYtbCJmoxK8inn53wae75lOx0cx1Az/ZA7+wqA/S4jtkxS2NIVqHTdRrzhy9z7FlOt0 gBqw== X-Gm-Message-State: AOJu0Yxdgj5NbvdkKqVoQ78LTFRbLFG8W4Q2cwQp/vkhBg8NTcLu+FNi zpVw/yhRYqETT6Hk8ep3JGn0EvCC2CB5O3ZiAkx4o8aZI9R5YkD5So0opjX6SVjNsOS21Z5Sshl p2mrdVOlloXcjwiD8r/wLxRd6mp8t6M+NE0duwQ== X-Received: by 2002:a05:6a20:c411:b0:19c:7f23:c062 with SMTP id en17-20020a056a20c41100b0019c7f23c062mr5875905pzb.14.1706585896555; Mon, 29 Jan 2024 19:38:16 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240129211912.3068411-1-peter.griffin@linaro.org> <20240129211912.3068411-3-peter.griffin@linaro.org> In-Reply-To: From: Sam Protsenko Date: Mon, 29 Jan 2024 21:38:05 -0600 Message-ID: Subject: Re: [PATCH v2 2/2] watchdog: s3c2410_wdt: use exynos_get_pmu_regmap_by_phandle() for PMU regs To: Saravana Kannan , Peter Griffin Cc: arnd@arndb.de, krzysztof.kozlowski@linaro.org, linux@roeck-us.net, wim@linux-watchdog.org, alim.akhtar@samsung.com, jaewon02.kim@samsung.com, kernel-team@android.com, tudor.ambarus@linaro.org, andre.draszik@linaro.org, willmcvicker@google.com, linux-fsd@tesla.com, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 29, 2024 at 4:25=E2=80=AFPM Saravana Kannan wrote: > > On Mon, Jan 29, 2024 at 1:19=E2=80=AFPM Peter Griffin wrote: > > > > Obtain the PMU regmap using the new API added to exynos-pmu driver rath= er > > than syscon_regmap_lookup_by_phandle(). As this driver no longer depend= s > > on mfd syscon remove that header and Kconfig dependency. > > > > Signed-off-by: Peter Griffin > > --- > > drivers/watchdog/Kconfig | 1 - > > drivers/watchdog/s3c2410_wdt.c | 9 +++++---- > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > > index 7d22051b15a2..d78fe7137799 100644 > > --- a/drivers/watchdog/Kconfig > > +++ b/drivers/watchdog/Kconfig > > @@ -512,7 +512,6 @@ config S3C2410_WATCHDOG > > tristate "S3C6410/S5Pv210/Exynos Watchdog" > > depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || COMPI= LE_TEST > > select WATCHDOG_CORE > > - select MFD_SYSCON if ARCH_EXYNOS That reminds me: now that exynos-pmu driver uses regmap API, does it make sense to add something like "select REGMAP" to EXYNOS_PMU option? > > help > > Watchdog timer block in the Samsung S3C64xx, S5Pv210 and Exyn= os > > SoCs. This will reboot the system when the timer expires with > > diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_= wdt.c > > index 349d30462c8c..a1e2682c7e57 100644 > > --- a/drivers/watchdog/s3c2410_wdt.c > > +++ b/drivers/watchdog/s3c2410_wdt.c > > @@ -24,9 +24,9 @@ > > #include > > #include > > #include > > -#include > > #include > > #include > > +#include > > > > #define S3C2410_WTCON 0x00 > > #define S3C2410_WTDAT 0x04 > > @@ -699,11 +699,12 @@ static int s3c2410wdt_probe(struct platform_devic= e *pdev) > > return ret; > > > > if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) { > > - wdt->pmureg =3D syscon_regmap_lookup_by_phandle(dev->of= _node, > > - "samsung,syscon-phandle= "); > > + > > + wdt->pmureg =3D exynos_get_pmu_regmap_by_phandle(dev->o= f_node, > > + "samsung,syscon-phandl= e"); > This looks so much better than approach taken in v1, as for my taste. For this patch: Reviewed-by: Sam Protsenko > IIUC, the exynos PMU driver is registering a regmap interface with > regmap framework. So, can't we get the remap from the framework > instead of directly talking to the PMU driver? > Peter is basically re-implementing syscon driver with overridden operations, as a part of exynos-pmu driver, in previous patch. Which means syscon API can't be used anymore to obtain the regmap. Do you have particular API in mind that allows getting a random regmap registered with devm_regmap_init()? > -Saravana > > > if (IS_ERR(wdt->pmureg)) > > return dev_err_probe(dev, PTR_ERR(wdt->pmureg), > > - "syscon regmap lookup fail= ed.\n"); > > + "PMU regmap lookup failed.= \n"); > > } > > > > wdt_irq =3D platform_get_irq(pdev, 0); > > -- > > 2.43.0.429.g432eaa2c6b-goog > >