From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E00F9ECE58C for ; Mon, 7 Oct 2019 13:14:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B67692084D for ; Mon, 7 Oct 2019 13:14:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728003AbfJGNOL (ORCPT ); Mon, 7 Oct 2019 09:14:11 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:42189 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727010AbfJGNOK (ORCPT ); Mon, 7 Oct 2019 09:14:10 -0400 Received: from localhost (aclermont-ferrand-651-1-259-53.w86-207.abo.wanadoo.fr [86.207.98.53]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id D0926200010; Mon, 7 Oct 2019 13:14:05 +0000 (UTC) Date: Mon, 7 Oct 2019 15:14:05 +0200 From: Alexandre Belloni To: Guenter Roeck Cc: Eugen.Hristev@microchip.com, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wim@linux-watchdog.org, robh+dt@kernel.org, Nicolas.Ferre@microchip.com Subject: Re: [PATCH 2/3] watchdog: sam9x60_wdt: introduce sam9x60 watchdog timer driver Message-ID: <20191007131348.GH4254@piout.net> References: <1570001371-8174-1-git-send-email-eugen.hristev@microchip.com> <1570001371-8174-2-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/10/2019 05:36:38-0700, Guenter Roeck wrote: > On 10/7/19 12:58 AM, Eugen.Hristev@microchip.com wrote: > [ ... ] > > Hello Guenter, > > > > Thank you for the feedback. > > After reviewing this, can you please guide me towards one of the > > possible two directions: merge this driver with sama5d4_wdt , and have a > > single driver with support for both hardware blocks; or, have this > > driver separately , as in this patch series? > > > > I noticed the similarities. I don't know if it makes sense to reconcile > the two drivers; it seems to me the new chip uses the same basic core with > enhancements. In general, I prefer a single driver, but only if the result > doesn't end up being an if/else mess. Ultimately, it is really your call > to make. > Most if not all your comments were already addressed in the other driver. The main difference in the register interface is the location of the counter that only really affects sama5d4_wdt_set_timeout and that could be abstracted away by using a different struct watchdog_ops. Interrupt enabling is also done differently, I don't think it has a huge impact. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88587ECE58C for ; Mon, 7 Oct 2019 13:14:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B97921721 for ; Mon, 7 Oct 2019 13:14:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YVPfzCVY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B97921721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6jxdqyjSPdnebHUYgd67TwkYU3kXluebZunQdsS3FbY=; b=YVPfzCVYnlanPj Hj/FatNjPZz/Lye9Ir6NOJRZ9Y0NutERlJtCkUuUcYGsBTe9CDlZg56RZofsT30r33wyEJH+U3rpX Cvm/51bb/dZHhufGi6bYqUuLnZGkA1tlBUKvtt9h0wuCmJkicIJl4O31xVRYrx4nJc+zv+ljnU2F3 XQUtYcE5xJvI0lEDf1EQ3Ox2FWsB4v1WeTS7PgCTiKOgJEFVfg3+uWYzBDFdEel8aQgDlNCsHEBm5 G8v5GXs3qbAHVX4a0H3Sx6jtjh1/8qbIUE7MCdNUF1ZHj2XzgqWaIUIzRxb+k6dP/1n8YWdPuH55w 8imwFp9h+eTWZuy8BRVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHSqC-0007mt-7V; Mon, 07 Oct 2019 13:14:20 +0000 Received: from relay12.mail.gandi.net ([217.70.178.232]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHSq8-0007lw-U8 for linux-arm-kernel@lists.infradead.org; Mon, 07 Oct 2019 13:14:18 +0000 Received: from localhost (aclermont-ferrand-651-1-259-53.w86-207.abo.wanadoo.fr [86.207.98.53]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id D0926200010; Mon, 7 Oct 2019 13:14:05 +0000 (UTC) Date: Mon, 7 Oct 2019 15:14:05 +0200 From: Alexandre Belloni To: Guenter Roeck Subject: Re: [PATCH 2/3] watchdog: sam9x60_wdt: introduce sam9x60 watchdog timer driver Message-ID: <20191007131348.GH4254@piout.net> References: <1570001371-8174-1-git-send-email-eugen.hristev@microchip.com> <1570001371-8174-2-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191007_061417_105337_0C92D528 X-CRM114-Status: GOOD ( 15.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, Eugen.Hristev@microchip.com, wim@linux-watchdog.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 07/10/2019 05:36:38-0700, Guenter Roeck wrote: > On 10/7/19 12:58 AM, Eugen.Hristev@microchip.com wrote: > [ ... ] > > Hello Guenter, > > > > Thank you for the feedback. > > After reviewing this, can you please guide me towards one of the > > possible two directions: merge this driver with sama5d4_wdt , and have a > > single driver with support for both hardware blocks; or, have this > > driver separately , as in this patch series? > > > > I noticed the similarities. I don't know if it makes sense to reconcile > the two drivers; it seems to me the new chip uses the same basic core with > enhancements. In general, I prefer a single driver, but only if the result > doesn't end up being an if/else mess. Ultimately, it is really your call > to make. > Most if not all your comments were already addressed in the other driver. The main difference in the register interface is the location of the counter that only really affects sama5d4_wdt_set_timeout and that could be abstracted away by using a different struct watchdog_ops. Interrupt enabling is also done differently, I don't think it has a huge impact. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel