All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] soc: qcom: socinfo: add missing soc_id sysfs entry
@ 2020-03-19 12:14 Srinivas Kandagatla
  2020-03-19 17:11 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Kandagatla @ 2020-03-19 12:14 UTC (permalink / raw)
  To: bjorn.andersson, agross
  Cc: linux-arm-msm, devicetree, robh+dt, linux-kernel, Srinivas Kandagatla

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.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Changes since v1:
	- expanded SNPE short form for more clarity

 drivers/soc/qcom/socinfo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index ebb49aee179b..08a4b8ae1764 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -430,6 +430,8 @@ static int qcom_socinfo_probe(struct platform_device *pdev)
 	qs->attr.family = "Snapdragon";
 	qs->attr.machine = socinfo_machine(&pdev->dev,
 					   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",
 					   SOCINFO_MAJOR(le32_to_cpu(info->ver)),
 					   SOCINFO_MINOR(le32_to_cpu(info->ver)));
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] soc: qcom: socinfo: add missing soc_id sysfs entry
  2020-03-19 12:14 [PATCH v2] soc: qcom: socinfo: add missing soc_id sysfs entry Srinivas Kandagatla
@ 2020-03-19 17:11 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2020-03-19 17:11 UTC (permalink / raw)
  To: Srinivas Kandagatla, agross, bjorn.andersson
  Cc: linux-arm-msm, devicetree, robh+dt, linux-kernel, Srinivas Kandagatla

Quoting Srinivas Kandagatla (2020-03-19 05:14:18)
> 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.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---

Maybe add a Fixes tag?

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-19 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 12:14 [PATCH v2] soc: qcom: socinfo: add missing soc_id sysfs entry Srinivas Kandagatla
2020-03-19 17:11 ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.