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

Commit 96336348 authored by Avaneesh Kumar Dwivedi's avatar Avaneesh Kumar Dwivedi Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: sysmon: Enable back MSM_SYSMON_COMM interface support



MSM_SYSMON_GLINK_COMM is currently enabled for all targets which breaks
few existing targets, which do not support GLINK protocol and therefore
are still dependent on MSM_SYSMON_COMM support. Enable back sysmon
communication over SMD interface to preserve backward compatibility
until all targets support GLINK.

Change-Id: I06b6c8cd9c079494998463bbf30e27ad224d7124
Signed-off-by: default avatarAvaneesh Kumar Dwivedi <akdwived@codeaurora.org>
parent 28a2cfec
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -592,6 +592,14 @@ config MSM_SUBSYSTEM_RESTART
	  It also notifies userspace of transitions between these states via
	  sysfs.

config MSM_SYSMON_COMM
	bool "MSM System Monitor communication support"
	depends on MSM_SMD && MSM_SUBSYSTEM_RESTART
	help
	  This option adds support for MSM System Monitor library, which
	  provides an API that may be used for notifying subsystems within
	  the SoC about other subsystems' power-up/down state-changes.

config MSM_PIL
	bool "Peripheral image loading"
	select FW_LOADER
+57 −0
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013,2016 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __HSIC_SYSMON_H__
#define __HSIC_SYSMON_H__

/**
 * enum hsic_sysmon_device_id - Supported HSIC subsystem devices
 */
enum hsic_sysmon_device_id {
	HSIC_SYSMON_DEV_EXT_MODEM,
	HSIC_SYSMON_DEV_EXT_MODEM_2,
	NUM_HSIC_SYSMON_DEVS
};

#if defined(CONFIG_MSM_HSIC_SYSMON) || defined(CONFIG_MSM_HSIC_SYSMON_MODULE)

extern int hsic_sysmon_open(enum hsic_sysmon_device_id id);
extern void hsic_sysmon_close(enum hsic_sysmon_device_id id);
extern int hsic_sysmon_read(enum hsic_sysmon_device_id id, char *data,
			    size_t len, size_t *actual_len, int timeout);
extern int hsic_sysmon_write(enum hsic_sysmon_device_id id, const char *data,
			     size_t len, int timeout);

#else /* CONFIG_MSM_HSIC_SYSMON || CONFIG_MSM_HSIC_SYSMON_MODULE */

static inline int hsic_sysmon_open(enum hsic_sysmon_device_id id)
{
	return -ENODEV;
}

static inline void hsic_sysmon_close(enum hsic_sysmon_device_id id) { }

static inline int hsic_sysmon_read(enum hsic_sysmon_device_id id, char *data,
				   size_t len, size_t *actual_len, int timeout)
{
	return -ENODEV;
}

static inline int hsic_sysmon_write(enum hsic_sysmon_device_id id,
				    const char *data, size_t len, int timeout)
{
	return -ENODEV;
}

#endif /* CONFIG_MSM_HSIC_SYSMON || CONFIG_MSM_HSIC_SYSMON_MODULE */

#endif /* __HSIC_SYSMON_H__ */
+7 −4
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -72,8 +72,6 @@ extern int sysmon_send_shutdown(struct subsys_desc *dest_desc);
extern int sysmon_send_shutdown_no_qmi(struct subsys_desc *dest_desc);
extern int sysmon_notifier_register(struct subsys_desc *desc);
extern void sysmon_notifier_unregister(struct subsys_desc *desc);
extern int sysmon_glink_register(struct subsys_desc *desc);
extern void sysmon_glink_unregister(struct subsys_desc *desc);
#else
static inline int sysmon_send_event(struct subsys_desc *dest_desc,
					struct subsys_desc *event_desc,
@@ -112,6 +110,12 @@ static inline int sysmon_notifier_register(struct subsys_desc *desc)
static inline void sysmon_notifier_unregister(struct subsys_desc *desc)
{
}
#endif

#if defined(CONFIG_MSM_SYSMON_GLINK_COMM)
extern int sysmon_glink_register(struct subsys_desc *desc);
extern void sysmon_glink_unregister(struct subsys_desc *desc);
#else
static inline int sysmon_glink_register(struct subsys_desc *desc)
{
	return 0;
@@ -120,5 +124,4 @@ static inline void sysmon_glink_unregister(struct subsys_desc *desc)
{
}
#endif

#endif