V4L2 CCI kAPI
struct cci_reg_sequence #
An individual write from a sequence of CCI writes
Definition
;
Members
reg: Register address, use CCI_REG#() macros to encode reg widthval: Register value
Description
Register/value pairs for sequences of writes.
cci_read() #
int Read a value from a single CCI register
Parameters
struct regmap *map: Register map to read fromu32 reg: Register address to read, use CCI_REG#() macros to encode reg widthu64 *val: Pointer to store read valueint *err: Optional pointer to store errors, if a previous error is set then the read will be skipped
Return
0 on success or a negative error code on failure.
cci_write() #
int Write a value to a single CCI register
Parameters
struct regmap *map: Register map to write tou32 reg: Register address to write, use CCI_REG#() macros to encode reg widthu64 val: Value to be writtenint *err: Optional pointer to store errors, if a previous error is set then the write will be skipped
Return
0 on success or a negative error code on failure.
cci_update_bits() #
int Perform a read/modify/write cycle on a single CCI register
Parameters
struct regmap *map: Register map to updateu32 reg: Register address to update, use CCI_REG#() macros to encode reg widthu64 mask: Bitmask to changeu64 val: New value for bitmaskint *err: Optional pointer to store errors, if a previous error is set then the update will be skipped
Description
Note this uses read-modify-write to update the bits, atomicity with regards to other cci_*() register access functions is NOT guaranteed.
Return
0 on success or a negative error code on failure.
cci_multi_reg_write() #
int Write multiple registers to the device
Parameters
struct regmap *map: Register map to write toconst struct cci_reg_sequence *regs: Array of structures containing register-address, -value pairs to be written, register-addresses use CCI_REG#() macros to encode reg widthunsigned int num_regs: Number of registers to writeint *err: Optional pointer to store errors, if a previous error is set then the write will be skipped
Description
Write multiple registers to the device where the set of register, value pairs are supplied in any order, possibly not all in a single range.
Use of the CCI_REG#() macros to encode reg width is mandatory.
For raw lists of register-address, -value pairs with only 8 bit
wide writes regmap_multi_reg_write() can be used instead.
Return
0 on success or a negative error code on failure.
devm_cci_regmap_init_i2c() #
struct regmap * Create regmap to use with cci_*() register access functions
Parameters
struct i2c_client *client: i2c_client to create the regmap forint reg_addr_bits: register address width to use (8 or 16)
Description
Note the memory for the created regmap is devm() managed, tied to the client.
Return
0 on success or a negative error code on failure.