DCMD_I2C_SET_BUS_SPEED

#include <hw/i2c.h>

#define DCMD_I2C_SET_BUS_SPEED      __DIOT (_DCMD_I2C, 2, uint32_t)

The arguments to devctl() are:

Argument Value
filedes A file descriptor that you obtained by opening the device.
dcmd DCMD_I2C_SET_BUS_SPEED
dev_data_ptr A pointer to a uint32_t
n_bytes sizeof(uint32_t)
dev_info_ptr NULL

The DCMD_I2C_SET_BUS_SPEED command sets the bus speed for the current connection. You should set the bus speed before attempting a data-transfer operation.

Input
uint32_t — the bus speed.
Output
None.

If an error occurs, the command returns:

EINVAL
Bad message format.