Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
MFD BQ2589X Interface

TI BQ2589X battery charger interface. More...

Files

file  bq2589x.h
 Header file for the TI BQ2589X MFD driver.

Functions

int mfd_bq2589x_reg_update (const struct device *dev, uint8_t reg, uint8_t mask, uint8_t val)
 Update selected bits in a BQ2589X register.

Detailed Description

TI BQ2589X battery charger interface.

Since
4.6
Version
0.1.0

Function Documentation

◆ mfd_bq2589x_reg_update()

int mfd_bq2589x_reg_update ( const struct device * dev,
uint8_t reg,
uint8_t mask,
uint8_t val )

#include <zephyr/drivers/mfd/bq2589x.h>

Update selected bits in a BQ2589X register.

The child devices share some registers, so they do all read-modify-write accesses through this function.

Parameters
devBQ2589X MFD device
regRegister address
maskMask of the bits to update
valNew value of the bits, already shifted into place
Returns
0 on success, negative errno value on failure (see i2c_reg_update_byte_dt()).