From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [patch 2.6.21-rc4-omap1] partial LED fixes Date: Thu, 29 Mar 2007 16:28:41 -0400 Message-ID: <20070329202840.GL3638@atomide.com> References: <200703281309.36356.david-b@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <200703281309.36356.david-b@pacbell.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-omap-open-source-bounces@linux.omap.com Errors-To: linux-omap-open-source-bounces@linux.omap.com To: David Brownell Cc: linux-omap-open-source@linux.omap.com List-Id: linux-omap@vger.kernel.org * David Brownell [070328 17:20]: > Partial fix for CONFIG_LEDS breakage ... at least allow platforms > using the debug-leds support (H4 for now) to build with the generic > LED support, and default the LED that would be the timer LED to > trigger using the "heartbeat" (timer driven, rate depends on load). > > Right now only H2 and P2 seem to have working LED support; this > at least makes H4 less broken. > > Signed-off-by: David Brownell > > --- a/arch/arm/plat-omap/debug-leds.c > +++ b/arch/arm/plat-omap/debug-leds.c > @@ -39,12 +39,6 @@ static struct h2p2_dbg_fpga __iomem *fpg > static u16 led_state, hw_led_state; > > > -#ifdef CONFIG_LEDS > -#define old_led_api() 1 > -#else > -#define old_led_api() 0 > -#endif > - > #ifdef CONFIG_LEDS_OMAP_DEBUG > #define new_led_api() 1 > #else > @@ -202,7 +196,8 @@ struct dbg_led { > static struct dbg_led dbg_leds[] = { > /* REVISIT at least H2 uses different timer & cpu leds... */ > #ifndef CONFIG_LEDS_TIMER > - { .mask = 1 << 0, .cdev.name = "d4:green", }, /* timer */ > + { .mask = 1 << 0, .cdev.name = "d4:green", > + .cdev.default_trigger = "heartbeat", }, > #endif > #ifndef CONFIG_LEDS_CPU > { .mask = 1 << 1, .cdev.name = "d5:green", }, /* !idle */ > @@ -274,10 +269,10 @@ static int /* __init */ fpga_probe(struc > fpga = ioremap(iomem->start, H2P2_DBG_FPGA_SIZE); > __raw_writew(~0, &fpga->leds); > > - if (old_led_api()) { > - leds_event = h2p2_dbg_leds_event; > - leds_event(led_start); > - } > +#ifdef CONFIG_LEDS > + leds_event = h2p2_dbg_leds_event; > + leds_event(led_start); > +#endif > > if (new_led_api()) { > newled_init(&pdev->dev); Pushing today. Tony