From: Matthias Kaehlcke <mka@chromium.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Lee Jones <lee.jones@linaro.org>,
Daniel Thompson <daniel.thompson@linaro.org>,
Jingoo Han <jingoohan1@gmail.com>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org,
Douglas Anderson <dianders@chromium.org>,
Brian Norris <briannorris@chromium.org>
Subject: Re: [PATCH 1/2] dt-bindings: pwm-backlight: Add 'max-brightness' property
Date: Tue, 11 Jun 2019 21:38:01 +0000 [thread overview]
Message-ID: <20190611213801.GE137143@google.com> (raw)
In-Reply-To: <20190611102851.GA16611@ulmo>
Hi Thierry,
On Tue, Jun 11, 2019 at 12:28:51PM +0200, Thierry Reding wrote:
> On Mon, Jun 10, 2019 at 04:37:38PM -0700, Matthias Kaehlcke wrote:
> > Add an optional 'max-brightness' property, which is used to specify
> > the number of brightness levels (max-brightness + 1) when the node
> > has no 'brightness-levels' table.
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> > .../devicetree/bindings/leds/backlight/pwm-backlight.txt | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
> > index 64fa2fbd98c9..98f4ba626054 100644
> > --- a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
> > +++ b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
> > @@ -27,6 +27,9 @@ Optional properties:
> > resolution pwm duty cycle can be used without
> > having to list out every possible value in the
> > brightness-level array.
> > + - max-brightness: Maximum brightness value. Used to specify the number of
> > + brightness levels (max-brightness + 1) when the node
> > + has no 'brightness-levels' table.
>
> Back at the time when these bindings were defined we specifically didn't
> add this because it was deemed impractical. That is, no real hardware is
> actually capable of achieving useful results with a simplified
> description like this.
>
> Besides, we already have the num-interpolated-steps property which
> should allow you to achieve the same thing:
>
> brightness-levels = <0 255>;
> default-brightness-level = <1>;
> num-interpolated-steps = <255>;
It doesn't achieve the same. With this configuration the device would
have a table with 256 linearly increasing values, the intended use of
the property is to provide the number of brightness levels to be used
by the CIE 1931 algorithm to compute a brightness scale that is
perceived as linear by the human eye. We could possibly treat a
'brightness-levels' table with only two levels as special case and
get the number of levels from it.
In any case from the discussion on "backlight: pwm_bl: Get number of
brightness levels for CIE 1931 from the device tree" it might not be
necessary to specify the number of levels in the DT.
> Though given the original discussion that we had around how backlight
> hardware behaves, that doesn't seem like a good choice.
WARNING: multiple messages have this Message-ID (diff)
From: Matthias Kaehlcke <mka@chromium.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Lee Jones <lee.jones@linaro.org>,
Daniel Thompson <daniel.thompson@linaro.org>,
Jingoo Han <jingoohan1@gmail.com>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org,
Douglas Anderson <dianders@chromium.org>,
Brian Norris <briannorris@chromium.org>
Subject: Re: [PATCH 1/2] dt-bindings: pwm-backlight: Add 'max-brightness' property
Date: Tue, 11 Jun 2019 14:38:01 -0700 [thread overview]
Message-ID: <20190611213801.GE137143@google.com> (raw)
In-Reply-To: <20190611102851.GA16611@ulmo>
Hi Thierry,
On Tue, Jun 11, 2019 at 12:28:51PM +0200, Thierry Reding wrote:
> On Mon, Jun 10, 2019 at 04:37:38PM -0700, Matthias Kaehlcke wrote:
> > Add an optional 'max-brightness' property, which is used to specify
> > the number of brightness levels (max-brightness + 1) when the node
> > has no 'brightness-levels' table.
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> > .../devicetree/bindings/leds/backlight/pwm-backlight.txt | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
> > index 64fa2fbd98c9..98f4ba626054 100644
> > --- a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
> > +++ b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
> > @@ -27,6 +27,9 @@ Optional properties:
> > resolution pwm duty cycle can be used without
> > having to list out every possible value in the
> > brightness-level array.
> > + - max-brightness: Maximum brightness value. Used to specify the number of
> > + brightness levels (max-brightness + 1) when the node
> > + has no 'brightness-levels' table.
>
> Back at the time when these bindings were defined we specifically didn't
> add this because it was deemed impractical. That is, no real hardware is
> actually capable of achieving useful results with a simplified
> description like this.
>
> Besides, we already have the num-interpolated-steps property which
> should allow you to achieve the same thing:
>
> brightness-levels = <0 255>;
> default-brightness-level = <1>;
> num-interpolated-steps = <255>;
It doesn't achieve the same. With this configuration the device would
have a table with 256 linearly increasing values, the intended use of
the property is to provide the number of brightness levels to be used
by the CIE 1931 algorithm to compute a brightness scale that is
perceived as linear by the human eye. We could possibly treat a
'brightness-levels' table with only two levels as special case and
get the number of levels from it.
In any case from the discussion on "backlight: pwm_bl: Get number of
brightness levels for CIE 1931 from the device tree" it might not be
necessary to specify the number of levels in the DT.
> Though given the original discussion that we had around how backlight
> hardware behaves, that doesn't seem like a good choice.
next prev parent reply other threads:[~2019-06-11 21:38 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 11:16 [PATCH 1/2] dt-bindings: pwm-backlight: Add pwm-delay-us property Enric Balletbo i Serra
2017-06-28 11:16 ` Enric Balletbo i Serra
2017-06-28 11:16 ` [PATCH 2/2] pwm-backlight: Add support for " Enric Balletbo i Serra
2017-06-28 11:16 ` Enric Balletbo i Serra
2017-06-28 13:16 ` [PATCH 1/2] dt-bindings: pwm-backlight: Add " Daniel Thompson
2017-06-28 13:16 ` Daniel Thompson
2017-06-28 13:30 ` Pavel Machek
2017-06-28 13:30 ` Pavel Machek
2017-06-28 14:15 ` Enric Balletbo Serra
2017-06-28 14:15 ` Enric Balletbo Serra
2017-06-29 13:07 ` Daniel Thompson
2017-06-29 13:07 ` Daniel Thompson
2019-06-10 23:37 ` [PATCH 1/2] dt-bindings: pwm-backlight: Add 'max-brightness' property Matthias Kaehlcke
2019-06-10 23:37 ` Matthias Kaehlcke
2019-06-10 23:37 ` [PATCH 2/2] backlight: pwm_bl: Get number of brightness levels for CIE 1931 from the device tree Matthias Kaehlcke
2019-06-10 23:37 ` Matthias Kaehlcke
2019-06-11 10:18 ` Pavel Machek
2019-06-11 10:18 ` Pavel Machek
2019-06-11 10:18 ` Pavel Machek
2019-06-11 21:58 ` Matthias Kaehlcke
2019-06-11 21:58 ` Matthias Kaehlcke
2019-06-11 15:33 ` Daniel Thompson
2019-06-11 15:33 ` Daniel Thompson
2019-06-11 15:33 ` Daniel Thompson
2019-06-11 17:01 ` Matthias Kaehlcke
2019-06-11 17:01 ` Matthias Kaehlcke
2019-06-11 10:14 ` [PATCH 1/2] dt-bindings: pwm-backlight: Add 'max-brightness' property Pavel Machek
2019-06-11 10:14 ` Pavel Machek
2019-06-11 10:28 ` Thierry Reding
2019-06-11 10:28 ` Thierry Reding
2019-06-11 21:38 ` Matthias Kaehlcke [this message]
2019-06-11 21:38 ` Matthias Kaehlcke
2019-06-11 20:02 ` Jacek Anaszewski
2019-06-11 20:02 ` Jacek Anaszewski
2019-06-11 22:11 ` Matthias Kaehlcke
2019-06-11 22:11 ` Matthias Kaehlcke
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=20190611213801.GE137143@google.com \
--to=mka@chromium.org \
--cc=b.zolnierkie@samsung.com \
--cc=briannorris@chromium.org \
--cc=daniel.thompson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=enric.balletbo@collabora.com \
--cc=jacek.anaszewski@gmail.com \
--cc=jingoohan1@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.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.