LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Paul Kocialkowski <contact@paulk.fr>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>, Chen-Yu Tsai <wens@csie.org>,
Thierry Reding <thierry.reding@gmail.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/3] ARM: dts: sun7i: Add support for the Ainol AW1 tablet
Date: Tue, 8 May 2018 15:28:51 +0200 [thread overview]
Message-ID: <20180508132851.cvthykob5mw6v6yy@flea> (raw)
In-Reply-To: <d8de7d2237a74388ac8c8152eded3477e7fd56a4.camel@paulk.fr>
On Mon, May 07, 2018 at 10:15:46PM +0200, Paul Kocialkowski wrote:
> > > + backlight: backlight {
> > > + compatible = "pwm-backlight";
> > > + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
> > > + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
> >
> > The increase in perceived brightness should be linear. Usually, for
> > PWMs backed backlight, an exponential list is a much better
> > approximation.
>
> Thanks for the hint, it never occurred to me that pwm duty cycle was not
> linear with brightness, but that makes sense. I'll give that a try (on
> 255 values instead of 10 to keep some level of precision in low
> brightness). The way to go here is probably use a base-255 logarithm
> such as: duty cycle = range * log(i+1)/log(255) with i the linear
> brightness value (0 to 255) and range the amplitude of our values (that
> gets divided by the maximum brightness, so it's really up to hardware
> precision at this point). I'll go with a range of 255 as well.
Without going into something so complicated, usually a list with power
of two ending at 255 is a good approximation :)
> > > +&mmc0 {
> > > + pinctrl-names = "default";
> > > + pinctrl-0 = <&mmc0_pins_a>;
> > > + vmmc-supply = <®_vcc3v3>;
> >
> > You have the regulators described in your DT, you'd better use them
> > instead of the one coming from sunxi-common-regulators.dtsi.
>
> Well, according to the reference A20 design, the mmc pins and the card
> are powered by the 3.3V power rail, that comes from a regular step-down
> regulator sourcing from IPSOUT, so I don't see what regulator I should
> better use. Do you have a suggestion?
That works for me then.
> > > +&pio {
> > > + panel_power_pin: panel_power_pin@0 {
> > > + pins = "PH8";
> > > + function = "gpio_out";
> > > + };
> > > +};
> >
> > You don't need that pinctrl node.
>
> I'll get rid of it then. You mentioned that regulator-simple uses the
> old GPIO API, so I assumed it meant that a pinctrl node is still needed.
> For reference, it uses of_get_named_gpio (not the devm-managed fashion).
This is only relevant for the polarity of the pins, not the pinctrl part.
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-05-08 13:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-06 21:48 [PATCH v3 1/3] drm/panel: Add RGB666 variant of Innolux AT070TN90 Paul Kocialkowski
2018-05-06 21:49 ` [PATCH v3 2/3] ARM: dts: sun7i: Add RGB666 pins definition Paul Kocialkowski
2018-05-06 21:49 ` [PATCH v3 3/3] ARM: dts: sun7i: Add support for the Ainol AW1 tablet Paul Kocialkowski
2018-05-07 7:19 ` Maxime Ripard
2018-05-07 20:15 ` Paul Kocialkowski
2018-05-08 13:28 ` Maxime Ripard [this message]
2018-05-07 7:08 ` [PATCH v3 1/3] drm/panel: Add RGB666 variant of Innolux AT070TN90 Maxime Ripard
2018-05-07 18:50 ` Paul Kocialkowski
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=20180508132851.cvthykob5mw6v6yy@flea \
--to=maxime.ripard@bootlin.com \
--cc=contact@paulk.fr \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=wens@csie.org \
--subject='Re: [PATCH v3 3/3] ARM: dts: sun7i: Add support for the Ainol AW1 tablet' \
/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
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).