summaryrefslogtreecommitdiff
path: root/include/backlight.h
blob: 4d37af01c0ff1ab932e30bd62c372e84da1f8c16 (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
/* Copyright 2013 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/* Backlight API for Chrome EC */

#ifndef __CROS_EC_BACKLIGHT_H
#define __CROS_EC_BACKLIGHT_H

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

/**
 * Interrupt handler for backlight.
 *
 * @param signal	Signal which triggered the interrupt.
 */
#ifdef CONFIG_BACKLIGHT_REQ_GPIO
void backlight_interrupt(enum gpio_signal signal);
#else
static inline void backlight_interrupt(enum gpio_signal signal)
{
}
#endif /* !CONFIG_BACKLIGHT_REQ_GPIO */

/**
 * Activate/Deactivate the backlight GPIO pin considering active high or low.
 */
void enable_backlight(int enabled);

#endif /* __CROS_EC_BACKLIGHT_H */