Linux-LEDs Archive on lore.kernel.org
 help / color / Atom feed
From: "Guido Günther" <agx@sigxcpu.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Dan Murphy <dmurphy@ti.com>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] leds: lm3692x: Allow to set ovp and brigthness mode
Date: Tue, 24 Dec 2019 12:26:16 +0100
Message-ID: <20191224112616.GA23468@bogon.m.sigxcpu.org> (raw)
In-Reply-To: <20191221191844.GH32732@amd>

Hi,
On Sat, Dec 21, 2019 at 08:18:44PM +0100, Pavel Machek wrote:
> Hi!
> 
> > Overvoltage protection and brightness mode are currently hardcoded
> > as disabled in the driver. Make these configurable via DT.
> 
> What exactly is overvoltage protection good for? Should we default to
> 29V if we have no other information?

The OVP protects the IC from overvoltage conditions on the output side.
While looking at the manual again I noticed that i misremembered the
'00' value which means 17V - not unprotected. Also the chip defaults
to 29V OVP so i've adjusted that too.

Cheers,
 -- Guido

> 
> > Signed-off-by: Guido Günther <agx@sigxcpu.org>
> 
> > +	ret = device_property_read_u32(&led->client->dev,
> > +				       "ti,overvoltage-volts", &ovp);
> > +	if (!ret) {
> > +		switch (ovp) {
> > +		case 0:
> > +			break;
> > +		case 22:
> > +			led->boost_ctrl |= LM3692X_OVP_21V;
> > +			break;
> 
> Should be case 21.
> 								Pavel
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html



      reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 12:28 [PATCH 0/2] " Guido Günther
2019-12-16 12:28 ` [PATCH 1/2] dt: bindings: lm3692x: Document new properties Guido Günther
2019-12-17 12:41   ` Dan Murphy
2019-12-21 19:15   ` Pavel Machek
2019-12-24 11:45     ` Guido Günther
2019-12-26 19:19   ` Rob Herring
2019-12-27 10:16     ` Guido Günther
2019-12-16 12:28 ` [PATCH 2/2] leds: lm3692x: Allow to set ovp and brigthness mode Guido Günther
2019-12-17 12:53   ` Dan Murphy
2019-12-17 15:40     ` Guido Günther
2019-12-17 17:01       ` Dan Murphy
2019-12-21 19:17     ` Pavel Machek
2019-12-24 11:30     ` Guido Günther
2019-12-21 19:18   ` Pavel Machek
2019-12-24 11:26     ` Guido Günther [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=20191224112616.GA23468@bogon.m.sigxcpu.org \
    --to=agx@sigxcpu.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    /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

Linux-LEDs Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-leds/0 linux-leds/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-leds linux-leds/ https://lore.kernel.org/linux-leds \
		linux-leds@vger.kernel.org
	public-inbox-index linux-leds

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-leds


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git