All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	SH-Linux <linux-sh@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	"Simon Horman [Horms]" <horms@verge.net.au>
Subject: Re: [PATCH 01/03] gpio: rcar: Use lazy disable and mask on suspend
Date: Thu, 14 Nov 2013 14:57:49 +0000	[thread overview]
Message-ID: <2298370.sXN8x2E2mt@avalon> (raw)
In-Reply-To: <CANqRtoSkTBG1o1Vrfay_qPxwoyCuitH5cJNCjDdEuiPf0XjvUw@mail.gmail.com>

Hi Magnus,

On Thursday 14 November 2013 17:50:09 Magnus Damm wrote:
> On Thu, Nov 14, 2013 at 11:17 AM, Laurent Pinchart wrote:
> > On Thursday 14 November 2013 11:03:06 Magnus Damm wrote:
> >> On Thu, Nov 14, 2013 at 9:07 AM, Laurent Pinchart wrote:
> >> > On Thursday 14 November 2013 07:59:36 Magnus Damm wrote:
> >> >> From: Magnus Damm <damm@opensource.se>
> >> >> 
> >> >> Set the ->irq_enable() and ->irq_disable() methods to NULL
> >> >> to enable lazy disable of interrupts.
> >> > 
> >> > Is that just for optimization purpose, or is there another reason ?
> >> 
> >> It is needed for IRQCHIP_MASK_ON_SUSPEND operation, which in turn is
> >> needed for Suspend-to-RAM.
> >> 
> >> >> Also extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells the
> >> >> core that only IRQs marked as wakeups need to stay enabled during
> >> >> Suspend-to-RAM.
> >> > 
> >> > Shouldn't this be split to a separate patch ?
> >> 
> >> I could split them up, but since there is a dependency and since I
> >> mainly care about making sure Suspend-to-RAM works I preferred to keep
> >> them together.
> > 
> > Fine with me. Could you then please update the commit message to mention
> > that lazy disabling is required for IRQCHIP_MASK_ON_SUSPEND ? Same
> > comment for patch 03/03.
> 
> Since when is it common practise to describe the dependencies for the
> various components included in a single commit?

It's common practice to describe the reason for a commit in the commit 
message. In this case the two changes seemed unrelated at first sight, I 
believe explained why they're both needed would be good. 

> My opinion is that the person reading the code if requiring more information
> will have to grep for IRQCHIP_MASK_ON_SUSPEND in the friendly source code
> and learn how the subsystem is held together.
> 
> In the case you have some special detailed commit message that you would
> like me to use then please feel free to propose that. If not then I will
> then split up the patches.

I would have use something like

"gpio: rcar: Use mask on suspend

Set IRQCHIP_MASK_ON_SUSPEND to tell the core that only IRQs marked as wakeups 
need to stay enabled during Suspend-to-RAM. This requires lazy interrupt 
disabling, so set the ->irq_enable() and ->irq_disable() methods to NULL."

Alternatively you can split the patches, I have no preference.

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	SH-Linux <linux-sh@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	"Simon Horman [Horms]" <horms@verge.net.au>
Subject: Re: [PATCH 01/03] gpio: rcar: Use lazy disable and mask on suspend
Date: Thu, 14 Nov 2013 15:57:49 +0100	[thread overview]
Message-ID: <2298370.sXN8x2E2mt@avalon> (raw)
In-Reply-To: <CANqRtoSkTBG1o1Vrfay_qPxwoyCuitH5cJNCjDdEuiPf0XjvUw@mail.gmail.com>

Hi Magnus,

On Thursday 14 November 2013 17:50:09 Magnus Damm wrote:
> On Thu, Nov 14, 2013 at 11:17 AM, Laurent Pinchart wrote:
> > On Thursday 14 November 2013 11:03:06 Magnus Damm wrote:
> >> On Thu, Nov 14, 2013 at 9:07 AM, Laurent Pinchart wrote:
> >> > On Thursday 14 November 2013 07:59:36 Magnus Damm wrote:
> >> >> From: Magnus Damm <damm@opensource.se>
> >> >> 
> >> >> Set the ->irq_enable() and ->irq_disable() methods to NULL
> >> >> to enable lazy disable of interrupts.
> >> > 
> >> > Is that just for optimization purpose, or is there another reason ?
> >> 
> >> It is needed for IRQCHIP_MASK_ON_SUSPEND operation, which in turn is
> >> needed for Suspend-to-RAM.
> >> 
> >> >> Also extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells the
> >> >> core that only IRQs marked as wakeups need to stay enabled during
> >> >> Suspend-to-RAM.
> >> > 
> >> > Shouldn't this be split to a separate patch ?
> >> 
> >> I could split them up, but since there is a dependency and since I
> >> mainly care about making sure Suspend-to-RAM works I preferred to keep
> >> them together.
> > 
> > Fine with me. Could you then please update the commit message to mention
> > that lazy disabling is required for IRQCHIP_MASK_ON_SUSPEND ? Same
> > comment for patch 03/03.
> 
> Since when is it common practise to describe the dependencies for the
> various components included in a single commit?

It's common practice to describe the reason for a commit in the commit 
message. In this case the two changes seemed unrelated at first sight, I 
believe explained why they're both needed would be good. 

> My opinion is that the person reading the code if requiring more information
> will have to grep for IRQCHIP_MASK_ON_SUSPEND in the friendly source code
> and learn how the subsystem is held together.
> 
> In the case you have some special detailed commit message that you would
> like me to use then please feel free to propose that. If not then I will
> then split up the patches.

I would have use something like

"gpio: rcar: Use mask on suspend

Set IRQCHIP_MASK_ON_SUSPEND to tell the core that only IRQs marked as wakeups 
need to stay enabled during Suspend-to-RAM. This requires lazy interrupt 
disabling, so set the ->irq_enable() and ->irq_disable() methods to NULL."

Alternatively you can split the patches, I have no preference.

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-11-14 14:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 22:59 [PATCH 00/03] gpio: R-Car and EM GPIO update Magnus Damm
2013-11-13 22:59 ` Magnus Damm
2013-11-13 22:59 ` [PATCH 01/03] gpio: rcar: Use lazy disable and mask on suspend Magnus Damm
2013-11-13 22:59   ` Magnus Damm
2013-11-14  0:07   ` Laurent Pinchart
2013-11-14  0:07     ` Laurent Pinchart
2013-11-14  2:03     ` Magnus Damm
2013-11-14  2:03       ` Magnus Damm
2013-11-14  2:17       ` Laurent Pinchart
2013-11-14  2:17         ` Laurent Pinchart
2013-11-14  8:50         ` Magnus Damm
2013-11-14  8:50           ` Magnus Damm
2013-11-14 14:57           ` Laurent Pinchart [this message]
2013-11-14 14:57             ` Laurent Pinchart
2013-11-13 22:59 ` [PATCH 02/03] gpio: em: Setup gpiochip->dev Magnus Damm
2013-11-13 22:59   ` Magnus Damm
2013-11-14  0:08   ` Laurent Pinchart
2013-11-14  0:08     ` Laurent Pinchart
2013-11-13 22:59 ` [PATCH 03/03] gpio: em: Use lazy disable and mask on suspend Magnus Damm
2013-11-13 22:59   ` Magnus Damm
2013-11-19  8:26 ` [PATCH 00/03] gpio: R-Car and EM GPIO update Linus Walleij
2013-11-19  8:26   ` Linus Walleij

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=2298370.sXN8x2E2mt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.