/* Write a register value. 
Registers have an address and a 16-bit value */
static int max17262_reg_write(const struct device *dev, uint8_t reg_addr, int16_t val)
/* Write a register value. 
Registers have an address and a 16-bit value */
static int max17262_reg_write(const struct device *dev, uint8_t reg_addr, int16_t val)
{
	const struct max17262_config *cfg = dev->config;
	uint8_t i2c_data[3] = {reg_addr, val & 0xFF, (uint16_t)val >> 8};
	return i2c_write_dt(&cfg->i2c, i2c_data, sizeof(i2c_data));
}