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

Commit 7a02db51 authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta
Browse files

soc: qcom: Add support for proxy consumers on of_devlink



A target may contain multiple defconfigs, but only one device-tree
configuration. Such a target may have device-drivers that are
only enabled in a particular defconfig, while disabled in the
others. For the kernel that boots up with disabled configuration,
since the device-tree node exists, the of_devlink logic expects
the driver to be probed, which is not possible. As a result, the
sync-state remains incomplete.

Hence, add support for a proxy consumer driver that shows a
proxy-presence of the main driver to satisfy the sync-state.

Change-Id: Ica8c2599fb66420c67e6a72e9b35e7afc0ae3220
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
parent 7e5cfaa6
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -115,6 +115,19 @@ config MSM_QBT_HANDLER
	  from the queue. It also creates an input device to send key events such as
	  KEY_POWER, KEY_HOME.

config QCOM_PROXY_OF_CONSUMER
	tristate "Qualcomm Technologies, Inc. OF proxy consumer driver"
	help
	  A target may contain multiple defconfigs, but only one device-tree
	  configuration. Such a target may have device-drivers that are
	  only enabled in a particular defconfig, while disabled in the
	  others. For the kernel that boots up with disabled configuration,
	  since the device-tree node exists, the of_devlink logic expects
	  the driver to be probed, which is not possible. As a result, the
	  sync-state remains incomplete.
	  This proxy consumer driver shows a proxy-presence of the main
	  driver to satisfy the sync-state.

config QCOM_GSBI
        tristate "QCOM General Serial Bus Interface"
        depends on ARCH_QCOM || COMPILE_TEST
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ obj-$(CONFIG_QCOM_SMSM) += smsm.o
obj-$(CONFIG_MSM_CORE_HANG_DETECT) += core_hang_detect.o
obj-$(CONFIG_QCOM_SECURE_BUFFER) += secure_buffer.o
obj-$(CONFIG_QCOM_SOCINFO)	+= socinfo.o
obj-$(CONFIG_QCOM_PROXY_OF_CONSUMER) += qcom_proxy_of_consumer.o
obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o
obj-$(CONFIG_QCOM_IPCC) += qcom_ipcc.o
obj-$(CONFIG_QCOM_RUN_QUEUE_STATS) += rq_stats.o
+39 −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/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>

/*
 * of_match table that contains a list of compatible strings for the
 * drivers that are disabled, but needed to make an appearance to
 * satisfy of_devlink.
 */
static const struct of_device_id qcom_proxy_of_consumer_match[] = {
#if !IS_ENABLED(CONFIG_SERIAL_MSM_GENI_CONSOLE)
	{ .compatible = "qcom,msm-geni-console"},
#endif
	{}
};

static int qcom_proxy_of_consumer_probe(struct platform_device *pdev)
{
	dev_dbg(&pdev->dev, "Proxy probing\n");
	return 0;
}

static struct platform_driver qcom_proxy_of_consumer_driver = {
	.probe = qcom_proxy_of_consumer_probe,
	.driver = {
		.name = "qcom_proxy_of_consumer",
		.of_match_table = qcom_proxy_of_consumer_match,
	},
};

module_platform_driver(qcom_proxy_of_consumer_driver);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Qualcomm Technologies, of proxy consumer driver");