From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Iles Subject: Re: [PATCH] watchdog: dw: Enable OF support for DW watchdog timer. Date: Wed, 10 Jul 2013 11:41:01 +0100 Message-ID: <20130710104101.GA3552@page> References: <1373411377-5170-1-git-send-email-dinguyen@altera.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1373411377-5170-1-git-send-email-dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org Cc: Viresh Kumar , dinh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pavel Machek , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Rob Herring , Wim Van Sebroeck , Grant Likely , Jamie Iles List-Id: devicetree@vger.kernel.org Hi Dinh, On Tue, Jul 09, 2013 at 06:09:37PM -0500, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org wrote: > From: Dinh Nguyen > > Add device tree support to the DW watchdog timer. > > Signed-off-by: Dinh Nguyen > Cc: Jamie Iles > Cc: Viresh Kumar > Cc: Grant Likely > Cc: Rob Herring > Cc: Wim Van Sebroeck > Cc: Pavel Machek > --- > .../devicetree/bindings/watchdog/dw_wdt.txt | 16 ++++++++++++++++ > drivers/watchdog/dw_wdt.c | 7 +++++++ > 2 files changed, 23 insertions(+) > create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt > > diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c > index 2037669..f7eec38 100644 > --- a/drivers/watchdog/dw_wdt.c > +++ b/drivers/watchdog/dw_wdt.c > @@ -343,12 +343,19 @@ static int dw_wdt_drv_remove(struct platform_device *pdev) > return 0; > } > > +static const struct of_device_id dw_wdt_of_match[] = { > + { .compatible = "snps,dw-wdt", }, > + { /* sentinel */ } > +}; > +MODULE_DEVICE_TABLE(of, dw_wdt_of_match); > + > static struct platform_driver dw_wdt_driver = { > .probe = dw_wdt_drv_probe, > .remove = dw_wdt_drv_remove, > .driver = { > .name = "dw_wdt", > .owner = THIS_MODULE, > + .of_match_table = dw_wdt_of_match, I think we want: .of_match_table = of_match_ptr(dw_wdt_of_match), as the module doesn't have an OF dependency. Otherwise looks good to me. Acked-by: Jamie Iles Thanks, Jamie