/* @bus: Bus to probe @chip_addr: Chip address to probe @flags: Flags for the chip  */
static int i2c_probe_chip(struct udevice *bus, uint chip_addr, enum dm_i2c_chip_flags chip_flags)
/* @bus: Bus to probe @chip_addr: Chip address to probe @flags: Flags for the chip  */
static int i2c_probe_chip(struct udevice *bus, uint chip_addr, enum dm_i2c_chip_flags chip_flags)
{
	struct dm_i2c_ops *ops = i2c_get_ops(bus);
	struct i2c_msg msg[1];
	int ret;
	if (ops->probe_chip) {
		ret = ops->probe_chip(bus, chip_addr, chip_flags);
		if (!ret || ret != -ENOSYS)
			return ret;
	}
	if (!ops->xfer)
		return -ENOSYS;
	msg->addr = chip_addr;
	msg->flags = chip_flags & DM_I2C_CHIP_10BIT ? I2C_M_TEN : 0;
	msg->len = 0;
	msg->buf = NULL;
	return ops->xfer(bus, msg, 1);
}