devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Osterland-Heim <denis.osterland@diehl.com>
To: "dmurphy@ti.com" <dmurphy@ti.com>, "pavel@ucw.cz" <pavel@ucw.cz>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"jacek.anaszewski@gmail.com" <jacek.anaszewski@gmail.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] leds: pwm: add support for default-state device property
Date: Mon, 16 Mar 2020 20:24:48 +0000	[thread overview]
Message-ID: <e2835f58aead3ca85ad47e9769b393addcd19f2a.camel@diehl.com> (raw)
In-Reply-To: <bee4d31f-1f00-c621-f93c-f49207e406d6@gmail.com>

Hi Jacek,

Am Montag, den 16.03.2020, 19:36 +0100 schrieb Jacek Anaszewski:
> Hi Denis,
> 
> On 3/16/20 1:53 PM, Denis Osterland-Heim wrote:
...
> >  
> > @@ -92,13 +96,27 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
> >  
> >  	pwm_init_state(led_data->pwm, &led_data->pwmstate);
> >  
> > +	if (led->default_state == LEDS_PWM_DEFSTATE_ON)
> > +		led_data->cdev.brightness = led->max_brightness;
> > +	else if (led->default_state == LEDS_PWM_DEFSTATE_KEEP) {
> > +		uint64_t brightness;
> > +
> > +		pwm_get_state(led_data->pwm, &led_data->pwmstate);
> 
> This seems to not be reading the device state, i.e. what you tried
> to address by direct call to pwm->chip->ops->get_state() before.
> 
> Am I missing something?
> 

well, not you, but I missed cfc4c189bc70b1acc17e6f1abf1dc1c0ae890bd8.
Since this commit pwm_get_state() is sufficient.

Regards Denis



Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___________________________________________________________________________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter https://www.diehl.com/group/de/transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. 
- For general information on data protection and your respective rights please visit https://www.diehl.com/group/en/transparency-and-information-obligations/

  reply	other threads:[~2020-03-16 20:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 12:54 [PATCH v3 0/3] leds: pwm: add support for default-state device Denis Osterland-Heim
2020-03-16 12:53 ` [PATCH v3 1/3] leds: pwm: remove header Denis Osterland-Heim
2020-03-16 12:53 ` [PATCH v3 2/3] leds: pwm: add support for default-state device property Denis Osterland-Heim
2020-03-16 18:36   ` Jacek Anaszewski
2020-03-16 20:24     ` Denis Osterland-Heim [this message]
2020-03-17 20:43       ` Jacek Anaszewski
2020-03-19 15:59         ` Denis Osterland-Heim
2020-06-08  6:32         ` Denis Osterland-Heim
2020-06-08 19:26           ` Jacek Anaszewski
2020-03-16 12:54 ` [PATCH v3 3/3] leds: pwm: add reference to common leds for default-state Denis Osterland-Heim

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=e2835f58aead3ca85ad47e9769b393addcd19f2a.camel@diehl.com \
    --to=denis.osterland@diehl.com \
    --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
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).