Files
OpenCellular/include/backlight.h
Jett Rink d52ba1a4d4 backlight: Adding support for active low GPIO signal
BUG=b:72007261
BRANCH=none
TEST=Verified with grunt board (with is active low)

Change-Id: I9a58148b8d92065bec982071ed1d97a466197e9a
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/872233
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
2018-01-18 05:09:37 -08:00

31 lines
772 B
C

/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* 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 */