blob: bfdafef38bae0829aa8549b1c1d418ca510eefeb [file] [log] [blame]
Tom Rix0f2a8042009-06-28 12:52:30 -05001/*
2 * Copyright (c) 2009 Wind River Systems, Inc.
3 * Tom Rix <Tom.Rix at windriver.com>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 * MA 02111-1307 USA
19 *
20 * twl4030_led_init is from cpu/omap3/common.c, power_init_r
21 *
22 * (C) Copyright 2004-2008
23 * Texas Instruments, <www.ti.com>
24 *
25 * Author :
26 * Sunil Kumar <sunilsaini05 at gmail.com>
27 * Shashi Ranjan <shashiranjanmca05 at gmail.com>
28 *
29 * Derived from Beagle Board and 3430 SDP code by
30 * Richard Woodruff <r-woodruff2 at ti.com>
31 * Syed Mohammed Khasim <khasim at ti.com>
32 *
33 */
34
35#include <twl4030.h>
36
37#define LEDAON (0x1 << 0)
38#define LEDBON (0x1 << 1)
39#define LEDAPWM (0x1 << 4)
40#define LEDBPWM (0x1 << 5)
41
42void twl4030_led_init(void)
43{
44 unsigned char byte;
45
46 /* enable LED */
47 byte = LEDBPWM | LEDAPWM | LEDBON | LEDAON;
48
49 twl4030_i2c_write_u8(TWL4030_CHIP_LED, byte,
50 TWL4030_LED_LEDEN);
51
52}