summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/qdsp/msm-ssc-sensors.txt15
-rw-r--r--drivers/sensors/sensors_ssc.c13
2 files changed, 21 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/qdsp/msm-ssc-sensors.txt b/Documentation/devicetree/bindings/qdsp/msm-ssc-sensors.txt
index 165153dde994..ea671a1ff14a 100644
--- a/Documentation/devicetree/bindings/qdsp/msm-ssc-sensors.txt
+++ b/Documentation/devicetree/bindings/qdsp/msm-ssc-sensors.txt
@@ -1,11 +1,16 @@
-* msm-ssc-sensors
+Qualcomm Technologies, Inc. SSC Driver
+
+msm-ssc-sensors driver implements the mechanism that allows to load SLPI firmware images.
Required properties:
- - compatible: "qcom,msm-ssc-sensors"
+ - compatible: This must be "qcom,msm-ssc-sensors"
+ - qcom,firmware-name: SLPI firmware name, must be "slpi_v1" or "slpi_v2"
Example:
+ The following for msmcobalt version 1.
- qcom,msm-ssc-sensors {
- compatible = "qcom,msm-ssc-sensors";
- };
+ qcom,msm-ssc-sensors {
+ compatible = "qcom,msm-ssc-sensors";
+ qcom,firmware-name = "slpi_v1";
+ };
diff --git a/drivers/sensors/sensors_ssc.c b/drivers/sensors/sensors_ssc.c
index 4707f74404f2..0910ef34e777 100644
--- a/drivers/sensors/sensors_ssc.c
+++ b/drivers/sensors/sensors_ssc.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-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
@@ -69,6 +69,8 @@ static void slpi_loader_do(struct platform_device *pdev)
{
struct slpi_loader_private *priv = NULL;
+ int ret;
+ const char *firmware_name = NULL;
if (!pdev) {
dev_err(&pdev->dev, "%s: Platform device null\n", __func__);
@@ -81,6 +83,13 @@ static void slpi_loader_do(struct platform_device *pdev)
goto fail;
}
+ ret = of_property_read_string(pdev->dev.of_node,
+ "qcom,firmware-name", &firmware_name);
+ if (ret < 0) {
+ pr_err("can't get fw name.\n");
+ goto fail;
+ }
+
priv = platform_get_drvdata(pdev);
if (!priv) {
dev_err(&pdev->dev,
@@ -88,7 +97,7 @@ static void slpi_loader_do(struct platform_device *pdev)
goto fail;
}
- priv->pil_h = subsystem_get("slpi");
+ priv->pil_h = subsystem_get_with_fwname("slpi", firmware_name);
if (IS_ERR(priv->pil_h)) {
dev_err(&pdev->dev, "%s: pil get failed,\n",
__func__);