diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2015-03-09 15:50:56 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-22 19:52:51 +0200 |
commit | 71558f5627e566af58f63e2b871868ea0d8a3ed4 (patch) | |
tree | c4b503bbff60063f10168da3e35ab27fa3ad2496 /src/drivers/i2c/ww_ring/ww_ring.h | |
parent | dd78736d4eb45e95fe1c1b412dc5ba496fb1370d (diff) | |
download | coreboot-71558f5627e566af58f63e2b871868ea0d8a3ed4.tar.xz |
i2c: add support for ww_ring
This is a copy of the depthcharge ww ring driver implementation ported
into coreboot. The main differences are:
- direct use of the i2c driver instead of using the callback driver
description
- no dynamic memory allocation for the controller structures
BRANCH=storm
BUG=chrome-os-partner:36059
TEST=with the rest of the patches applied the LED ring gets
initialized to the default pattern at coreboot start.
Change-Id: I6902c8b76fc173ad2ec28b8cc94695e892df338a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: eda24b78f8aff311dd6296d458bdfecf26c3d65a
Original-Change-Id: I5660dc3f255aab8fbe3a87041c72916a645c193b
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/257730
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9858
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers/i2c/ww_ring/ww_ring.h')
-rw-r--r-- | src/drivers/i2c/ww_ring/ww_ring.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/drivers/i2c/ww_ring/ww_ring.h b/src/drivers/i2c/ww_ring/ww_ring.h new file mode 100644 index 0000000000..628cd6c504 --- /dev/null +++ b/src/drivers/i2c/ww_ring/ww_ring.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2015 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __SRC_DRIVERS_VIDEO_WW_RING__H__ +#define __SRC_DRIVERS_VIDEO_WW_RING__H__ + +#if IS_ENABLED(CONFIG_CHROMEOS) +#include <vboot_api.h> + +/* + * ww_ring_display_pattern + * + * Display pattern on the ring LEDs. + */ +int ww_ring_display_pattern(unsigned i2c_bus, enum VbScreenType_t screen_type); + +#else +static inline int ww_ring_display_pattern(unsigned i2c_bus, int screen_type) { return 0;} +#endif +#endif |