Commit 27a34413 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Bjorn Andersson

soc: qcom: socinfo: add missing soc_id sysfs entry

Looks like SoC ID is not exported to sysfs for some reason.
This patch adds it!

This is mostly used by userspace libraries like Snapdragon
Neural Processing Engine (SNPE) SDK for checking supported SoC info.

Fixes: efb448d0 ("soc: qcom: Add socinfo driver")
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200319121418.5180-1-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 7ad18bb5
...@@ -430,6 +430,8 @@ static int qcom_socinfo_probe(struct platform_device *pdev) ...@@ -430,6 +430,8 @@ static int qcom_socinfo_probe(struct platform_device *pdev)
qs->attr.family = "Snapdragon"; qs->attr.family = "Snapdragon";
qs->attr.machine = socinfo_machine(&pdev->dev, qs->attr.machine = socinfo_machine(&pdev->dev,
le32_to_cpu(info->id)); le32_to_cpu(info->id));
qs->attr.soc_id = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u",
le32_to_cpu(info->id));
qs->attr.revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u.%u", qs->attr.revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u.%u",
SOCINFO_MAJOR(le32_to_cpu(info->ver)), SOCINFO_MAJOR(le32_to_cpu(info->ver)),
SOCINFO_MINOR(le32_to_cpu(info->ver))); SOCINFO_MINOR(le32_to_cpu(info->ver)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment