blob: 92715e2f1303198d04c4c46f8355f698ff1108f9 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glass363bf772016-01-21 19:44:56 -07002/*
3 * Copyright (c) 2016 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
Simon Glass363bf772016-01-21 19:44:56 -07005 */
6
7#include <common.h>
8#include <dm.h>
9#include <backlight.h>
10
11int backlight_enable(struct udevice *dev)
12{
13 const struct backlight_ops *ops = backlight_get_ops(dev);
14
15 if (!ops->enable)
16 return -ENOSYS;
17
18 return ops->enable(dev);
19}
20
21UCLASS_DRIVER(backlight) = {
22 .id = UCLASS_PANEL_BACKLIGHT,
23 .name = "backlight",
24};