/* Return: 0 if all went fine, else return appropriate error.  */
static int ti_sci_cmd_dev_is_trans(const struct ti_sci_handle *handle, u32 id, bool *curr_state)
/* Return: 0 if all went fine, else return appropriate error.  */
static int ti_sci_cmd_dev_is_trans(const struct ti_sci_handle *handle, u32 id, bool *curr_state)
{
	int ret;
	u8 state;
	if (!curr_state)
		return -EINVAL;
	ret = ti_sci_get_device_state(handle, id, NULL, NULL, NULL, &state);
	if (ret)
		return ret;
	*curr_state = (state == MSG_DEVICE_HW_STATE_TRANS);
	return 0;
}