3 * Humboldt Solutions Ltd, <adrian@humboldt.co.uk>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 void (* start)(struct i2c_bus *bus);
29 void (* stop)(struct i2c_bus *bus);
30 int (* master_write)(struct i2c_bus *bus, int target, int address,
31 const uint8_t *data, int length);
32 int (* master_read)(struct i2c_bus *bus, int target, int address,
33 uint8_t *data, int length);
36 typedef struct i2c_bus
44 i2c_bus *find_i2c_bus(const char *name);
45 int register_i2c_bus(const i2c_fn *fn, char *tag, void *data);
47 void i2c_start(struct i2c_bus *bus);
48 void i2c_stop(struct i2c_bus *bus);
49 int i2c_master_write(struct i2c_bus *bus, int target, int address,
50 const uint8_t *data, int length);
51 int i2c_master_read(struct i2c_bus *bus, int target, int address,
52 uint8_t *data, int length);
53 void init_i2c_nvram(const char *i2c_tag);
55 extern i2c_fn mpc107_i2c_fn;