/* Return: 0 if all went well, else returns appropriate error value.  */
static int ti_sci_cmd_clk_is_auto(const struct ti_sci_handle *handle, u32 dev_id, u8 clk_id, bool *req_state)
/* Return: 0 if all went well, else returns appropriate error value.  */
static int ti_sci_cmd_clk_is_auto(const struct ti_sci_handle *handle, u32 dev_id, u8 clk_id, bool *req_state)
{
	u8 state = 0;
	int ret;
	if (!req_state)
		return -EINVAL;
	ret = ti_sci_cmd_get_clock_state(handle, dev_id, clk_id, &state, NULL);
	if (ret)
		return ret;
	*req_state = (state == MSG_CLOCK_SW_STATE_AUTO);
	return 0;
}