linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org,
	linus.walleij@linaro.org, grant.likely@secretlab.ca,
	horms@verge.net.au
Subject: Re: [PATCH 01/03] gpio: Renesas R-Car GPIO driver V2
Date: Wed, 13 Mar 2013 13:14:33 +0000	[thread overview]
Message-ID: <11085187.4PsQNSVmtx@avalon> (raw)
In-Reply-To: <20130313113213.30133.10066.sendpatchset@w520>

Hi Magnus,

Thanks for the patch.

I've reviewed the result of squashing the 3 patches together, I just have one 
comment.

On Wednesday 13 March 2013 20:32:13 Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> This patch is V2 of a GPIO driver for the R-Car series of
> SoCs from Renesas. This driver is designed to be reusable
> between multiple SoCs that share the same basic building block,
> but so far it has only been used on R-Car H1 (r8a7779).
> 
> Each driver instance handles 32 GPIOs with individually
> maskable IRQs. The driver operates on a single I/O memory
> range and the 32 GPIOs are hooked up a single interrupt.
> 
> In the case of R-Car H1 either external IRQ pins or GPIOs
> with interrupts can be used for on-board interupts. For
> external IRQs 4 pins are supported, and in the case of GPIO
> there are 202 GPIOS as 202 interrupts hooked up via 6 driver
> instances and to the GIC and the Cortex-A9 Quad.
> 
> At this point this driver is interfacing as a regular
> platform device driver. In the future DT support will be
> submitted as an incremental feature patch.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  Changes since V1:
>  - Update based on most suggestions from review by Laurent, thanks!
> 
>  Please note that in V2 the driver is reworked to reduce the number of
>  lines and includes minor changes related to headers, printouts and
>  data types. In V2 the register access order is kept the same as in V1,
>  and to make that happen IRQCHIP_SET_TYPE_MASKED is omitted. The interface
>  to the Linux kernel is unchanged except the use of dev_dbg() instead of
>  pr_debug(). So from a hardware point of view V2 is a drop in replacement
>  for V1 and there should be no additional dependencies since devm is
>  kept as a separate patch as well. All this to make back porting easier.
> 
>  drivers/gpio/Kconfig                    |    6
>  drivers/gpio/Makefile                   |    1
>  drivers/gpio/gpio-rcar.c                |  383 ++++++++++++++++++++++++++++
>  include/linux/platform_data/gpio-rcar.h |   25 ++
>  4 files changed, 415 insertions(+)

[snip]

> --- /dev/null
> +++ work/drivers/gpio/gpio-rcar.c	2013-03-13 19:41:35.000000000 +0900
> @@ -0,0 +1,383 @@
> +/*
> + * Renesas R-Car GPIO Support
> + *
> + *  Copyright (C) 2013 Magnus Damm
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */

[snip]

> +static int gpio_rcar_irq_domain_map(struct irq_domain *h, unsigned int
> virq,
> +				 irq_hw_number_t hw)
> +{
> +	struct gpio_rcar_priv *p = h->host_data;
> +
> +	dev_dbg(&p->pdev->dev, "map hw irq = %d, virq = %d\n", (int)hw, virq);
> +
> +	irq_set_chip_data(virq, h->host_data);
> +	irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq);
> +	set_irq_flags(virq, IRQF_VALID); /* kill me now */

What is that comment about ?

> +	return 0;
> +}

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-03-13 13:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 11:32 [PATCH 00/03] gpio: Renesas R-Car GPIO driver update Magnus Damm
2013-03-13 11:32 ` [PATCH 01/03] gpio: Renesas R-Car GPIO driver V2 Magnus Damm
2013-03-13 13:14   ` Laurent Pinchart [this message]
2013-03-14  4:11     ` Magnus Damm
2013-03-13 11:32 ` [PATCH 02/03] gpio: rcar: Use IRQCHIP_SET_TYPE_MASKED Magnus Damm
2013-03-13 11:32 ` [PATCH 03/03] gpio: rcar: Make use of devm functions Magnus Damm
2013-03-13 12:58 ` [PATCH 00/03] gpio: Renesas R-Car GPIO driver update Laurent Pinchart
2013-03-14  4:23   ` Magnus Damm
2013-03-14 13:13     ` Laurent Pinchart
2013-03-16  8:50       ` Simon Horman
2013-03-19  3:36       ` Magnus Damm
2013-03-19 15:01         ` Laurent Pinchart
2013-03-27 12:34         ` Linus Walleij
2013-03-27 14:44           ` Magnus Damm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11085187.4PsQNSVmtx@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=grant.likely@secretlab.ca \
    --cc=horms@verge.net.au \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).