summaryrefslogtreecommitdiff
path: root/driver/led/oz554.h
blob: 27b43a1300b305fb8c38b5a48c51b46827552402 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* Copyright 2018 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * O2 Micro OZ554 LED driver.
 */

#ifndef __CROS_EC_OZ554_H
#define __CROS_EC_OZ554_H

#include "common.h"
#include "gpio.h"

/*
 * Overridable board initialization.  Should be overridden by a board
 * specific function if the default is not appropriate
 */
void oz554_board_init(void);

/**
 * Update oz554 configuration array (oz554_conf).
 *
 * @param offset: Offset of the register to be set.
 * @param data:   Value to be set.
 * @return EC_SUCCESS or EC_ERROR_* for errors.
 */
int oz554_set_config(int offset, int data);

#ifndef OZ554_POWER_BACKLIGHT_DELAY
#define OZ554_POWER_BACKLIGHT_DELAY SECOND
#endif

void oz554_interrupt(enum gpio_signal signal);

#endif