|
@@ -123,6 +123,27 @@ int dm_i2c_write(struct udevice *dev, uint offset, const uint8_t *buffer,
|
|
int dm_i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
|
|
int dm_i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
|
|
struct udevice **devp);
|
|
struct udevice **devp);
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * dm_i2c_reg_read() - Read a value from an I2C register
|
|
|
|
+ *
|
|
|
|
+ * This reads a single value from the given address in an I2C chip
|
|
|
|
+ *
|
|
|
|
+ * @addr: Address to read from
|
|
|
|
+ * @return value read, or -ve on error
|
|
|
|
+ */
|
|
|
|
+int dm_i2c_reg_read(struct udevice *dev, uint offset);
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * dm_i2c_reg_write() - Write a value to an I2C register
|
|
|
|
+ *
|
|
|
|
+ * This writes a single value to the given address in an I2C chip
|
|
|
|
+ *
|
|
|
|
+ * @addr: Address to write to
|
|
|
|
+ * @val: Value to write (normally a byte)
|
|
|
|
+ * @return 0 on success, -ve on error
|
|
|
|
+ */
|
|
|
|
+int dm_i2c_reg_write(struct udevice *dev, uint offset, unsigned int val);
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* dm_i2c_set_bus_speed() - set the speed of a bus
|
|
* dm_i2c_set_bus_speed() - set the speed of a bus
|
|
*
|
|
*
|