From: Vinod Koul <vinod.koul@intel.com>
To: Sebastien Guiriec <sebastien.guiriec@intel.com>
Cc: liam.r.girdwood@linux.intel.com, alsa-devel@alsa-project.org,
vind.koul@intel.com, pierre-louis.bossart@linux.intel.com
Subject: Re: [PATCH 3/3] ASoC: Intel: atom: Add sysfs entry in order to store FW version
Date: Tue, 8 Nov 2016 02:32:42 +0530 [thread overview]
Message-ID: <20161107210241.GP3000@localhost> (raw)
In-Reply-To: <20161104080411.12410-3-sebastien.guiriec@intel.com>
On Fri, Nov 04, 2016 at 09:04:11AM +0100, Sebastien Guiriec wrote:
> This patch is adding a sysfs entry in order to be able to get
> access to SST FW version.
>
> Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
> ---
> sound/soc/intel/atom/sst/sst.c | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
> index a4b458e..dabbd06 100644
> --- a/sound/soc/intel/atom/sst/sst.c
> +++ b/sound/soc/intel/atom/sst/sst.c
> @@ -27,6 +27,7 @@
> #include <linux/pm_qos.h>
> #include <linux/async.h>
> #include <linux/acpi.h>
> +#include <linux/sysfs.h>
> #include <sound/core.h>
> #include <sound/soc.h>
> #include <asm/platform_sst_audio.h>
> @@ -241,6 +242,28 @@ int sst_alloc_drv_context(struct intel_sst_drv **ctx,
> }
> EXPORT_SYMBOL_GPL(sst_alloc_drv_context);
>
> +static ssize_t firmware_version_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct intel_sst_drv *ctx = dev_get_drvdata(dev);
> +
> + return sprintf(buf, "v%02x.%02x.%02x.%02x\n",
> + ctx->fw_version.type, ctx->fw_version.major,
> + ctx->fw_version.minor, ctx->fw_version.build);
we should do this only after FW load, can you add that bit please. ALso
check we dont leak kernel memory when this is not set
--
~Vinod
next prev parent reply other threads:[~2016-11-07 20:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 8:04 [PATCH 1/3] ASoC: intel: atom: Add debug information related to FW version Sebastien Guiriec
2016-11-04 8:04 ` [PATCH 2/3] ASoC: Intel: atom: save " Sebastien Guiriec
2016-11-07 21:01 ` Vinod Koul
2016-11-08 7:15 ` Sebastien Guiriec
2016-11-04 8:04 ` [PATCH 3/3] ASoC: Intel: atom: Add sysfs entry in order to store " Sebastien Guiriec
2016-11-07 21:02 ` Vinod Koul [this message]
2016-11-08 8:29 ` Sebastien Guiriec
2016-11-09 10:21 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161107210241.GP3000@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sebastien.guiriec@intel.com \
--cc=vind.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.