2 * Copyright (c) 2015 Google, Inc
3 * Written by Simon Glass <sjg@chromium.org>
5 * SPDX-License-Identifier: GPL-2.0+
14 static int cros_ec_i2c_set_bus_speed(struct udevice
*dev
, unsigned int speed
)
19 static int cros_ec_i2c_xfer(struct udevice
*dev
, struct i2c_msg
*msg
,
22 return cros_ec_i2c_tunnel(dev
->parent
, msg
, nmsgs
);
25 static const struct dm_i2c_ops cros_ec_i2c_ops
= {
26 .xfer
= cros_ec_i2c_xfer
,
27 .set_bus_speed
= cros_ec_i2c_set_bus_speed
,
30 static const struct udevice_id cros_ec_i2c_ids
[] = {
31 { .compatible
= "google,cros-ec-i2c-tunnel" },
35 U_BOOT_DRIVER(cros_ec_tunnel
) = {
36 .name
= "cros_ec_tunnel",
38 .of_match
= cros_ec_i2c_ids
,
39 .per_child_auto_alloc_size
= sizeof(struct dm_i2c_chip
),
40 .ops
= &cros_ec_i2c_ops
,