]> git.ipfire.org Git - thirdparty/u-boot.git/blame - common/cros_ec.c
Merge branch '2019-07-11-master-imports'
[thirdparty/u-boot.git] / common / cros_ec.c
CommitLineData
41364f0f
VB
1/*
2 * Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 *
6 * Alternatively, this software may be distributed under the terms of the
7 * GNU General Public License ("GPL") version 2 as published by the Free
8 * Software Foundation.
9 */
10
11#include <common.h>
12#include <cros_ec.h>
84d6cbd3
SG
13#include <dm.h>
14#include <errno.h>
15
42116f64 16struct udevice *board_get_cros_ec_dev(void)
41364f0f 17{
84d6cbd3
SG
18 struct udevice *dev;
19 int ret;
20
21 ret = uclass_get_device(UCLASS_CROS_EC, 0, &dev);
22 if (ret) {
23 debug("%s: Error %d\n", __func__, ret);
24 return NULL;
25 }
42116f64 26 return dev;
41364f0f 27}