1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2009 Wind River Systems, Inc.
4 * Tom Rix <Tom.Rix at windriver.com>
6 * twl4030_led_init is from cpu/omap3/common.c, power_init_r
8 * (C) Copyright 2004-2008
9 * Texas Instruments, <www.ti.com>
12 * Sunil Kumar <sunilsaini05 at gmail.com>
13 * Shashi Ranjan <shashiranjanmca05 at gmail.com>
15 * Derived from Beagle Board and 3430 SDP code by
16 * Richard Woodruff <r-woodruff2 at ti.com>
17 * Syed Mohammed Khasim <khasim at ti.com>
22 void twl4030_led_init(unsigned char ledon_mask)
24 /* LEDs need to have corresponding PWMs enabled */
25 if (ledon_mask & TWL4030_LED_LEDEN_LEDAON)
26 ledon_mask |= TWL4030_LED_LEDEN_LEDAPWM;
27 if (ledon_mask & TWL4030_LED_LEDEN_LEDBON)
28 ledon_mask |= TWL4030_LED_LEDEN_LEDBPWM;
30 twl4030_i2c_write_u8(TWL4030_CHIP_LED, TWL4030_LED_LEDEN,