linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface
@ 2015-08-06  9:11 Viresh Kumar
  2015-08-10  9:01 ` Linus Walleij
  2015-08-12 16:39 ` Hartley Sweeten
  0 siblings, 2 replies; 7+ messages in thread
From: Viresh Kumar @ 2015-08-06  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

Migrate EP93xx driver to the new 'set-state' interface provided by
clockevents core, the earlier 'set-mode' interface is marked obsolete
now.

This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
Linus,

All other clockevent drivers are migrated to the new interface and yours
was left as it adapted generic clockevents framework just now.

Probably Olof can apply it directly to ARM SoC tree..

 arch/arm/mach-ep93xx/timer-ep93xx.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c
index ac48ac1fd16d..e5f791145bd0 100644
--- a/arch/arm/mach-ep93xx/timer-ep93xx.c
+++ b/arch/arm/mach-ep93xx/timer-ep93xx.c
@@ -86,19 +86,22 @@ static int ep93xx_clkevt_set_next_event(unsigned long next,
 }
 
 
-static void ep93xx_clkevt_set_mode(enum clock_event_mode mode,
-				   struct clock_event_device *evt)
+static int ep93xx_clkevt_shutdown(struct clock_event_device *evt)
 {
 	/* Disable timer */
 	writel(0, EP93XX_TIMER3_CONTROL);
+
+	return 0;
 }
 
 static struct clock_event_device ep93xx_clockevent = {
-	.name		= "timer1",
-	.features	= CLOCK_EVT_FEAT_ONESHOT,
-	.set_mode	= ep93xx_clkevt_set_mode,
-	.set_next_event	= ep93xx_clkevt_set_next_event,
-	.rating		= 300,
+	.name			= "timer1",
+	.features		= CLOCK_EVT_FEAT_ONESHOT,
+	.set_state_shutdown	= ep93xx_clkevt_shutdown,
+	.set_state_oneshot	= ep93xx_clkevt_shutdown,
+	.tick_resume		= ep93xx_clkevt_shutdown,
+	.set_next_event		= ep93xx_clkevt_set_next_event,
+	.rating			= 300,
 };
 
 static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id)
-- 
2.4.0

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

* [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface
  2015-08-06  9:11 [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface Viresh Kumar
@ 2015-08-10  9:01 ` Linus Walleij
  2015-08-10  9:03   ` Viresh Kumar
  2015-08-12 16:39 ` Hartley Sweeten
  1 sibling, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2015-08-10  9:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 6, 2015 at 11:11 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:

> Migrate EP93xx driver to the new 'set-state' interface provided by
> clockevents core, the earlier 'set-mode' interface is marked obsolete
> now.
>
> This also enables us to implement callbacks for new states of clockevent
> devices, for example: ONESHOT_STOPPED.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> Linus,
>
> All other clockevent drivers are migrated to the new interface and yours
> was left as it adapted generic clockevents framework just now.
>
> Probably Olof can apply it directly to ARM SoC tree..

Sure, but does it work right off or does Olof have to
pull a branch from your tree in for it to work? In that
case I suggest you take this in the -rc phase. Anyways:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface
  2015-08-10  9:01 ` Linus Walleij
@ 2015-08-10  9:03   ` Viresh Kumar
  2015-08-11 13:19     ` Olof Johansson
  0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2015-08-10  9:03 UTC (permalink / raw)
  To: linux-arm-kernel

On 10-08-15, 11:01, Linus Walleij wrote:
> Sure, but does it work right off or does Olof have to
> pull a branch from your tree in for it to work? In that
> case I suggest you take this in the -rc phase. Anyways:
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

It should work with latest 4.2 rc..

-- 
viresh

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

* [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface
  2015-08-10  9:03   ` Viresh Kumar
@ 2015-08-11 13:19     ` Olof Johansson
  2015-08-11 14:07       ` Viresh Kumar
  0 siblings, 1 reply; 7+ messages in thread
From: Olof Johansson @ 2015-08-11 13:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 10, 2015 at 02:33:34PM +0530, Viresh Kumar wrote:
> On 10-08-15, 11:01, Linus Walleij wrote:
> > Sure, but does it work right off or does Olof have to
> > pull a branch from your tree in for it to work? In that
> > case I suggest you take this in the -rc phase. Anyways:
> > Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> It should work with latest 4.2 rc..

Latest? We don't base our tree on the latest -- instead we try to keep
back on -rc2/3 if we can. Right now our tree is on -rc2.


Please confirm that this is still OK to merge with that as base. Thanks.


-Olof

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

* [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface
  2015-08-11 13:19     ` Olof Johansson
@ 2015-08-11 14:07       ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2015-08-11 14:07 UTC (permalink / raw)
  To: linux-arm-kernel

On 11-08-15, 15:19, Olof Johansson wrote:
> Latest? We don't base our tree on the latest -- instead we try to keep
> back on -rc2/3 if we can. Right now our tree is on -rc2.
> 
> 
> Please confirm that this is still OK to merge with that as base. Thanks.

Yeah, rc2 should be fine.

-- 
viresh

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

* [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface
  2015-08-06  9:11 [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface Viresh Kumar
  2015-08-10  9:01 ` Linus Walleij
@ 2015-08-12 16:39 ` Hartley Sweeten
  2015-08-13  9:24   ` Olof Johansson
  1 sibling, 1 reply; 7+ messages in thread
From: Hartley Sweeten @ 2015-08-12 16:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday, August 06, 2015 2:11 AM, Viresh Kumar wrote:
> Migrate EP93xx driver to the new 'set-state' interface provided by
> clockevents core, the earlier 'set-mode' interface is marked obsolete
> now.
>
> This also enables us to implement callbacks for new states of clockevent
> devices, for example: ONESHOT_STOPPED.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface
  2015-08-12 16:39 ` Hartley Sweeten
@ 2015-08-13  9:24   ` Olof Johansson
  0 siblings, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2015-08-13  9:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 12, 2015 at 04:39:46PM +0000, Hartley Sweeten wrote:
> On Thursday, August 06, 2015 2:11 AM, Viresh Kumar wrote:
> > Migrate EP93xx driver to the new 'set-state' interface provided by
> > clockevents core, the earlier 'set-mode' interface is marked obsolete
> > now.
> >
> > This also enables us to implement callbacks for new states of clockevent
> > devices, for example: ONESHOT_STOPPED.
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Thanks, applied now.


-Olof

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

end of thread, other threads:[~2015-08-13  9:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06  9:11 [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface Viresh Kumar
2015-08-10  9:01 ` Linus Walleij
2015-08-10  9:03   ` Viresh Kumar
2015-08-11 13:19     ` Olof Johansson
2015-08-11 14:07       ` Viresh Kumar
2015-08-12 16:39 ` Hartley Sweeten
2015-08-13  9:24   ` Olof Johansson

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