devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	devicetree@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Inki Dae <inki.dae@samsung.com>
Subject: Re: [PATCH v2 1/3] mfd: sec-core: Dump PMIC revision to find out the HW
Date: Tue, 13 Oct 2015 10:04:15 +0100	[thread overview]
Message-ID: <20151013090415.GH32409@x1> (raw)
In-Reply-To: <1444178681-16188-1-git-send-email-k.kozlowski@samsung.com>

On Wed, 07 Oct 2015, Krzysztof Kozlowski wrote:

> There are different revisions of the same chipset. For example S2MPS13 has
> more than 2 revisions. They differ slightly in regulator constraints.
> Print the revision number to easily find which PMIC is used on the board.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
> ---
> 
> Changs since v1:
> None.
> ---
>  drivers/mfd/sec-core.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> index 2d1137a7a0ee..589e5efc2d7f 100644
> --- a/drivers/mfd/sec-core.c
> +++ b/drivers/mfd/sec-core.c
> @@ -253,6 +253,15 @@ static const struct regmap_config s5m8767_regmap_config = {
>  	.cache_type = REGCACHE_FLAT,
>  };
>  
> +static void sec_pmic_dump_rev(struct sec_pmic_dev *sec_pmic)
> +{
> +	unsigned int val;
> +
> +	/* For each device type, the REG_ID is always the first register */
> +	if (!regmap_read(sec_pmic->regmap_pmic, S2MPS11_REG_ID, &val))
> +		dev_dbg(sec_pmic->dev, "Revision: 0x%x\n", val);
> +}
> +
>  #ifdef CONFIG_OF
>  /*
>   * Only the common platform data elements for s5m8767 are parsed here from the
> @@ -425,6 +434,7 @@ static int sec_pmic_probe(struct i2c_client *i2c,
>  		goto err_mfd;
>  
>  	device_init_wakeup(sec_pmic->dev, sec_pmic->wakeup);
> +	sec_pmic_dump_rev(sec_pmic);
>  
>  	return ret;
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      parent reply	other threads:[~2015-10-13  9:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07  0:44 [PATCH v2 1/3] mfd: sec-core: Dump PMIC revision to find out the HW Krzysztof Kozlowski
2015-10-07  0:44 ` [PATCH v2 2/3] mfd: dt-bindings: Document pulled down WRSTBI pin on S2MPS1X Krzysztof Kozlowski
2015-10-13  9:04   ` Lee Jones
2015-10-07  0:44 ` [PATCH v2 3/3] mfd: sec-core: Disable buck voltage reset on watchdog falling edge Krzysztof Kozlowski
2015-10-13  9:03   ` Lee Jones
2015-10-13  9:04   ` Lee Jones
2015-10-13  8:47 ` [PATCH v2 1/3] mfd: sec-core: Dump PMIC revision to find out the HW Lee Jones
2015-10-13  9:04 ` Lee Jones [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=20151013090415.GH32409@x1 \
    --to=lee.jones@linaro.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=inki.dae@samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=sbkim73@samsung.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 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).