Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752832AbbBMLtr (ORCPT ); Fri, 13 Feb 2015 06:49:47 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:48115 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752697AbbBMLtq (ORCPT ); Fri, 13 Feb 2015 06:49:46 -0500 Message-ID: <1423828144.4182.18.camel@pengutronix.de> Subject: Re: [PATCH 04/14] reset: Add reset_controller_of_init() function From: Philipp Zabel To: Maxime Coquelin Cc: Jonathan Corbet , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Daniel Lezcano , Thomas Gleixner , Linus Walleij , Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Joe Perches , Antti Palosaari , Tejun Heo , Will Deacon , Nikolay Borisov , Rusty Russell , Kees Cook , Michal Marek , linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-serial@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org Date: Fri, 13 Feb 2015 12:49:04 +0100 In-Reply-To: <1423763164-5606-5-git-send-email-mcoquelin.stm32@gmail.com> References: <1423763164-5606-1-git-send-email-mcoquelin.stm32@gmail.com> <1423763164-5606-5-git-send-email-mcoquelin.stm32@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:96de:80ff:fec2:9969 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1819 Lines: 59 Hi Maxime, Am Donnerstag, den 12.02.2015, 18:45 +0100 schrieb Maxime Coquelin: > Some platforms need to initialize the reset controller before the timers. > > This patch introduces a reset_controller_of_init() function that can be > called before the timers intialization. > > Signed-off-by: Maxime Coquelin > --- > drivers/reset/core.c | 20 ++++++++++++++++++++ > include/asm-generic/vmlinux.lds.h | 4 +++- > include/linux/reset-controller.h | 6 ++++++ > 3 files changed, 29 insertions(+), 1 deletion(-) > > diff --git a/drivers/reset/core.c b/drivers/reset/core.c > index 7955e00..18ee579 100644 > --- a/drivers/reset/core.c > +++ b/drivers/reset/core.c > @@ -86,6 +86,26 @@ void reset_controller_unregister(struct reset_controller_dev *rcdev) > } > EXPORT_SYMBOL_GPL(reset_controller_unregister); > > +extern struct of_device_id __reset_ctrl_of_table[]; > + > +static const struct of_device_id __reset_ctrl_of_table_sentinel > + __used __section(__reset_ctrl_of_table_end); > + > +void __init reset_controller_of_init(void) The patch looks fine to me, but this function is missing a kerneldoc comment. > +{ > + struct device_node *np; > + const struct of_device_id *match; > + of_init_fn_1 init_func; > + > + for_each_matching_node_and_match(np, __reset_ctrl_of_table, &match) { > + if (!of_device_is_available(np)) > + continue; > + > + init_func = match->data; > + init_func(np); > + } > +} > + > /** > * reset_control_reset - reset the controlled device > * @rstc: reset controller regards Philipp -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/