2 * Copyright (C) 2012 Google, Inc
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * ChromeOS EC multi function device
22 #ifndef __LINUX_MFD_CHROMEOS_EC_H
23 #define __LINUX_MFD_CHROMEOS_EC_H
27 struct chromeos_ec_msg {
35 struct chromeos_ec_device {
37 struct i2c_client *client;
39 struct blocking_notifier_head event_notifier;
40 int (*command_send)(struct chromeos_ec_device *ec,
41 char cmd, void *out_buf, int out_len);
42 int (*command_recv)(struct chromeos_ec_device *ec,
43 char cmd, void *in_buf, int in_len);
44 int (*command_xfer)(struct chromeos_ec_device *ec,
45 struct chromeos_ec_msg *msg);
46 int (*command_raw)(struct chromeos_ec_device *ec,
47 struct i2c_msg *msgs, int num);
50 #endif /* __LINUX_MFD_CHROMEOS_EC_H */