Ejemplo n.º 1
0
int gb_i2s_data_get_version(struct gb_connection *connection)
{
	struct gb_protocol_version_response response;

	memset(&response, 0, sizeof(response));
	return gb_protocol_get_version(connection,
				       GB_I2S_DATA_TYPE_PROTOCOL_VERSION,
				       NULL, 0, &response,
				       GB_I2S_DATA_VERSION_MAJOR);
}
Ejemplo n.º 2
0
static int legacy_connection_get_version(struct gb_connection *connection)
{
	int ret;

	ret = gb_protocol_get_version(connection);
	if (ret) {
		dev_err(&connection->hd->dev,
			"%s: failed to get protocol version: %d\n",
			connection->name, ret);
		return ret;
	}

	return 0;
}
Ejemplo n.º 3
0
/*
 * Request protocol version supported by the module. We don't need to do
 * this for SVC as that is initiated by the SVC.
 */
static int gb_connection_protocol_get_version(struct gb_connection *connection)
{
	struct gb_protocol *protocol = connection->protocol;
	int ret;

	if (protocol->flags & GB_PROTOCOL_SKIP_VERSION)
		return 0;

	ret = gb_protocol_get_version(connection);
	if (ret) {
		dev_err(&connection->dev,
				"failed to get protocol version: %d\n", ret);
		return ret;
	}

	return 0;
}