Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdfb95c4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: greybus: remove timesync protocol support



While the timesync protocol was a great idea, it never ended up getting
implemented by any known hardware devices.  It's also a bit
"interesting" in how it ties into the platform controller.

So, just remove it for now.  It's not needed, no one uses it, and it's a
stumbling block in getting the greybus core code merged out of the
staging tree.  If anyone wants it in the future, reverting this patch is
a great place to start from.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Reviewed-by: default avatarAlex Elder <elder@kernel.org>
Acked-by: default avatarBryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 02bbd980
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -10,9 +10,7 @@ greybus-y := core.o \
		control.o	\
		svc.o		\
		svc_watchdog.o	\
		operation.o	\
		timesync.o	\
		timesync_platform.o
		operation.o

obj-$(CONFIG_GREYBUS)		+= greybus.o

+0 −2
Original line number Diff line number Diff line
@@ -10,8 +10,6 @@
#ifndef __ARCHE_PLATFORM_H
#define __ARCHE_PLATFORM_H

#include "timesync.h"

enum arche_platform_state {
	ARCHE_PLATFORM_STATE_OFF,
	ARCHE_PLATFORM_STATE_ACTIVE,
+0 −50
Original line number Diff line number Diff line
@@ -198,56 +198,6 @@ int gb_control_mode_switch_operation(struct gb_control *control)
	return ret;
}

int gb_control_timesync_enable(struct gb_control *control, u8 count,
			       u64 frame_time, u32 strobe_delay, u32 refclk)
{
	struct gb_control_timesync_enable_request request;

	request.count = count;
	request.frame_time = cpu_to_le64(frame_time);
	request.strobe_delay = cpu_to_le32(strobe_delay);
	request.refclk = cpu_to_le32(refclk);
	return gb_operation_sync(control->connection,
				 GB_CONTROL_TYPE_TIMESYNC_ENABLE, &request,
				 sizeof(request), NULL, 0);
}

int gb_control_timesync_disable(struct gb_control *control)
{
	return gb_operation_sync(control->connection,
				 GB_CONTROL_TYPE_TIMESYNC_DISABLE, NULL, 0,
				 NULL, 0);
}

int gb_control_timesync_get_last_event(struct gb_control *control,
				       u64 *frame_time)
{
	struct gb_control_timesync_get_last_event_response response;
	int ret;

	ret = gb_operation_sync(control->connection,
				GB_CONTROL_TYPE_TIMESYNC_GET_LAST_EVENT,
				NULL, 0, &response, sizeof(response));
	if (!ret)
		*frame_time = le64_to_cpu(response.frame_time);
	return ret;
}

int gb_control_timesync_authoritative(struct gb_control *control,
				      u64 *frame_time)
{
	struct gb_control_timesync_authoritative_request request;
	int i;

	for (i = 0; i < GB_TIMESYNC_MAX_STROBES; i++)
		request.frame_time[i] = cpu_to_le64(frame_time[i]);

	return gb_operation_sync(control->connection,
				 GB_CONTROL_TYPE_TIMESYNC_AUTHORITATIVE,
				 &request, sizeof(request),
				 NULL, 0);
}

static int gb_control_bundle_pm_status_map(u8 status)
{
	switch (status) {
+0 −7
Original line number Diff line number Diff line
@@ -48,13 +48,6 @@ void gb_control_mode_switch_complete(struct gb_control *control);
int gb_control_get_manifest_size_operation(struct gb_interface *intf);
int gb_control_get_manifest_operation(struct gb_interface *intf, void *manifest,
				      size_t size);
int gb_control_timesync_enable(struct gb_control *control, u8 count,
			       u64 frame_time, u32 strobe_delay, u32 refclk);
int gb_control_timesync_disable(struct gb_control *control);
int gb_control_timesync_get_last_event(struct gb_control *control,
				       u64 *frame_time);
int gb_control_timesync_authoritative(struct gb_control *control,
				      u64 *frame_time);
int gb_control_bundle_suspend(struct gb_control *control, u8 bundle_id);
int gb_control_bundle_resume(struct gb_control *control, u8 bundle_id);
int gb_control_bundle_deactivate(struct gb_control *control, u8 bundle_id);
+0 −11
Original line number Diff line number Diff line
@@ -218,8 +218,6 @@ static int greybus_probe(struct device *dev)
		return retval;
	}

	gb_timesync_schedule_synchronous(bundle->intf);

	pm_runtime_put(&bundle->intf->dev);

	return 0;
@@ -326,16 +324,8 @@ static int __init gb_init(void)
		pr_err("gb_operation_init failed (%d)\n", retval);
		goto error_operation;
	}

	retval = gb_timesync_init();
	if (retval) {
		pr_err("gb_timesync_init failed\n");
		goto error_timesync;
	}
	return 0;	/* Success */

error_timesync:
	gb_operation_exit();
error_operation:
	gb_hd_exit();
error_hd:
@@ -349,7 +339,6 @@ module_init(gb_init);

static void __exit gb_exit(void)
{
	gb_timesync_exit();
	gb_operation_exit();
	gb_hd_exit();
	bus_unregister(&greybus_bus_type);
Loading