summaryrefslogtreecommitdiff
path: root/driver/led/mp3385.h
blob: 2f179666d84bd5a58e8fb57799b5c70cb236a0c1 (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 2021 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * MPS MP3385 LED driver.
 */

#ifndef __CROS_EC_MP3385_H
#define __CROS_EC_MP3385_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 mp3385_board_init(void);

/**
 * Update mp3385 configuration array (mp3385_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 mp3385_set_config(int offset, int data);

#ifndef MP3385_POWER_BACKLIGHT_DELAY
#define MP3385_POWER_BACKLIGHT_DELAY (15 * MSEC)
#endif

void mp3385_interrupt(enum gpio_signal signal);

#endif