Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1100921imu; Tue, 20 Nov 2018 11:42:12 -0800 (PST) X-Google-Smtp-Source: AJdET5c3EeGJBmNiRqEgSkdAyMbgMayp68p76DQCAlP9JgUcMXMAivQ1gD2pQYN3qP3oRFDwQdUB X-Received: by 2002:a62:7e13:: with SMTP id z19mr3558375pfc.94.1542742932853; Tue, 20 Nov 2018 11:42:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542742932; cv=none; d=google.com; s=arc-20160816; b=QPjHGvOascPPhpDxjsLMscCGaTIWCRZIpR9tpXtp2cT+cWcO4NGndUCX+hTeYkEpyy jWsFBTkV7q+laCYB4CgX3hwszk8leE3OM8Os1Qz3SpcG5UxVKlDQgR2h0FXeAlNFwkTF bxO+xVEKKp9oYDWMXgX3yiVcCUwZlYTmfrCzoBrE4cutaS6qLdfajjxk2pGF1oeHq0fp aR4xgPDXg+WzGXFkjKlh8griO8ki+S0w6TNLU4jbbzCgXE2E3AJ+DYBV2InO9vXzmatf WQW8fhNErTilfnJYmdLC7B9TtoK+ahDanDR3fjUfHguHVbkZCN79VxkwMBlcIuyH5UHQ v/0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xHPEnz2laoctEf3FPieGJu6IoQ0LSQbTgAFkh+PqW1Q=; b=CS0VKczzIbrwMrmzYTxEwUFTv4Ef82oPtAs3gtHgZQqPCBzoxdV/7cjp4Tm9XYBII/ XRdjNLNPJSsb9yC+2M/8oOrgHeVhAQ9sRVtt2LNOmiBr26GUXrUKorqN8xDgT1fe6QZp L3GtFC3zYKVzKFT/5ur4u2hWdiamTJ4liSrb7GG8Zsa6fIXrPQ+rIAPZNNVycGv27rWZ H0MAY98fqPGMlByWRI6heuv2k6sd8d3XiEL8QADoywMcaybWLWrMkFQLaGbcY/k5xSdY I+Cfp+JO4aEX89d/tKgSrE8tTbF6ZANxToeX7XP9bsCpZxBp+0fSbvEW1jVvXlRY18/Q Ub2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="rFI1/nig"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d66-v6si48773359pfc.92.2018.11.20.11.41.58; Tue, 20 Nov 2018 11:42:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="rFI1/nig"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730440AbeKUEAN (ORCPT + 99 others); Tue, 20 Nov 2018 23:00:13 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:35337 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727166AbeKUEAN (ORCPT ); Tue, 20 Nov 2018 23:00:13 -0500 Received: by mail-pl1-f193.google.com with SMTP id v1-v6so1334937plo.2; Tue, 20 Nov 2018 09:29:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xHPEnz2laoctEf3FPieGJu6IoQ0LSQbTgAFkh+PqW1Q=; b=rFI1/nigi7cYIWY6E9nxvVrJ0paX7b0oZfL2dFF8SdE4KbpDw5FbTLy3yDb205EPb7 7zAY8UjnX4wpnEcuQyRrkCbcqd5umPgWsELYUkHNYsHPQ0/zEusvpzV4TeziM1A1QrXL BDQc46aRF8RJ8Q1bGkUskAQGCmv8lKYgqwCynVJl7p8hjUs+D93F7ZGTBWe+gKUlp80b YniCXB45KTHVquh+OYrqph6qwN21b98uS3VkeixpviUuKMax0Xyan51lmw1erdbFl9Vv hdTFHUmRIPWsMJXQACULTTFhkOb8YTchuHdcxbr0YZ3fUUCqo35tddq2yyL4zirHe9Wf dLNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xHPEnz2laoctEf3FPieGJu6IoQ0LSQbTgAFkh+PqW1Q=; b=BmcN7dlbhfHQHNOgT9YbLvhRDx3+WtKb6jPg0UdfpXjb9hjdBUoP4McCu9E4WQ48xv wJECtdk2YNrakXlXvPoXFk8WXmf902XBb3G/EjHlKJSfafAI2Yzq5FVKb2L3q1bPmSsy ratZUHfpZ5KiYY3xVGla3yZw2oU6O/3TmkzufKNzx9yXxjSxewaHxHkOJDpRhu5hVI3E XaXLM/K9DOmFd5umhBHv+Gj/Ci+gMRPvCz38rFXw8HfuXzj+hnPujzIDHrtB0No39G5D XB2rbiTBpJY9HsVdUG0CLDI8q3FNznpXoz6XNxsuiyS/YOl1d80Rh1ipDtB6xTSvyM1u L/Hw== X-Gm-Message-State: AGRZ1gLgnjxIff6s+P/p57zWtFkeMaqiFV5CLCZt+yJTF4isfX9ylD8L MI0+0o0jrN+o8+BDH0pRf0g= X-Received: by 2002:a63:2d46:: with SMTP id t67mr2780557pgt.140.1542734996782; Tue, 20 Nov 2018 09:29:56 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id q187sm54365690pfq.128.2018.11.20.09.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 09:29:56 -0800 (PST) Date: Tue, 20 Nov 2018 09:29:55 -0800 From: Guenter Roeck To: Eric Anholt Cc: Florian Fainelli , Rob Herring , Mark Rutland , Wim Van Sebroeck , linux-watchdog@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Wahren , bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH 1/8] watchdog: bcm2835: Move the driver to the soc/ directory. Message-ID: <20181120172955.GD32433@roeck-us.net> References: <20181120172000.15102-1-eric@anholt.net> <20181120172000.15102-2-eric@anholt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181120172000.15102-2-eric@anholt.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 20, 2018 at 09:19:53AM -0800, Eric Anholt wrote: > The binding for the bcm2835 "wdt" actually covers a large range of the > PM block's register space. The WDT is not a separate HW block from > the rest of power domain management, so move the driver to the soc/ > directory in preparation for expanding its role to cover power > domains. > > This move does result in the driver being made mandatory for the > BCM2835 platform, which is probably actually reasonable given that > it's necessary for reboot/halt support. > > Signed-off-by: Eric Anholt Keeping drivers out of their domain tends to have the effect of maintainers not being aware of changes, which in turn tends to result in bad code. I have seen that happen a lot with hwmon drivers, and I am not in favor of it. It would be better to keep the watchdog code where it is and have it instantiated from a soc parent, which could pass, for example, regmap information to the driver for register accesses. If the new SoC approach is to move everything into SoC, you'll be on your own. I won't NACK this, but I won't ACK it either. Guenter > --- > drivers/soc/bcm/Makefile | 1 + > .../{watchdog/bcm2835_wdt.c => soc/bcm/bcm2835-pm.c} | 0 > drivers/watchdog/Kconfig | 11 ----------- > drivers/watchdog/Makefile | 1 - > 4 files changed, 1 insertion(+), 12 deletions(-) > rename drivers/{watchdog/bcm2835_wdt.c => soc/bcm/bcm2835-pm.c} (100%) > > diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile > index dc4fced72d21..16504eb694b1 100644 > --- a/drivers/soc/bcm/Makefile > +++ b/drivers/soc/bcm/Makefile > @@ -1,2 +1,3 @@ > +obj-$(CONFIG_ARCH_BCM2835) += bcm2835-pm.o > obj-$(CONFIG_RASPBERRYPI_POWER) += raspberrypi-power.o > obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/ > diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/soc/bcm/bcm2835-pm.c > similarity index 100% > rename from drivers/watchdog/bcm2835_wdt.c > rename to drivers/soc/bcm/bcm2835-pm.c > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > index 2d64333f4782..796e2a593056 100644 > --- a/drivers/watchdog/Kconfig > +++ b/drivers/watchdog/Kconfig > @@ -1573,17 +1573,6 @@ config BCM63XX_WDT > To compile this driver as a loadable module, choose M here. > The module will be called bcm63xx_wdt. > > -config BCM2835_WDT > - tristate "Broadcom BCM2835 hardware watchdog" > - depends on ARCH_BCM2835 || (OF && COMPILE_TEST) > - select WATCHDOG_CORE > - help > - Watchdog driver for the built in watchdog hardware in Broadcom > - BCM2835 SoC. > - > - To compile this driver as a loadable module, choose M here. > - The module will be called bcm2835_wdt. > - > config BCM_KONA_WDT > tristate "BCM Kona Watchdog" > depends on ARCH_BCM_MOBILE || COMPILE_TEST > diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile > index f69cdff5ad7f..1788537e85af 100644 > --- a/drivers/watchdog/Makefile > +++ b/drivers/watchdog/Makefile > @@ -70,7 +70,6 @@ obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o > obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o > obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o > obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o > -obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o > obj-$(CONFIG_MOXART_WDT) += moxart_wdt.o > obj-$(CONFIG_SIRFSOC_WATCHDOG) += sirfsoc_wdt.o > obj-$(CONFIG_ST_LPC_WATCHDOG) += st_lpc_wdt.o > -- > 2.19.1 >