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

Commit 6c324b53 authored by Jeff Hugo's avatar Jeff Hugo
Browse files

soc: qcom: smp2p: Add support for sensor subsystem



The sensor subsystem now supports SMP2P communication, so add the necessary
support to allow the apps subsystem to talk to the sensor subsystem.

Change-Id: I8f7fc1c710661b4bd8b5f33052321e67dc83f335
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
parent 4f7ef599
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -87,6 +87,10 @@ static int smp2p_gpio_test_probe(struct platform_device *pdev)
		gpio_info_ptr = &gpio_info[SMP2P_AUDIO_PROC].in;
	} else if (strcmp("qcom,smp2pgpio_test_smp2p_2_out", node->name) == 0) {
		gpio_info_ptr = &gpio_info[SMP2P_AUDIO_PROC].out;
	} else if (strcmp("qcom,smp2pgpio_test_smp2p_3_in", node->name) == 0) {
		gpio_info_ptr = &gpio_info[SMP2P_SENSOR_PROC].in;
	} else if (strcmp("qcom,smp2pgpio_test_smp2p_3_out", node->name) == 0) {
		gpio_info_ptr = &gpio_info[SMP2P_SENSOR_PROC].out;
	} else if (strcmp("qcom,smp2pgpio_test_smp2p_4_in", node->name) == 0) {
		gpio_info_ptr = &gpio_info[SMP2P_WIRELESS_PROC].in;
	} else if (strcmp("qcom,smp2pgpio_test_smp2p_4_out", node->name) == 0) {
@@ -131,6 +135,10 @@ static struct of_device_id msm_smp2p_match_table[] = {
	{.compatible = "qcom,smp2pgpio_test_smp2p_2_out", },
	{.compatible = "qcom,smp2pgpio_test_smp2p_2_in", },

	/* sensor */
	{.compatible = "qcom,smp2pgpio_test_smp2p_3_out", },
	{.compatible = "qcom,smp2pgpio_test_smp2p_3_in", },

	/* wcnss */
	{.compatible = "qcom,smp2pgpio_test_smp2p_4_out", },
	{.compatible = "qcom,smp2pgpio_test_smp2p_4_in", },
+4 −0
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ static struct smp2p_version_if version_if[] = {
static struct smp2p_interrupt_config smp2p_int_cfgs[SMP2P_NUM_PROCS] = {
	[SMP2P_MODEM_PROC].name = "modem",
	[SMP2P_AUDIO_PROC].name = "lpass",
	[SMP2P_SENSOR_PROC].name = "dsps",
	[SMP2P_WIRELESS_PROC].name = "wcnss",
	[SMP2P_REMOTE_MOCK_PROC].name = "mock",
};
@@ -323,6 +324,9 @@ static int smp2p_get_smem_item_id(int write_pid, int read_pid)
	case SMP2P_AUDIO_PROC:
		ret = SMEM_SMP2P_AUDIO_BASE + read_pid;
		break;
	case SMP2P_SENSOR_PROC:
		ret = SMEM_SMP2P_SENSOR_BASE + read_pid;
		break;
	case SMP2P_WIRELESS_PROC:
		ret = SMEM_SMP2P_WIRLESS_BASE + read_pid;
		break;
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ enum {
	SMP2P_APPS_PROC       = 0,
	SMP2P_MODEM_PROC      = 1,
	SMP2P_AUDIO_PROC      = 2,
	SMP2P_RESERVED_PROC_1 = 3,
	SMP2P_SENSOR_PROC     = 3,
	SMP2P_WIRELESS_PROC   = 4,
	SMP2P_RESERVED_PROC_2 = 5,
	SMP2P_POWER_PROC      = 6,
+7 −0
Original line number Diff line number Diff line
@@ -362,6 +362,11 @@ static void smp2p_ut_remote_spinlock_adsp(struct seq_file *s)
	smp2p_ut_remote_spinlock_pid(s, SMP2P_AUDIO_PROC, false);
}

static void smp2p_ut_remote_spinlock_dsps(struct seq_file *s)
{
	smp2p_ut_remote_spinlock_pid(s, SMP2P_SENSOR_PROC, false);
}

static void smp2p_ut_remote_spinlock_wcnss(struct seq_file *s)
{
	smp2p_ut_remote_spinlock_pid(s, SMP2P_WIRELESS_PROC, false);
@@ -568,6 +573,8 @@ static int __init smp2p_debugfs_init(void)
		smp2p_ut_remote_spinlock_modem);
	smp2p_debug_create("ut_remote_spinlock_adsp",
		smp2p_ut_remote_spinlock_adsp);
	smp2p_debug_create("ut_remote_spinlock_dsps",
		smp2p_ut_remote_spinlock_dsps);
	smp2p_debug_create("ut_remote_spinlock_wcnss",
		smp2p_ut_remote_spinlock_wcnss);
	smp2p_debug_create("ut_remote_spinlock_rpm",