All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>, Bryan Wu <cooloney@gmail.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	Grant Likely <grant.likely@linaro.org>
Cc: Courtney Cavin <courtney.cavin@sonymobile.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 2/2] leds: add Qualcomm PM8941 WLED driver
Date: Thu, 12 Feb 2015 20:26:13 -0800	[thread overview]
Message-ID: <54DD7CE5.5000302@codeaurora.org> (raw)
In-Reply-To: <1422060853-1067-2-git-send-email-bjorn.andersson@sonymobile.com>

On 01/23/15 16:54, Bjorn Andersson wrote:
> +
> +static int pm8941_wled_set(struct led_classdev *cdev,
> +			   enum led_brightness value)
> +{
> +	struct pm8941_wled *wled;
> +	u8 ctrl = 0;
> +	u16 val;
> +	int rc;
> +	int i;
> +
> +	wled = container_of(cdev, struct pm8941_wled, cdev);
> +
> +	if (value != 0)
> +		ctrl = PM8941_WLED_REG_MOD_EN_BIT;
> +
> +	val = value * PM8941_WLED_REG_VAL_MAX / LED_FULL;
> +
> +	rc = regmap_update_bits(wled->regmap,
> +			wled->addr + PM8941_WLED_REG_MOD_EN,
> +			PM8941_WLED_REG_MOD_EN_MASK, ctrl);
> +	if (rc)
> +		return rc;
> +
> +	for (i = 0; i < wled->cfg.num_strings; ++i) {
> +		u8 v[2] = { val & 0xff, (val >> 8) & 0xf };
> +
> +		rc = regmap_bulk_write(wled->regmap,
> +				wled->addr + PM8941_WLED_REG_VAL_BASE + 2 * i,
> +				v, 2);
> +		if (rc)
> +			return rc;
> +	}
> +
> +	rc = regmap_update_bits(wled->regmap,
> +			wled->addr + PM8941_WLED_REG_SYNC,
> +			PM8941_WLED_REG_SYNC_MASK, PM8941_WLED_REG_SYNC_ALL);
> +	if (rc)
> +		return rc;
> +
> +	rc = regmap_update_bits(wled->regmap,
> +			wled->addr + PM8941_WLED_REG_SYNC,
> +			PM8941_WLED_REG_SYNC_MASK, PM8941_WLED_REG_SYNC_CLEAR);
> +	return rc;
> +}

This doesn't seem to do anything for the OVP spike mentioned in this
patch[1]. Do you see that problem on your device? I imagine the PMIC is
the same.

[1]
https://www.codeaurora.org/cgit/quic/la/kernel/msm/commit/?id=fef9e15072562f0f28dc7066dcdd69388df81ed3

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  parent reply	other threads:[~2015-02-13  4:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-24  0:54 [PATCH v2 1/2] leds: add DT binding for Qualcomm PM8941 WLED block Bjorn Andersson
2015-01-24  0:54 ` Bjorn Andersson
2015-01-24  0:54 ` [PATCH v2 2/2] leds: add Qualcomm PM8941 WLED driver Bjorn Andersson
2015-01-24  0:54   ` Bjorn Andersson
2015-01-24  1:22   ` Bjorn Andersson
     [not found]   ` <1422060853-1067-2-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2015-01-29 12:48     ` Ivan T. Ivanov
2015-01-29 12:48       ` Ivan T. Ivanov
     [not found]       ` <1422535712.28891.3.camel-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2015-01-29 19:07         ` Bjorn Andersson
2015-01-29 19:07           ` Bjorn Andersson
2015-02-12 19:20           ` Bryan Wu
2015-02-13  4:07       ` Stephen Boyd
2015-02-13  4:28         ` Ivan T. Ivanov
2015-02-13  4:34           ` Stephen Boyd
2015-02-17 23:05         ` Bjorn Andersson
2015-02-13  4:04   ` Stephen Boyd
2015-02-17 22:14     ` Bryan Wu
     [not found]       ` <CAK5ve-KJK_aT_8sVmhtnTTJRZpdAvSGc45dtH-XH-E59wB=jXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-17 22:30         ` Bjorn Andersson
2015-02-17 22:30           ` Bjorn Andersson
     [not found]           ` <CAJAp7OgkY+zsp_Yfgnri2H7yv8xrwVMR9UugFv8oEh4x-Fs82g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-17 22:32             ` Bryan Wu
2015-02-17 22:32               ` Bryan Wu
2015-02-17 23:13     ` Bjorn Andersson
2015-02-13  4:26   ` Stephen Boyd [this message]
2015-02-17 23:02     ` Bjorn Andersson
2015-02-18  2:45       ` Stephen Boyd
2015-02-18 14:54         ` Bjorn Andersson
2015-02-12 19:11 ` [PATCH v2 1/2] leds: add DT binding for Qualcomm PM8941 WLED block Bryan Wu

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=54DD7CE5.5000302@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=cooloney@gmail.com \
    --cc=courtney.cavin@sonymobile.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rpurdie@rpsys.net \
    /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.