linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable()
@ 2017-04-10  9:37 Martin Kepplinger
  2017-04-10 16:17 ` Tony Lindgren
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Martin Kepplinger @ 2017-04-10  9:37 UTC (permalink / raw)
  To: tony, lee.jones; +Cc: linux-omap, linux-kernel, Martin Kepplinger, Henri Roosen

Since

commit e6229bec25be ("rtc: make rtc_update_irq callable with irqs enabled")

rtc_update_irq() is callable with irqs enabled, see the rtc drivers.
So update this accordingly.

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Cc: Henri Roosen <henri.roosen@ginzinger.com>
---
 drivers/mfd/menelaus.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
index a4a8f1e..29b7164 100644
--- a/drivers/mfd/menelaus.c
+++ b/drivers/mfd/menelaus.c
@@ -1022,9 +1022,7 @@ static int menelaus_set_alarm(struct device *dev, struct rtc_wkalrm *w)
 static void menelaus_rtc_update_work(struct menelaus_chip *m)
 {
 	/* report 1/sec update */
-	local_irq_disable();
 	rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_UF);
-	local_irq_enable();
 }
 
 static int menelaus_ioctl(struct device *dev, unsigned cmd, unsigned long arg)
@@ -1086,9 +1084,7 @@ static const struct rtc_class_ops menelaus_rtc_ops = {
 static void menelaus_rtc_alarm_work(struct menelaus_chip *m)
 {
 	/* report alarm */
-	local_irq_disable();
 	rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_AF);
-	local_irq_enable();
 
 	/* then disable it; alarms are oneshot */
 	the_menelaus->rtc_control &= ~RTC_CTRL_AL_EN;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable()
  2017-04-10  9:37 [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable() Martin Kepplinger
@ 2017-04-10 16:17 ` Tony Lindgren
  2017-04-12 20:15 ` Aaro Koskinen
  2017-04-24 11:51 ` Lee Jones
  2 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2017-04-10 16:17 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: lee.jones, linux-omap, linux-kernel, Henri Roosen, Aaro Koskinen

* Martin Kepplinger <martin.kepplinger@ginzinger.com> [170410 02:40]:
> Since
> 
> commit e6229bec25be ("rtc: make rtc_update_irq callable with irqs enabled")
> 
> rtc_update_irq() is callable with irqs enabled, see the rtc drivers.
> So update this accordingly.

Adding Aaro to Cc, would be nice to get an ack from him.

Regards,

Tony

> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
> Cc: Henri Roosen <henri.roosen@ginzinger.com>
> ---
>  drivers/mfd/menelaus.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
> index a4a8f1e..29b7164 100644
> --- a/drivers/mfd/menelaus.c
> +++ b/drivers/mfd/menelaus.c
> @@ -1022,9 +1022,7 @@ static int menelaus_set_alarm(struct device *dev, struct rtc_wkalrm *w)
>  static void menelaus_rtc_update_work(struct menelaus_chip *m)
>  {
>  	/* report 1/sec update */
> -	local_irq_disable();
>  	rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_UF);
> -	local_irq_enable();
>  }
>  
>  static int menelaus_ioctl(struct device *dev, unsigned cmd, unsigned long arg)
> @@ -1086,9 +1084,7 @@ static const struct rtc_class_ops menelaus_rtc_ops = {
>  static void menelaus_rtc_alarm_work(struct menelaus_chip *m)
>  {
>  	/* report alarm */
> -	local_irq_disable();
>  	rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_AF);
> -	local_irq_enable();
>  
>  	/* then disable it; alarms are oneshot */
>  	the_menelaus->rtc_control &= ~RTC_CTRL_AL_EN;
> -- 
> 2.1.4
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable()
  2017-04-10  9:37 [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable() Martin Kepplinger
  2017-04-10 16:17 ` Tony Lindgren
@ 2017-04-12 20:15 ` Aaro Koskinen
  2017-04-19  6:10   ` Martin Kepplinger
  2017-04-24 11:51 ` Lee Jones
  2 siblings, 1 reply; 5+ messages in thread
From: Aaro Koskinen @ 2017-04-12 20:15 UTC (permalink / raw)
  To: Martin Kepplinger, Tony Lindgren
  Cc: lee.jones, linux-omap, linux-kernel, Henri Roosen

On Mon, Apr 10, 2017 at 11:37:18AM +0200, Martin Kepplinger wrote:
> Since
> 
> commit e6229bec25be ("rtc: make rtc_update_irq callable with irqs enabled")
> 
> rtc_update_irq() is callable with irqs enabled, see the rtc drivers.
> So update this accordingly.
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
> Cc: Henri Roosen <henri.roosen@ginzinger.com>

I think the patch looks OK, so:

Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>

But when trying to test it on N810/N800, I noticed I was missing RTC
altogether. My custom config was missing CONFIG_RTC_DRV_TWL92330, but
when enabling it I still get:

[    5.759918] menelaus 0-0072: no 32k oscillator

Anyway, this issue is unrelated to this patch...

A.

> ---
>  drivers/mfd/menelaus.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
> index a4a8f1e..29b7164 100644
> --- a/drivers/mfd/menelaus.c
> +++ b/drivers/mfd/menelaus.c
> @@ -1022,9 +1022,7 @@ static int menelaus_set_alarm(struct device *dev, struct rtc_wkalrm *w)
>  static void menelaus_rtc_update_work(struct menelaus_chip *m)
>  {
>  	/* report 1/sec update */
> -	local_irq_disable();
>  	rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_UF);
> -	local_irq_enable();
>  }
>  
>  static int menelaus_ioctl(struct device *dev, unsigned cmd, unsigned long arg)
> @@ -1086,9 +1084,7 @@ static const struct rtc_class_ops menelaus_rtc_ops = {
>  static void menelaus_rtc_alarm_work(struct menelaus_chip *m)
>  {
>  	/* report alarm */
> -	local_irq_disable();
>  	rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_AF);
> -	local_irq_enable();
>  
>  	/* then disable it; alarms are oneshot */
>  	the_menelaus->rtc_control &= ~RTC_CTRL_AL_EN;
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable()
  2017-04-12 20:15 ` Aaro Koskinen
@ 2017-04-19  6:10   ` Martin Kepplinger
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Kepplinger @ 2017-04-19  6:10 UTC (permalink / raw)
  To: Aaro Koskinen, Tony Lindgren
  Cc: lee.jones, linux-omap, linux-kernel, Henri Roosen



On 2017-04-12 22:15, Aaro Koskinen wrote:
> On Mon, Apr 10, 2017 at 11:37:18AM +0200, Martin Kepplinger wrote:
>> Since
>>
>> commit e6229bec25be ("rtc: make rtc_update_irq callable with irqs enabled")
>>
>> rtc_update_irq() is callable with irqs enabled, see the rtc drivers.
>> So update this accordingly.
>>
>> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
>> Cc: Henri Roosen <henri.roosen@ginzinger.com>
> 
> I think the patch looks OK, so:
> 
> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> 

Any other concern about this?

                      martin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable()
  2017-04-10  9:37 [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable() Martin Kepplinger
  2017-04-10 16:17 ` Tony Lindgren
  2017-04-12 20:15 ` Aaro Koskinen
@ 2017-04-24 11:51 ` Lee Jones
  2 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2017-04-24 11:51 UTC (permalink / raw)
  To: Martin Kepplinger; +Cc: tony, linux-omap, linux-kernel, Henri Roosen

On Mon, 10 Apr 2017, Martin Kepplinger wrote:

> Since
> 
> commit e6229bec25be ("rtc: make rtc_update_irq callable with irqs enabled")
> 
> rtc_update_irq() is callable with irqs enabled, see the rtc drivers.
> So update this accordingly.
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
> Cc: Henri Roosen <henri.roosen@ginzinger.com>
> ---
>  drivers/mfd/menelaus.c | 4 ----
>  1 file changed, 4 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
> index a4a8f1e..29b7164 100644
> --- a/drivers/mfd/menelaus.c
> +++ b/drivers/mfd/menelaus.c
> @@ -1022,9 +1022,7 @@ static int menelaus_set_alarm(struct device *dev, struct rtc_wkalrm *w)
>  static void menelaus_rtc_update_work(struct menelaus_chip *m)
>  {
>  	/* report 1/sec update */
> -	local_irq_disable();
>  	rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_UF);
> -	local_irq_enable();
>  }
>  
>  static int menelaus_ioctl(struct device *dev, unsigned cmd, unsigned long arg)
> @@ -1086,9 +1084,7 @@ static const struct rtc_class_ops menelaus_rtc_ops = {
>  static void menelaus_rtc_alarm_work(struct menelaus_chip *m)
>  {
>  	/* report alarm */
> -	local_irq_disable();
>  	rtc_update_irq(m->rtc, 1, RTC_IRQF | RTC_AF);
> -	local_irq_enable();
>  
>  	/* then disable it; alarms are oneshot */
>  	the_menelaus->rtc_control &= ~RTC_CTRL_AL_EN;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-24 11:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10  9:37 [PATCH] mfd: menelaus: remove obsolete local_irq_disable() and local_irq_enable() Martin Kepplinger
2017-04-10 16:17 ` Tony Lindgren
2017-04-12 20:15 ` Aaro Koskinen
2017-04-19  6:10   ` Martin Kepplinger
2017-04-24 11:51 ` Lee Jones

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).