From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Rutland Subject: Re: [PATCH v2 1/2] watchdog: Add Cadence WDT driver Date: Thu, 29 May 2014 14:19:40 +0100 Message-ID: <20140529131940.GG24233@leverpostej> References: <1401185895-3677-1-git-send-email-harinik@xilinx.com> <20140529092106.GC24233@leverpostej> <53870129.5010505@monstr.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <53870129.5010505@monstr.eu> Sender: linux-doc-owner@vger.kernel.org To: Michal Simek Cc: Harini Katakam , "wim@iguana.be" , "grant.likely@linaro.org" , "robh+dt@kernel.org" , Pawel Moll , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" , "rob@landley.net" , "michals@xilinx.com" , "linux-watchdog@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-doc@vger.kernel.org" List-Id: devicetree@vger.kernel.org On Thu, May 29, 2014 at 10:43:05AM +0100, Michal Simek wrote: > Hi Mark, > > >> +static struct of_device_id cdns_wdt_of_match[] = { > >> + { .compatible = "xlnx,zynq-wdt-r1p2", }, > >> + { .compatible = "cdns,wdt-r1p2", }, > > > > If these can currently be handled identically, why not just have > > "cdns,wdt-r1p2" in the driver and in your dts have: > > > > compatible = "xlnx,zynq-wdt-r1p2", "cdns,wdt-r1p2"; > > > > If we need to distinguish the two for some reason later we can always > > add the "xlnx,zynq-wdt-r1p2" string to the driver. > > I would prefer to have 2 compatible strings just because > of that we don't know what is different compare to origin cadence > version. We have done the same for spi-cadence.c that's why > it shouldn't be any problem to keep it as is. > Having zynq compatible property here and using it give us option > that if another SoC vendor come with new configuration or clean > cadence one we can simple handle it without changing compatible > property for us. Sure, we can have two documented strings. But as I mention for the moment the driver only needs to support the one string so long as a given dts has both. Then we can later distinguish the zynq variant (or any other) as necessary. Cheers, Mark.