From mboxrd@z Thu Jan 1 00:00:00 1970 From: ben.dooks@codethink.co.uk (Ben Dooks) Date: Fri, 26 Jul 2013 22:05:43 +0100 Subject: [PATCH v11] reset: Add driver for gpio-controlled reset pins In-Reply-To: <1374834384-8071-1-git-send-email-p.zabel@pengutronix.de> References: <1374834384-8071-1-git-send-email-p.zabel@pengutronix.de> Message-ID: <51F2E4A7.1040200@codethink.co.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 26/07/13 11:26, Philipp Zabel wrote: > This driver implements a reset controller device that toggle a gpio > connected to a reset pin of a peripheral IC. The delay between assertion > and de-assertion of the reset signal can be configured via device tree. > > Signed-off-by: Philipp Zabel > Reviewed-by: Stephen Warren [snip] > +static struct of_device_id gpio_reset_dt_ids[] = { > + { .compatible = "gpio-reset" }, > + { } > +}; I think you need the following: MODULE_DEVICE_TABLE(of, gpio_reset_dt_ids); > +static struct platform_driver gpio_reset_driver = { > + .probe = gpio_reset_probe, > + .remove = gpio_reset_remove, > + .driver = { > + .name = "gpio-reset", > + .owner = THIS_MODULE, > + .of_match_table = of_match_ptr(gpio_reset_dt_ids), > + }, > +}; > + > +module_platform_driver(gpio_reset_driver); > + > +MODULE_AUTHOR("Philipp Zabel"); > +MODULE_DESCRIPTION("gpio reset controller"); > +MODULE_LICENSE("GPL"); > +MODULE_ALIAS("platform:gpio-reset"); > +MODULE_DEVICE_TABLE(of, gpio_reset_dt_ids); -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Dooks Subject: Re: [PATCH v11] reset: Add driver for gpio-controlled reset pins Date: Fri, 26 Jul 2013 22:05:43 +0100 Message-ID: <51F2E4A7.1040200@codethink.co.uk> References: <1374834384-8071-1-git-send-email-p.zabel@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1374834384-8071-1-git-send-email-p.zabel@pengutronix.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Philipp Zabel Cc: Marek Vasut , Fabio Estevam , Mike Turquette , Arnd Bergmann , Len Brown , Sascha Hauer , Stephen Warren , "Rafael J. Wysocki" , Pavel Machek , Olof Johansson , Shawn Guo , devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Roger Quadros List-Id: devicetree@vger.kernel.org On 26/07/13 11:26, Philipp Zabel wrote: > This driver implements a reset controller device that toggle a gpio > connected to a reset pin of a peripheral IC. The delay between assertion > and de-assertion of the reset signal can be configured via device tree. > > Signed-off-by: Philipp Zabel > Reviewed-by: Stephen Warren [snip] > +static struct of_device_id gpio_reset_dt_ids[] = { > + { .compatible = "gpio-reset" }, > + { } > +}; I think you need the following: MODULE_DEVICE_TABLE(of, gpio_reset_dt_ids); > +static struct platform_driver gpio_reset_driver = { > + .probe = gpio_reset_probe, > + .remove = gpio_reset_remove, > + .driver = { > + .name = "gpio-reset", > + .owner = THIS_MODULE, > + .of_match_table = of_match_ptr(gpio_reset_dt_ids), > + }, > +}; > + > +module_platform_driver(gpio_reset_driver); > + > +MODULE_AUTHOR("Philipp Zabel"); > +MODULE_DESCRIPTION("gpio reset controller"); > +MODULE_LICENSE("GPL"); > +MODULE_ALIAS("platform:gpio-reset"); > +MODULE_DEVICE_TABLE(of, gpio_reset_dt_ids); -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius