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

Commit 1a96b0ea authored by Gaurav Singh's avatar Gaurav Singh Committed by Gerrit - the friendly Code Review server
Browse files

drivers: soc: qcom: initial support for plh scmi client driver



Add initial support for plh scmi client driver which registers
into scmi framework for plh vendor protocol extension.
Also registers with plh interface driver msm_performance.

Change-Id: I448a714486ff4c7ea38cbeeec1ddb5e183b76e65
Signed-off-by: default avatarGaurav Singh <sgaurav@codeaurora.org>
parent 1efbc7e9
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -747,6 +747,19 @@ config QTI_SYSTEM_PM
config QTI_SYSTEM_PM_RPM
	bool

config QTI_PLH_SCMI_CLIENT
	tristate "Qualcomm Technologies Inc. SCMI client driver for PLH"
	depends on QTI_PLH
	default n
	help
	  SCMI client driver registers itself with SCMI framework for PLH
	  vendor protocol, and also registers with the plh interface driver
	  msm_performance.

	  This driver deliver the PLH vendor protocol handle to interface
	  driver, and interface driver will use this handle to communicate
	  with RIMPS PLH.

config QTI_HW_MEMLAT
	tristate "Qualcomm Technologies Inc. RIMPS memlat interface driver"
	depends on PERF_EVENTS
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ obj-$(CONFIG_MSM_RPM_SMD) += rpm-smd-debug.o
endif
obj-$(CONFIG_QTI_SYS_PM_VX) += sys_pm_vx.o
obj-$(CONFIG_ICNSS2) += icnss2/
obj-$(CONFIG_QTI_PLH_SCMI_CLIENT) += plh_scmi.o
obj-$(CONFIG_QTI_HW_MEMLAT_SCMI_CLIENT)	+= memlat_scmi.o
obj-$(CONFIG_QTI_HW_MEMLAT) += rimps_memlat.o
obj-$(CONFIG_QTI_HW_MEMLAT_LOG)	+= rimps_log.o
+40 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 */

#include <linux/scmi_protocol.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/platform_device.h>

extern void rimps_plh_init(struct scmi_handle *handle);

static int scmi_plh_probe(struct scmi_device *sdev)
{
	struct scmi_handle *handle = sdev->handle;

	if (!handle || !handle->plh_ops)
		return -ENODEV;

	rimps_plh_init(handle);
	return 0;
}

static const struct scmi_device_id scmi_id_table[] = {
	{ SCMI_PROTOCOL_PLH },
};
MODULE_DEVICE_TABLE(scmi, scmi_id_table);

static struct scmi_driver scmi_plh_drv = {
	.name		= "scmi-plh-driver",
	.probe		= scmi_plh_probe,
	.id_table	= scmi_id_table,
};
module_scmi_driver(scmi_plh_drv);

MODULE_DESCRIPTION("ARM SCMI PLH driver");
MODULE_LICENSE("GPL v2");