linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: socinfo: add missing soc_id sysfs entry
@ 2019-09-12  9:10 Srinivas Kandagatla
  2019-09-16 19:43 ` Stephen Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Srinivas Kandagatla @ 2019-09-12  9:10 UTC (permalink / raw)
  To: andy.gross, bjorn.andersson
  Cc: linux-arm-msm, 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 SNPE.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 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 8dc86a74559b..876a3f6612a3 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -422,6 +422,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] 5+ messages in thread

* Re: [PATCH] soc: qcom: socinfo: add missing soc_id sysfs entry
  2019-09-12  9:10 [PATCH] soc: qcom: socinfo: add missing soc_id sysfs entry Srinivas Kandagatla
@ 2019-09-16 19:43 ` Stephen Boyd
  2019-09-25  3:54   ` Jeffrey Hugo
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2019-09-16 19:43 UTC (permalink / raw)
  To: Srinivas Kandagatla, andy.gross, bjorn.andersson
  Cc: linux-arm-msm, linux-kernel, Srinivas Kandagatla

Quoting Srinivas Kandagatla (2019-09-12 02:10:19)
> looks like SoC ID is not exported to sysfs for some reason.
> This patch adds it!
> 
> This is mostly used by userspace libraries like SNPE.

What is SNPE?

> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  drivers/soc/qcom/socinfo.c | 2 ++
>  1 file changed, 2 insertions(+)

Hmm I wasn't aware this driver was merged.

> 
> diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
> index 8dc86a74559b..876a3f6612a3 100644
> --- a/drivers/soc/qcom/socinfo.c
> +++ b/drivers/soc/qcom/socinfo.c
> @@ -422,6 +422,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)));

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

* Re: [PATCH] soc: qcom: socinfo: add missing soc_id sysfs entry
  2019-09-16 19:43 ` Stephen Boyd
@ 2019-09-25  3:54   ` Jeffrey Hugo
  2019-09-26 17:57     ` Stephen Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Hugo @ 2019-09-25  3:54 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Srinivas Kandagatla, Andy Gross, Bjorn Andersson, MSM, lkml

On Mon, Sep 16, 2019 at 3:44 PM Stephen Boyd <swboyd@chromium.org> wrote:
>
> Quoting Srinivas Kandagatla (2019-09-12 02:10:19)
> > looks like SoC ID is not exported to sysfs for some reason.
> > This patch adds it!
> >
> > This is mostly used by userspace libraries like SNPE.
>
> What is SNPE?

Snapdragon Neural Processing Engine.  Pronounced "snap-e".  Its
basically the framework someone goes through to run a neural network
on a Qualcomm mobile SoC.  SNPE can utilize various hardware resources
such as the applications CPU, GPU, and dedicated compute resources
such as a NSP, if available.  Its been around for over a year, and
much more information can be found by just doing a simple search since
SNPE is pretty much a unique search term currently.

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

* Re: [PATCH] soc: qcom: socinfo: add missing soc_id sysfs entry
  2019-09-25  3:54   ` Jeffrey Hugo
@ 2019-09-26 17:57     ` Stephen Boyd
  2019-09-26 18:18       ` Jeffrey Hugo
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2019-09-26 17:57 UTC (permalink / raw)
  To: Jeffrey Hugo; +Cc: Srinivas Kandagatla, Andy Gross, Bjorn Andersson, MSM, lkml

Quoting Jeffrey Hugo (2019-09-24 20:54:41)
> On Mon, Sep 16, 2019 at 3:44 PM Stephen Boyd <swboyd@chromium.org> wrote:
> >
> > Quoting Srinivas Kandagatla (2019-09-12 02:10:19)
> > > looks like SoC ID is not exported to sysfs for some reason.
> > > This patch adds it!
> > >
> > > This is mostly used by userspace libraries like SNPE.
> >
> > What is SNPE?
> 
> Snapdragon Neural Processing Engine.  Pronounced "snap-e".  Its
> basically the framework someone goes through to run a neural network
> on a Qualcomm mobile SoC.  SNPE can utilize various hardware resources
> such as the applications CPU, GPU, and dedicated compute resources
> such as a NSP, if available.  Its been around for over a year, and
> much more information can be found by just doing a simple search since
> SNPE is pretty much a unique search term currently.

I wouldn't mind if it was still spelled out instead of just as an
acronym. Who knows, a few years from now it may not be a unique acronym
and then taking the extra few seconds to write it out once would have
saved future effort.


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

* Re: [PATCH] soc: qcom: socinfo: add missing soc_id sysfs entry
  2019-09-26 17:57     ` Stephen Boyd
@ 2019-09-26 18:18       ` Jeffrey Hugo
  0 siblings, 0 replies; 5+ messages in thread
From: Jeffrey Hugo @ 2019-09-26 18:18 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Srinivas Kandagatla, Andy Gross, Bjorn Andersson, MSM, lkml

On Thu, Sep 26, 2019 at 11:57 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> Quoting Jeffrey Hugo (2019-09-24 20:54:41)
> > On Mon, Sep 16, 2019 at 3:44 PM Stephen Boyd <swboyd@chromium.org> wrote:
> > >
> > > Quoting Srinivas Kandagatla (2019-09-12 02:10:19)
> > > > looks like SoC ID is not exported to sysfs for some reason.
> > > > This patch adds it!
> > > >
> > > > This is mostly used by userspace libraries like SNPE.
> > >
> > > What is SNPE?
> >
> > Snapdragon Neural Processing Engine.  Pronounced "snap-e".  Its
> > basically the framework someone goes through to run a neural network
> > on a Qualcomm mobile SoC.  SNPE can utilize various hardware resources
> > such as the applications CPU, GPU, and dedicated compute resources
> > such as a NSP, if available.  Its been around for over a year, and
> > much more information can be found by just doing a simple search since
> > SNPE is pretty much a unique search term currently.
>
> I wouldn't mind if it was still spelled out instead of just as an
> acronym. Who knows, a few years from now it may not be a unique acronym
> and then taking the extra few seconds to write it out once would have
> saved future effort.
>

Fair point.

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

end of thread, other threads:[~2019-09-26 18:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12  9:10 [PATCH] soc: qcom: socinfo: add missing soc_id sysfs entry Srinivas Kandagatla
2019-09-16 19:43 ` Stephen Boyd
2019-09-25  3:54   ` Jeffrey Hugo
2019-09-26 17:57     ` Stephen Boyd
2019-09-26 18:18       ` Jeffrey Hugo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).