Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753418AbdHKP5b (ORCPT ); Fri, 11 Aug 2017 11:57:31 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:54859 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752869AbdHKP53 (ORCPT ); Fri, 11 Aug 2017 11:57:29 -0400 Message-ID: <1502467044.2310.21.camel@pengutronix.de> Subject: Re: [PATCH v2 1/5] reset: add reset-simple to unify socfpga, stm32, sunxi, and zx2967 From: Philipp Zabel To: Chen-Yu Tsai Cc: linux-kernel , Alexandru Gagniuc , Andre Przywara , Maxime Coquelin , Alexandre Torgue , Maxime Ripard , Baoyou Xie , Eugeniy Paltsev , Steffen Trumtrar , Dinh Nguyen , linux-arm-kernel , Sascha Hauer Date: Fri, 11 Aug 2017 17:57:24 +0200 In-Reply-To: References: <20170811130618.3676-1-p.zabel@pengutronix.de> <20170811130618.3676-2-p.zabel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 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: 1292 Lines: 30 On Fri, 2017-08-11 at 23:51 +0800, Chen-Yu Tsai wrote: > On Fri, Aug 11, 2017 at 9:06 PM, Philipp Zabel wrote: > > +static int reset_simple_probe(struct platform_device *pdev) > > +{ > > +       struct device *dev = &pdev->dev; > > +       const struct of_device_id *of_id = > > +               of_match_device(of_match_ptr(reset_simple_dt_ids), dev); > > +       const struct reset_simple_devdata *devdata = of_id->data; > > Just use of_device_get_match_data(). Will do that, thanks. > > +struct reset_simple_data { > > +       spinlock_t                      lock; > > +       void __iomem                    *membase; > > +       struct reset_controller_dev     rcdev; > > +       bool                            inverted; > > You should document this option. "Inverted" by itself does not > say a whole lot, as there is no mention about what the normal > or non-inverted behavior is. Is the reset active low (assert > reset when bit is cleared)? Or active high (assert reset when > bit is set)? You are right. Also, maybe I should rename this to "bool active_low;" to avoid confusion where it is used. regards Philipp