lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 7 Jul 2014 16:45:28 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Harini Katakam <harinik@...inx.com>
Cc:	Alexandre Courbot <gnurou@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Rob Landley <rob@...dley.net>,
	Michal Simek <michal.simek@...inx.com>,
	Sören Brinkmann <soren.brinkmann@...inx.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	Harini Katakam <harinikatakamlinux@...il.com>,
	Harini Katakam <harini.katakam@...inx.com>
Subject: Re: [PATCH v2 1/2] gpio: Add driver for Zynq GPIO controller

On Wed, Jun 18, 2014 at 1:39 PM, Harini Katakam <harinik@...inx.com> wrote:

> From: Harini Katakam <harini.katakam@...inx.com>
>
> Add support for GPIO controller used by Xilinx Zynq.
>
> Signed-off-by: Harini Katakam <harinik@...inx.com>
> Signed-off-by: Soren Brinkmann <soren.brinkmann@...inx.com>
> ---
>
> 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 <linux/bitops.h>
> +#include <linux/clk.h>
> +#include <linux/gpio.h>

This should be:
#include <linux/gpio/driver.h>

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists