All of lore.kernel.org
 help / color / mirror / Atom feed
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,
	pierre-louis.bossart@linux.intel.com
Subject: Re: [PATCH v3 3/3] ASoC: Intel: atom: Add sysfs entry in order to store FW version
Date: Wed, 23 Nov 2016 13:38:47 +0530	[thread overview]
Message-ID: <20161123080847.GH2698@localhost> (raw)
In-Reply-To: <20161123074513.28661-4-sebastien.guiriec@intel.com>

On Wed, Nov 23, 2016 at 08:45:13AM +0100, Sebastien Guiriec wrote:

> +static ssize_t firmware_version_show(struct device *dev,
> +			    struct device_attribute *attr, char *buf)
> +{
> +	struct intel_sst_drv *ctx = dev_get_drvdata(dev);
> +
> +	if (ctx->fw_version.type == 0 && ctx->fw_version.major == 0 &&
> +	    ctx->fw_version.minor == 0 && ctx->fw_version.build == 0)
> +		return sprintf(buf, "FW not yet loaded\n");
> +	else
> +		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);
> +
> +}
> +
> +DEVICE_ATTR_RO(firmware_version);
> +
> +static const struct attribute *sst_fw_version_attrs[] = {
> +	&dev_attr_firmware_version.attr,
> +	NULL,
> +};
> +
> +static const struct attribute_group sst_fw_version_attr_group = {
> +	.attrs = (struct attribute **)sst_fw_version_attrs,
> +};

Hi Seb,

With each sysfs file (which is an ABI) we are supposed to update
Documentation/ABI/ as well, can you please add it

Sorry should have told you in last rev :(

-- 
~Vinod

      reply	other threads:[~2016-11-23  7:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  7:45 [PATCH v3 0/3] ASoC: intel: atom: Add FW version information Sebastien Guiriec
2016-11-23  7:45 ` [PATCH v3 1/3] ASoC: intel: atom: Add debug information related to FW version Sebastien Guiriec
2016-11-23  7:45 ` [PATCH v3 2/3] ASoC: Intel: atom: save " Sebastien Guiriec
2016-11-23  7:45 ` [PATCH v3 3/3] ASoC: Intel: atom: Add sysfs entry in order to store " Sebastien Guiriec
2016-11-23  8:08   ` Vinod Koul [this message]

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=20161123080847.GH2698@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 \
    /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.