/* use SLV0 for generic read to slave device  */
static int lsm6dsl_shub_read_slave_reg(const struct device *dev, uint8_t slv_addr, uint8_t slv_reg, uint8_t *value, uint16_t len)
/* use SLV0 for generic read to slave device  */
static int lsm6dsl_shub_read_slave_reg(const struct device *dev, uint8_t slv_addr, uint8_t slv_reg, uint8_t *value, uint16_t len)
{
	struct lsm6dsl_data *data = dev->data;
	uint8_t slave[3];
	slave[0] = (slv_addr << 1) | LSM6DSL_EMBEDDED_SLVX_READ;
	slave[1] = slv_reg;
	slave[2] = (len & 0x7);
	if (lsm6dsl_shub_write_embedded_regs(dev, LSM6DSL_EMBEDDED_SLV0_ADDR,
					     slave, 3) < 0) {
		LOG_DBG("error writing embedded reg");
		return -EIO;
	}
	lsm6dsl_shub_enable(dev);
	lsm6dsl_shub_wait_completed(dev);
	data->hw_tf->read_data(dev, LSM6DSL_REG_SENSORHUB1, value, len);
	lsm6dsl_shub_disable(dev);
	return 0;
}