Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752845AbaGGOpd (ORCPT ); Mon, 7 Jul 2014 10:45:33 -0400 Received: from mail-oa0-f49.google.com ([209.85.219.49]:49600 "EHLO mail-oa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752001AbaGGOpc (ORCPT ); Mon, 7 Jul 2014 10:45:32 -0400 MIME-Version: 1.0 In-Reply-To: <1403091577-10232-1-git-send-email-harinik@xilinx.com> References: <1403091577-10232-1-git-send-email-harinik@xilinx.com> Date: Mon, 7 Jul 2014 16:45:28 +0200 Message-ID: Subject: Re: [PATCH v2 1/2] gpio: Add driver for Zynq GPIO controller From: Linus Walleij To: Harini Katakam Cc: Alexandre Courbot , Grant Likely , Rob Herring , Pawel Moll , Mark Rutland , "ijc+devicetree@hellion.org.uk" , Kumar Gala , Rob Landley , Michal Simek , =?UTF-8?Q?S=C3=B6ren_Brinkmann?= , "linux-gpio@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-doc@vger.kernel.org" , Harini Katakam , Harini Katakam Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 18, 2014 at 1:39 PM, Harini Katakam wrote: > From: Harini Katakam > > Add support for GPIO controller used by Xilinx Zynq. > > Signed-off-by: Harini Katakam > Signed-off-by: Soren Brinkmann > --- > > v2 changes: > - convert to pm_runtime_force_(suspend|resume) > - add pm_runtime_set_active in probe() > - also (un)prepare clocks when they are dis-/enabled > - add some missing calls to pm_runtime_get() > - use pm_runtime_put() instead of sync variant > - remove gpio chip in driver remove() > - remove redundant type casts > - directly use IO helpers > - use BIT macro to set/clear bits > - migrate to GPIOLIB_IRQCHIP This is a great improvement! Only small stuff remains. > +#include > +#include > +#include This should be: #include If that doesn't work ... why? > +/** > + * struct zynq_gpio - gpio device private data structure > + * @chip: instance of the gpio_chip > + * @base_addr: base address of the GPIO device > + * @irq: irq associated with the controller > + * @clk: clock resource for this controller > + */ > +struct zynq_gpio { > + struct gpio_chip chip; > + void __iomem *base_addr; > + int irq; Why is irq kept around in this struct? It looks like it could just be a local variable in probe()? > + struct clk *clk; > +}; Apart from that this nitpicking the driver looks very nice. Yours, Linus Walleij -- 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/