* Re: [PATCH 2/3] OMAPDSS: panel-lgphilips-lb035q02: Add DT support
From: Florian Vaussard @ 2014-05-20 10:58 UTC (permalink / raw)
To: Tomi Valkeinen, linux-fbdev, linux-omap; +Cc: Archit Taneja
In-Reply-To: <1400148637-17726-3-git-send-email-tomi.valkeinen@ti.com>
Hi Tomi,
On 05/15/2014 12:10 PM, Tomi Valkeinen wrote:
> Add DT support for panel-lgphilips-lb035q02.
>
> We disable the use of the backlight_gpio as it should be handled via
> backlight framework with DT boots.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> .../omap2/displays-new/panel-lgphilips-lb035q02.c | 44 +++++++++++++++++++++-
> 1 file changed, 43 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/omap2/displays-new/panel-lgphilips-lb035q02.c b/drivers/video/fbdev/omap2/displays-new/panel-lgphilips-lb035q02.c
> index 6e6acd696a70..76c4fdc51c31 100644
> --- a/drivers/video/fbdev/omap2/displays-new/panel-lgphilips-lb035q02.c
> +++ b/drivers/video/fbdev/omap2/displays-new/panel-lgphilips-lb035q02.c
> @@ -159,7 +159,8 @@ static int lb035q02_enable(struct omap_dss_device *dssdev)
> if (omapdss_device_is_enabled(dssdev))
> return 0;
>
> - in->ops.dpi->set_data_lines(in, ddata->data_lines);
> + if (ddata->data_lines)
> + in->ops.dpi->set_data_lines(in, ddata->data_lines);
> in->ops.dpi->set_timings(in, &ddata->videomode);
>
> r = in->ops.dpi->enable(in);
> @@ -277,6 +278,35 @@ err_gpio:
> return r;
> }
>
> +static int lb035q02_probe_of(struct spi_device *spi)
> +{
> + struct device_node *node = spi->dev.of_node;
> + struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
> + struct omap_dss_device *in;
> + struct gpio_desc *gpio;
> +
> + gpio = devm_gpiod_get(&spi->dev, "enable");
> + if (IS_ERR(gpio)) {
> + dev_err(&spi->dev, "failed to parse enable gpio\n");
> + return PTR_ERR(gpio);
> + } else {
> + gpiod_direction_output(gpio, 0);
> + ddata->enable_gpio = gpio;
> + }
> +
> + ddata->backlight_gpio = -ENOENT;
> +
> + in = omapdss_of_find_source_for_first_ep(node);
> + if (IS_ERR(in)) {
> + dev_err(&spi->dev, "failed to find video source\n");
> + return PTR_ERR(in);
> + }
> +
> + ddata->in = in;
> +
> + return 0;
> +}
> +
> static int lb035q02_panel_spi_probe(struct spi_device *spi)
> {
> struct panel_drv_data *ddata;
> @@ -295,6 +325,10 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi)
> r = lb035q02_probe_pdata(spi);
> if (r)
> return r;
> + } else if (spi->dev.of_node) {
> + r = lb035q02_probe_of(spi);
> + if (r)
> + return r;
> } else {
> return -ENODEV;
> }
> @@ -346,6 +380,13 @@ static int lb035q02_panel_spi_remove(struct spi_device *spi)
> return 0;
> }
>
> +static const struct of_device_id lb035q02_of_match[] = {
> + { .compatible = "omapdss,lgphilips,lb035q02", },
> + {},
> +};
> +
> +MODULE_DEVICE_TABLE(of, lb035q02_of_match);
> +
> static struct spi_driver lb035q02_spi_driver = {
> .probe = lb035q02_panel_spi_probe,
> .remove = lb035q02_panel_spi_remove,
> @@ -357,6 +398,7 @@ static struct spi_driver lb035q02_spi_driver = {
>
.of_match_table = lb035q02_of_match,
is missing.
> module_spi_driver(lb035q02_spi_driver);
>
> +MODULE_ALIAS("spi:lgphilips,lb035q02");
> MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
> MODULE_DESCRIPTION("LG.Philips LB035Q02 LCD Panel driver");
> MODULE_LICENSE("GPL");
>
Regards,
Florian
^ permalink raw reply
* Re: [PATCH 3/3] Doc/DT: Add binding doc for lgphilips,lb035q02.txt
From: Florian Vaussard @ 2014-05-20 11:01 UTC (permalink / raw)
To: Tomi Valkeinen, linux-fbdev, linux-omap; +Cc: Archit Taneja, devicetree
In-Reply-To: <1400148637-17726-4-git-send-email-tomi.valkeinen@ti.com>
Hi Tomi,
On 05/15/2014 12:10 PM, Tomi Valkeinen wrote:
> Add DT bindings documentation for LG.Philips LB035Q02 LCD panel.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: devicetree@vger.kernel.org
> ---
> .../bindings/video/lgphilips,lb035q02.txt | 33 ++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt
>
> diff --git a/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt b/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt
> new file mode 100644
> index 000000000000..1a1e653e5407
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt
> @@ -0,0 +1,33 @@
> +LG.Philips LB035Q02 Panel
> +============> +
> +Required properties:
> +- compatible: "lgphilips,lb035q02"
> +- enable-gpios: panel enable gpio
> +
> +Optional properties:
> +- label: a symbolic name for the panel
> +
> +Required nodes:
> +- Video port for DPI input
> +
> +Example
> +-------
> +
> +lcd-panel: panel@0 {
> + compatible = "lgphilips,lb035q02";
> + reg = <0>;
> + spi-max-frequency = <100000>;
> + spi-cpol;
> + spi-cpha;
> +
> + label = "lcd";
> +
> + enable-gpios = <&gpio7 7 0>;
> +
> + port {
> + lcd_in: endpoint {
> + remote-endpoint = <&dpi_out>;
> + };
> + };
> +};
>
The lcd-panel should be a child node of a SPI controller. Maybe this
could be mentioned? Or the example could be more explicit, like:
&mcspi1 {
lcd-panel: panel@0 {
....
};
};
Regards,
Florian
^ permalink raw reply
* Re: [PATCH 0/3] OMAPDSS: DT support for panel-lgphilips-lb035q02
From: Florian Vaussard @ 2014-05-20 11:04 UTC (permalink / raw)
To: Tomi Valkeinen, linux-fbdev, linux-omap; +Cc: Archit Taneja
In-Reply-To: <1400148637-17726-1-git-send-email-tomi.valkeinen@ti.com>
Hi Tomi,
On 05/15/2014 12:10 PM, Tomi Valkeinen wrote:
> Hi,
>
> This adds DT support to panel-lgphilips-lb035q02. Compile tested only.
>
> This panel is used on some Overo boards (alto35, if I'm not mistaken).
>
I tested with the Alto35. Using the small fix for patch 2, I was able to
use the panel. I will post the related DTS changes soon.
Tested-by: Florian Vaussard <florian.vaussard@epfl.ch>
> Tomi
>
> Tomi Valkeinen (3):
> OMAPDSS: panel-lgphilips-lb035q02: use gpiod for enable gpio
> OMAPDSS: panel-lgphilips-lb035q02: Add DT support
> Doc/DT: Add binding doc for lgphilips,lb035q02.txt
>
> .../bindings/video/lgphilips,lb035q02.txt | 33 ++++++++++
> .../omap2/displays-new/panel-lgphilips-lb035q02.c | 76 +++++++++++++++++-----
> 2 files changed, 94 insertions(+), 15 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt
>
^ permalink raw reply
* Re: [PATCH 2/3] OMAPDSS: panel-lgphilips-lb035q02: Add DT support
From: Tomi Valkeinen @ 2014-05-20 11:36 UTC (permalink / raw)
To: florian.vaussard, linux-fbdev, linux-omap; +Cc: Archit Taneja
In-Reply-To: <537B3543.2040906@epfl.ch>
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
On 20/05/14 13:58, Florian Vaussard wrote:
>> static struct spi_driver lb035q02_spi_driver = {
>> .probe = lb035q02_panel_spi_probe,
>> .remove = lb035q02_panel_spi_remove,
>> @@ -357,6 +398,7 @@ static struct spi_driver lb035q02_spi_driver = {
>>
>
> .of_match_table = lb035q02_of_match,
>
> is missing.
Thanks. I seem to have missed it with the other panels also in the
patches I sent last week.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCHv2 resend 00/11] improve PWM lookup support without device tree
From: Philipp Zabel @ 2014-05-20 17:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1400532162-29483-1-git-send-email-alexandre.belloni@free-electrons.com>
Hi Alexandre,
On Mon, May 19, 2014 at 10:42 PM, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> Hi,
>
> Originally sent on Apr 14th, note that this series is blocking another 16
> patches series, I would like it to be taken in 3.16 if we can agree on this
> implementation.
>
> A patch set as suggested by Thierry to make lookup with the lookup table
> instead of device tree behave more like when using device tree.
>
> The first patch adds a period and a polarity member to the lookup table and use
> those to set period and polarity.
>
> Patch 2, 4 and 5 are making use of those new members from the board files.
> Patch 3 removes useless code since setting the polarity is now handled by the
> PWM core.
>
> I couldn't decide on a good name for the extended PWM_LOOKUP macro and I believe
> we won't have to add members to that structure soon so:
> Patch 6 modifies the PWM_LOOKUP macro to also initialize period and polarity
> and
> Patch 7-9 are making use of the new PWM_LOOKUP macro in the board files
>
> Patch 10 and 11 are making the leds-pwm and pwm_bl drivers get the period from
> the PWM before using pwm_period_ns if it is not already set.
>
> Patch 10 will obviously conflict with the series of Russell reworking the
> leds-pwm probing. I can rebase if necessary
>
> The final goal would be to get rid of .pwm_period_ns in leds-pwm and pwm_bl
> after moving all the remaining users (still around 25) to pwm_lookup.
>
> Changes in v2:
> - correctly unlock the pwm_lookup_lock mutex before returning.
> - don't change PWM_LOOKUP atomically
> - remove tpu_pwm_platform_data and the associated header file
> - make the leds-pwm and pwm_bl drivers get the period from the PWM
>
> Alexandre Belloni (11):
> pwm: add period and polarity to struct pwm_lookup
> ARM: shmobile: Armadillo 800 EVA: initialize all struct pwm_lookup
> members
> pwm: renesas-tpu: remove useless struct tpu_pwm_platform_data
> ARM: OMAP3: Beagle: initialize all the struct pwm_lookup members
> ARM: pxa: hx4700: initialize all the struct pwm_lookup members
> pwm: modify PWM_LOOKUP to initialize all struct pwm_lookup members
> ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
> ARM: shmobile: Armadillo 800 EVA: use PWM_LOOKUP to initialize struct
> pwm_lookup
> ARM: pxa: hx4700: use PWM_LOOKUP to initialize struct pwm_lookup
> leds: leds-pwm: retrieve configured pwm period
> backlight: pwm_bl: retrieve configured pwm period
For the hx4700 patches (5 an 9),
Acked-by: Philipp Zabel <philipp.zabel@gmail.com>
regards
Philipp
^ permalink raw reply
* Re: [PATCH 3/4] OMAPDSS: panel-sharp-ls037v7dw01: add device tree support
From: Sebastian Reichel @ 2014-05-20 21:10 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140520054852.GA12384@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 3156 bytes --]
On Mon, May 19, 2014 at 10:48:52PM -0700, Tony Lindgren wrote:
> * Sebastian Reichel <sre@kernel.org> [140519 22:13]:
> > On Mon, May 19, 2014 at 10:05:15PM +0300, Tomi Valkeinen wrote:
> > > On 19/05/14 19:04, Tony Lindgren wrote:
> > >
> > > > In many cases however we do have multiple compatible strings that
> > > > describe how the device is wired. See drivers/tty/serial/of_serial.c
> > > > for example. It has "ns16550" but then it also has additional
> > > > "nvidia,tegra20-uart", "nxp,lpc3220-uart" and "ibm,qpace-nwp-serial".
> > >
> > > All those sound like SoC components. In that case it sounds fine to have
> > > the device compatible contain the SoC name. We're talking here about
> > > external, detachable devices.
>
> Yes I agree it's also hackish. But playing with the compatible flags
> avoids adding other custom workarounds.
>
> > > >>> Not use what you're after with the SPI example though, but sounds
> > > >>> like that's something different.
> > > >>
> > > >> I think Sebastien's example is just like the issue here.
> > > >
> > > > Hmm is there some existing example in the kernel like that?
> > >
> > > No, Sebastien's example was just a hypothetical case. Here, using your
> > > way of having SoC specific data in the .dts, we would have
> > > "sharp,ls037v7dw01-omap-dss", and in Sebastien's example with a touch
> > > sensor we'd have, say, "synaptics,xyz123-omap-spi".
> >
> > Yes, that's what I wanted to say :)
>
> Hmm I think we need to add few things to the hypothetical SPI case
> to get it even close to the panel example. Like assume that no SPI bus
> exists, [...]
The important thing is not, that there is an SPI bus (hardware), but
that there is a common SPI client framework (software). That's one
of the problem's I see with the modified compatible value.
Basically I see the following problem with the appended -omapdss in
the compatible string:
* You can read the -omapdss as "to be used with omapdss driver". In
this case the compatible string is just needed for driver loading,
which is frowned upon DT binding maintainers AFAIK.
* Alternatively one can read it as "connected to omapdss". In this
case we add unneeded redundancy to the DT. This does not belong
into a compatible string, since its encoded in the DT hierarchy.
And btw. Tomi's rewrite hack basically works exactly like this, just
without adding the redundancy explicitly into the DT. Instead of
prefixing the comaptible string he could also add a -omapdss sufix.
That's basically a proof, that the suffix adds useless redudancy.
> [...] and that potentially multiple different Synaptics drivers are
> trying to share the same compatible flag for a non-existing generic
> binding.
If there was no common SPI client framework you would need two
different SPI client drivers for two different SPI host controllers.
Obviously its a bad idea to have no SPI framework, but that's not
important for the example (except that there should obviously be a
common panel framework) :)
> I think then it's getting close to the panel example :)
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* [PATCH] video: fbdev: grvga.c: Fix for possible null pointer dereference
From: Rickard Strandqvist @ 2014-05-20 21:35 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Rickard Strandqvist, Grant Likely, Rob Herring, Sachin Kamat,
Jingoo Han, Daniel Vetter, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/video/fbdev/grvga.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/grvga.c b/drivers/video/fbdev/grvga.c
index c078701..2db5bb1 100644
--- a/drivers/video/fbdev/grvga.c
+++ b/drivers/video/fbdev/grvga.c
@@ -514,9 +514,10 @@ free_fb:
static int grvga_remove(struct platform_device *device)
{
struct fb_info *info = dev_get_drvdata(&device->dev);
- struct grvga_par *par = info->par;
+ struct grvga_par *par;
if (info) {
+ par = info->par;
unregister_framebuffer(info);
fb_dealloc_cmap(&info->cmap);
--
1.7.10.4
^ permalink raw reply related
* [PATCH] video: fbdev: s3fb.c: Fix for possible null pointer dereference
From: Rickard Strandqvist @ 2014-05-20 21:37 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Rickard Strandqvist, Jingoo Han, Daniel Vetter, Wei Yongjun,
Bjorn Helgaas, Joe Perches, linux-fbdev, linux-kernel
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/video/fbdev/s3fb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/s3fb.c b/drivers/video/fbdev/s3fb.c
index 9a3f8f1..c43b969 100644
--- a/drivers/video/fbdev/s3fb.c
+++ b/drivers/video/fbdev/s3fb.c
@@ -1401,9 +1401,10 @@ err_enable_device:
static void s3_pci_remove(struct pci_dev *dev)
{
struct fb_info *info = pci_get_drvdata(dev);
- struct s3fb_info __maybe_unused *par = info->par;
+ struct s3fb_info __maybe_unused *par;
if (info) {
+ par = info->par;
#ifdef CONFIG_MTRR
if (par->mtrr_reg >= 0) {
--
1.7.10.4
^ permalink raw reply related
* [PATCH] drivers/video/fbdev/fb-puv3.c: Add header files for function unifb_mmap
From: sunzc522 @ 2014-05-21 6:13 UTC (permalink / raw)
To: linux-kernel
Cc: gxt, gang.chen.5i5j, Zhichuang SUN,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
Daniel Vetter, Joe Perches, Laurent Pinchart, linux-fbdev
From: Zhichuang SUN <sunzc522@gmail.com>
Function unifb_mmap calls functions which are defined in linux/mm.h
and asm/pgtable.h
The related error (for unicore32 with unicore32_defconfig):
CC drivers/video/fbdev/fb-puv3.o
drivers/video/fbdev/fb-puv3.c: In function 'unifb_mmap':
drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
function 'vm_iomap_memory'
drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
function 'pgprot_noncached'
Signed-off-by: Zhichuang Sun <sunzc522@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joe Perches <joe@perches.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-fbdev@vger.kernel.org
---
drivers/video/fbdev/fb-puv3.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/video/fbdev/fb-puv3.c b/drivers/video/fbdev/fb-puv3.c
index 6db9ebd..88fa2e7 100644
--- a/drivers/video/fbdev/fb-puv3.c
+++ b/drivers/video/fbdev/fb-puv3.c
@@ -18,8 +18,10 @@
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/console.h>
+#include <linux/mm.h>
#include <asm/sizes.h>
+#include <asm/pgtable.h>
#include <mach/hardware.h>
/* Platform_data reserved for unifb registers. */
--
1.7.0.4
^ permalink raw reply related
* =?gbk?B?UmU6IFtQQVRDSF0gZHJpdmVycy92aWRlby9mYmRldi9mYi1wdXYzLmM6IEFkZCBoZWFkZXIgZmlsZXMgZm9yDQogZnVu
From: 管雪涛 @ 2014-05-21 7:04 UTC (permalink / raw)
To: sunzc522
Cc: linux-kernel, gxt, gang chen 5i5j,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
Daniel Vetter, Joe Perches, Laurent Pinchart, linux-fbdev
In-Reply-To: <1400652811-5206-1-git-send-email-sunzc522@gmail.com>
Thanks.
Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
----- sunzc522@gmail.com 写道:
> From: Zhichuang SUN <sunzc522@gmail.com>
>
> Function unifb_mmap calls functions which are defined in linux/mm.h
> and asm/pgtable.h
>
> The related error (for unicore32 with unicore32_defconfig):
> CC drivers/video/fbdev/fb-puv3.o
> drivers/video/fbdev/fb-puv3.c: In function 'unifb_mmap':
> drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
> function 'vm_iomap_memory'
> drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
> function 'pgprot_noncached'
>
> Signed-off-by: Zhichuang Sun <sunzc522@gmail.com>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Jingoo Han <jg1.han@samsung.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Joe Perches <joe@perches.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: linux-fbdev@vger.kernel.org
> ---
> drivers/video/fbdev/fb-puv3.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/fbdev/fb-puv3.c b/drivers/video/fbdev/fb-puv3.c
> index 6db9ebd..88fa2e7 100644
> --- a/drivers/video/fbdev/fb-puv3.c
> +++ b/drivers/video/fbdev/fb-puv3.c
> @@ -18,8 +18,10 @@
> #include <linux/fb.h>
> #include <linux/init.h>
> #include <linux/console.h>
> +#include <linux/mm.h>
>
> #include <asm/sizes.h>
> +#include <asm/pgtable.h>
> #include <mach/hardware.h>
>
> /* Platform_data reserved for unifb registers. */
> --
> 1.7.0.4
>
^ permalink raw reply
* Re: [PATCHv2 resend 00/11] improve PWM lookup support without device tree
From: Thierry Reding @ 2014-05-21 9:16 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1400532162-29483-1-git-send-email-alexandre.belloni@free-electrons.com>
[-- Attachment #1: Type: text/plain, Size: 3483 bytes --]
On Mon, May 19, 2014 at 10:42:31PM +0200, Alexandre Belloni wrote:
> Hi,
>
> Originally sent on Apr 14th, note that this series is blocking another 16
> patches series, I would like it to be taken in 3.16 if we can agree on this
> implementation.
>
> A patch set as suggested by Thierry to make lookup with the lookup table
> instead of device tree behave more like when using device tree.
>
> The first patch adds a period and a polarity member to the lookup table and use
> those to set period and polarity.
>
> Patch 2, 4 and 5 are making use of those new members from the board files.
> Patch 3 removes useless code since setting the polarity is now handled by the
> PWM core.
>
> I couldn't decide on a good name for the extended PWM_LOOKUP macro and I believe
> we won't have to add members to that structure soon so:
> Patch 6 modifies the PWM_LOOKUP macro to also initialize period and polarity
> and
> Patch 7-9 are making use of the new PWM_LOOKUP macro in the board files
>
> Patch 10 and 11 are making the leds-pwm and pwm_bl drivers get the period from
> the PWM before using pwm_period_ns if it is not already set.
>
> Patch 10 will obviously conflict with the series of Russell reworking the
> leds-pwm probing. I can rebase if necessary
>
> The final goal would be to get rid of .pwm_period_ns in leds-pwm and pwm_bl
> after moving all the remaining users (still around 25) to pwm_lookup.
>
> Changes in v2:
> - correctly unlock the pwm_lookup_lock mutex before returning.
> - don't change PWM_LOOKUP atomically
> - remove tpu_pwm_platform_data and the associated header file
> - make the leds-pwm and pwm_bl drivers get the period from the PWM
>
> Alexandre Belloni (11):
> pwm: add period and polarity to struct pwm_lookup
> ARM: shmobile: Armadillo 800 EVA: initialize all struct pwm_lookup
> members
> pwm: renesas-tpu: remove useless struct tpu_pwm_platform_data
> ARM: OMAP3: Beagle: initialize all the struct pwm_lookup members
> ARM: pxa: hx4700: initialize all the struct pwm_lookup members
> pwm: modify PWM_LOOKUP to initialize all struct pwm_lookup members
> ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
> ARM: shmobile: Armadillo 800 EVA: use PWM_LOOKUP to initialize struct
> pwm_lookup
> ARM: pxa: hx4700: use PWM_LOOKUP to initialize struct pwm_lookup
> leds: leds-pwm: retrieve configured pwm period
> backlight: pwm_bl: retrieve configured pwm period
>
> Documentation/pwm.txt | 3 ++-
> arch/arm/mach-omap2/board-omap3beagle.c | 3 ++-
> arch/arm/mach-pxa/hx4700.c | 3 ++-
> arch/arm/mach-shmobile/board-armadillo800eva.c | 14 +++-----------
> drivers/leds/leds-pwm.c | 5 ++++-
> drivers/pwm/core.c | 8 +++++++-
> drivers/pwm/pwm-renesas-tpu.c | 19 +++----------------
> drivers/video/backlight/pwm_bl.c | 8 +++++---
> include/linux/platform_data/pwm-renesas-tpu.h | 16 ----------------
> include/linux/pwm.h | 6 +++++-
> 10 files changed, 33 insertions(+), 52 deletions(-)
> delete mode 100644 include/linux/platform_data/pwm-renesas-tpu.h
I've applied this whole series with some minor fixups (mostly adding
detail to commit messages). Test builds show no breakage, so I've pushed
this to the for-next branch.
Thanks,
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp
From: Tomi Valkeinen @ 2014-05-21 12:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140513213205.GB18001@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
On 14/05/14 00:32, Tony Lindgren wrote:
> +&dss {
> + status = "ok";
> + vdds_dsi-supply = <&vpll2>;
> + port {
> + dpi_out: endpoint {
> + remote-endpoint = <&lcd_in>;
> + data-lines = <18>;
> + };
> + };
> +};
I just noticed the vdds_dsi-supply there. While the driver currently
uses that if available, I think it should be removed, and done the same
way Florian did with his overo patches:
/* Needed to power the DPI pins */
&vpll2 {
regulator-always-on;
};
That supply is not DSS's supply, but it's used to power up the pins. If
the pins were used as GPIOs, that power should be enabled.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH 3/4] OMAPDSS: panel-sharp-ls037v7dw01: add device tree support
From: Tomi Valkeinen @ 2014-05-21 13:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140519195100.GB11945@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 2423 bytes --]
On 19/05/14 22:51, Tony Lindgren wrote:
>>> 4. Having this hack limited to device tree based booting while we are
>>> trying to unify the functions for drivers to use to get their
>>> resources.
>>
>> I don't understand this one. With non-DT boot we don't have the issue at
>> all, there's no need for hacks.
>
> Hmm can't we still have multiarch booting happening with the same
> panel name being used by two different display drivers?
Yes, but in that case the driver names are internal to kernel. You can
append "omapdss" or such to the driver name, and have that name used in
the board file and in the driver. It's not visible outside the kernel,
and when there's a common display framework, it can be changed without
anyone knowing.
With DT we have the old, stable .dts files that need to be supported...
>>> 5. Seeing the possibility of this spreading to other drivers.
>>
>> Well, until we have a common display framework, one of the hacky options
>> we've discussed will spread to other drivers if they need to have their
>> own drivers for the same hardware devices.
>>
>> Which is not nice, but not something we can escape. And using the
>> of_machine_is_compatible or having the compatible strings in .dts
>> appended with "dss" or such doesn't change that, it just changes which
>> hack may spread.
>
> Yes I agree they are all hacks, but your version seems to carry some
> extra early init baggage with it as I noted above :)
True, but it doesn't feel very big baggage to me. We can bail out
immediately if the machine is not omap, so for non-omap's the effect
should be negligible.
For omap there is some extra stuff being done. I don't really know heavy
it is, performance wise, but the operation itself is quite small.
I'll try and see how the other options work, which are:
- Bailing out from module_init in each display driver. The reason I
don't like this (although I haven't tried it) is that all the display
drivers need the modification, and because I need to catch the
module_init, I cannot use the helpers like module_platform_driver(), so
it adds multiple lines to every driver.
- Traveling the video graph, starting from omapdss. This one is possibly
better performance-wise than my original version, as we only need to
search for the omapdss node and can then follow the links. But the code
will be more complex.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* [PATCH resend 0/4] Make video.use_native_backlight=1 work properly with nouveau
From: Hans de Goede @ 2014-05-21 13:39 UTC (permalink / raw)
To: Rafael J. Wysocki, Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie
Cc: Zhang Rui, Len Brown, linux-acpi, linux-fbdev, dri-devel
Hi All,
I know it has not been that long since the last send of this series, but
it has been very quiet, and I would like to see some discussion on it
(or it being applied at once, that is fine too :)
This patch-set adds backlight device (un)registration notification and
makes acpi-video listen to it, so that video.use_native_backlight=1 still
works if a raw interface gets loaded *after* acpi-video has been initialized.
It also changes nouveau to always register its raw interface, as all the other
kms drivers do, acpi_video_backlight_support() is only intended to avoid the
loading of multiple (possibly conflicting) firmware drivers, not to avoid
loading raw drivers.
In the mean time I've gotten feedback from a user with a laptop which needs
video.use_native_backlight=1 and uses nouveau, and he has confirmed that this
patch-set works as advertised, see:
https://bugzilla.redhat.com/show_bug.cgi?id\x1093171
Regards,
Hans
^ permalink raw reply
* [PATCH resend 1/4] nouveau: Don't check acpi_video_backlight_support() before registering backlight
From: Hans de Goede @ 2014-05-21 13:39 UTC (permalink / raw)
To: Rafael J. Wysocki, Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie
Cc: Zhang Rui, Len Brown, linux-acpi, linux-fbdev, dri-devel,
Hans de Goede
In-Reply-To: <1400679596-19663-1-git-send-email-hdegoede@redhat.com>
acpi_video_backlight_support() is supposed to be called by other (vendor
specific) firmware backlight controls, not by native / raw backlight controls
like nv_backlight.
Userspace will normally prefer firmware interfaces over raw interfaces, so
if acpi_video backlight support is present it will use that even if
nv_backlight is registered as well.
Except when video.use_native_backlight is present on the kernel cmdline
(or enabled through a dmi based quirk). As the name indicates the goal here
is to make only the raw interface available to userspace so that it will use
that (it only does this when it sees a win8 compliant bios).
This is done by:
1) Not registering any acpi_video# backlight devices; and
2) Making acpi_video_backlight_support() return true so that other firmware
drivers, ie acer_wmi, thinkpad_acpi, dell_laptop, etc. Don't register their
own vender specific interfaces.
Currently nouveau breaks this setup, as when acpi_video_backlight_support()
returns true, it does not register itself, resulting in no backlight control
at all.
This is esp. going to be a problem with 3.16 which will default to
video.use_native_backlight=1, and thus nouveau based laptops with a win8 bios
will get no backlight control at all.
This also likely explains why the previous attempt to make
video.use_native_backlight=1 the default was not a success, as without this
patch having a default of video.use_native_backlight=1 will cause regressions.
Note this effectively reverts commit 5bead799
Also see: https://bugzilla.redhat.com/show_bug.cgi?id\x1093171
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 630f6e8..2c1e4aa 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -31,7 +31,6 @@
*/
#include <linux/backlight.h>
-#include <linux/acpi.h>
#include "nouveau_drm.h"
#include "nouveau_reg.h"
@@ -222,14 +221,6 @@ nouveau_backlight_init(struct drm_device *dev)
struct nouveau_device *device = nv_device(drm->device);
struct drm_connector *connector;
-#ifdef CONFIG_ACPI
- if (acpi_video_backlight_support()) {
- NV_INFO(drm, "ACPI backlight interface available, "
- "not registering our own\n");
- return 0;
- }
-#endif
-
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
connector->connector_type != DRM_MODE_CONNECTOR_eDP)
--
1.9.0
^ permalink raw reply related
* [PATCH resend 2/4] backlight: Add backlight device (un)registration notification
From: Hans de Goede @ 2014-05-21 13:39 UTC (permalink / raw)
To: Rafael J. Wysocki, Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie
Cc: Zhang Rui, Len Brown, linux-acpi, linux-fbdev, dri-devel,
Hans de Goede
In-Reply-To: <1400679596-19663-1-git-send-email-hdegoede@redhat.com>
Some firmware drivers, ie acpi-video want to get themselves out of the
way (in some cases) when their also is a raw backlight device available.
Due to module loading ordering being unknown, acpi-video cannot be certain
that the backlight_device_registered(BACKLIGHT_RAW) it does for this is
the final verdict wrt there being a BACKLIGHT_RAW device.
By adding notification acpi-video can listen for backlight devices showing
up after it has loaded, and unregister its backlight device if desired.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/video/backlight/backlight.c | 40 +++++++++++++++++++++++++++++++++++++
include/linux/backlight.h | 7 +++++++
2 files changed, 47 insertions(+)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index bd2172c..4280890 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -23,6 +23,7 @@
static struct list_head backlight_dev_list;
static struct mutex backlight_dev_list_mutex;
+static struct blocking_notifier_head backlight_notifier;
static const char *const backlight_types[] = {
[BACKLIGHT_RAW] = "raw",
@@ -370,6 +371,9 @@ struct backlight_device *backlight_device_register(const char *name,
list_add(&new_bd->entry, &backlight_dev_list);
mutex_unlock(&backlight_dev_list_mutex);
+ blocking_notifier_call_chain(&backlight_notifier,
+ BACKLIGHT_REGISTERED, new_bd);
+
return new_bd;
}
EXPORT_SYMBOL(backlight_device_register);
@@ -413,6 +417,10 @@ void backlight_device_unregister(struct backlight_device *bd)
pmac_backlight = NULL;
mutex_unlock(&pmac_backlight_mutex);
#endif
+
+ blocking_notifier_call_chain(&backlight_notifier,
+ BACKLIGHT_UNREGISTERED, bd);
+
mutex_lock(&bd->ops_lock);
bd->ops = NULL;
mutex_unlock(&bd->ops_lock);
@@ -438,6 +446,36 @@ static int devm_backlight_device_match(struct device *dev, void *res,
}
/**
+ * backlight_register_notifier - get notified of backlight (un)registration
+ * @nb: notifier block with the notifier to call on backlight (un)registration
+ *
+ * @return 0 on success, otherwise a negative error code
+ *
+ * Register a notifier to get notified when backlight devices get registered
+ * or unregistered.
+ */
+int backlight_register_notifier(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_register(&backlight_notifier, nb);
+}
+EXPORT_SYMBOL(backlight_register_notifier);
+
+/**
+ * backlight_unregister_notifier - unregister a backlight notifier
+ * @nb: notifier block to unregister
+ *
+ * @return 0 on success, otherwise a negative error code
+ *
+ * Register a notifier to get notified when backlight devices get registered
+ * or unregistered.
+ */
+int backlight_unregister_notifier(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_unregister(&backlight_notifier, nb);
+}
+EXPORT_SYMBOL(backlight_unregister_notifier);
+
+/**
* devm_backlight_device_register - resource managed backlight_device_register()
* @dev: the device to register
* @name: the name of the device
@@ -544,6 +582,8 @@ static int __init backlight_class_init(void)
backlight_class->pm = &backlight_class_dev_pm_ops;
INIT_LIST_HEAD(&backlight_dev_list);
mutex_init(&backlight_dev_list_mutex);
+ BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier);
+
return 0;
}
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index 7264742..adb14a8 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -40,6 +40,11 @@ enum backlight_type {
BACKLIGHT_TYPE_MAX,
};
+enum backlight_notification {
+ BACKLIGHT_REGISTERED,
+ BACKLIGHT_UNREGISTERED,
+};
+
struct backlight_device;
struct fb_info;
@@ -133,6 +138,8 @@ extern void devm_backlight_device_unregister(struct device *dev,
extern void backlight_force_update(struct backlight_device *bd,
enum backlight_update_reason reason);
extern bool backlight_device_registered(enum backlight_type type);
+extern int backlight_register_notifier(struct notifier_block *nb);
+extern int backlight_unregister_notifier(struct notifier_block *nb);
#define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)
--
1.9.0
^ permalink raw reply related
* [PATCH resend 3/4] acpi-video: Unregister the backlight device if a raw one shows up later
From: Hans de Goede @ 2014-05-21 13:39 UTC (permalink / raw)
To: Rafael J. Wysocki, Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie
Cc: Zhang Rui, Len Brown, linux-acpi, linux-fbdev, dri-devel,
Hans de Goede
In-Reply-To: <1400679596-19663-1-git-send-email-hdegoede@redhat.com>
When video.use_native_backlight=1 and non intel gfx are in use, the raw
backlight device of the gfx driver will show up after acpi-video has done its
acpi_video_verify_backlight_support() check.
This causes video.use_native_backlight=1 to not have the desired result.
This patch fixes this by adding a backlight notifier and when a raw
backlight is registered or unregistered re-doing the
acpi_video_verify_backlight_support() check.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/acpi/video.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index ba6e4d7..47b7e21 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -151,6 +151,7 @@ struct acpi_video_enumerated_device {
struct acpi_video_bus {
struct acpi_device *device;
bool backlight_registered;
+ bool backlight_notifier_registered;
u8 dos_setting;
struct acpi_video_enumerated_device *attached_array;
u8 attached_count;
@@ -162,6 +163,7 @@ struct acpi_video_bus {
struct input_dev *input;
char phys[32]; /* for input device */
struct notifier_block pm_nb;
+ struct notifier_block backlight_nb;
};
struct acpi_video_device_flags {
@@ -1828,6 +1830,9 @@ static int acpi_video_bus_register_backlight(struct acpi_video_bus *video)
{
struct acpi_video_device *dev;
+ if (video->backlight_registered)
+ return 0;
+
if (!acpi_video_verify_backlight_support())
return 0;
@@ -1972,6 +1977,56 @@ static void acpi_video_bus_remove_notify_handler(struct acpi_video_bus *video)
video->input = NULL;
}
+static int acpi_video_backlight_notify(struct notifier_block *nb,
+ unsigned long val, void *bd)
+{
+ struct backlight_device *backlight = bd;
+ struct acpi_video_bus *video;
+
+ /* acpi_video_verify_backlight_support only cares about raw devices */
+ if (backlight->props.type != BACKLIGHT_RAW)
+ return NOTIFY_DONE;
+
+ video = container_of(nb, struct acpi_video_bus, backlight_nb);
+
+ switch (val) {
+ case BACKLIGHT_REGISTERED:
+ if (!acpi_video_verify_backlight_support())
+ acpi_video_bus_unregister_backlight(video);
+ break;
+ case BACKLIGHT_UNREGISTERED:
+ acpi_video_bus_register_backlight(video);
+ break;
+ }
+
+ return NOTIFY_OK;
+}
+
+static int acpi_video_bus_add_backlight_notify_handler(
+ struct acpi_video_bus *video)
+{
+ int error;
+
+ video->backlight_nb.notifier_call = acpi_video_backlight_notify;
+ video->backlight_nb.priority = 0;
+ error = backlight_register_notifier(&video->backlight_nb);
+ if (error = 0)
+ video->backlight_notifier_registered = true;
+
+ return error;
+}
+
+static int acpi_video_bus_remove_backlight_notify_handler(
+ struct acpi_video_bus *video)
+{
+ if (!video->backlight_notifier_registered)
+ return 0;
+
+ video->backlight_notifier_registered = false;
+
+ return backlight_unregister_notifier(&video->backlight_nb);
+}
+
static int acpi_video_bus_put_devices(struct acpi_video_bus *video)
{
struct acpi_video_device *dev, *next;
@@ -2053,6 +2108,7 @@ static int acpi_video_bus_add(struct acpi_device *device)
acpi_video_bus_register_backlight(video);
acpi_video_bus_add_notify_handler(video);
+ acpi_video_bus_add_backlight_notify_handler(video);
return 0;
@@ -2076,6 +2132,7 @@ static int acpi_video_bus_remove(struct acpi_device *device)
video = acpi_driver_data(device);
+ acpi_video_bus_remove_backlight_notify_handler(video);
acpi_video_bus_remove_notify_handler(video);
acpi_video_bus_unregister_backlight(video);
acpi_video_bus_put_devices(video);
--
1.9.0
^ permalink raw reply related
* [PATCH resend 4/4] acpi-video: Add use native backlight quirk for the ThinkPad W530
From: Hans de Goede @ 2014-05-21 13:39 UTC (permalink / raw)
To: Rafael J. Wysocki, Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie
Cc: Zhang Rui, Len Brown, linux-acpi, linux-fbdev, dri-devel,
Hans de Goede, stable
In-Reply-To: <1400679596-19663-1-git-send-email-hdegoede@redhat.com>
Like all of the other *30 ThinkPad models, the W530 has a broken acpi-video
backlight control. Note in order for this to actually fix things on the
ThinkPad W530 the commit titled:
"nouveau: Don't check acpi_video_backlight_support() before registering backlight"
is also needed.
https://bugzilla.redhat.com/show_bug.cgi?id\x1093171
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/acpi/video.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 47b7e21..8309100 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -515,6 +515,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
},
},
{
+ .callback = video_set_use_native_backlight,
+ .ident = "ThinkPad W530",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W530"),
+ },
+ },
+ {
.callback = video_set_use_native_backlight,
.ident = "ThinkPad X1 Carbon",
.matches = {
--
1.9.0
^ permalink raw reply related
* Re: [PATCH 3/4] OMAPDSS: panel-sharp-ls037v7dw01: add device tree support
From: Sebastian Reichel @ 2014-05-21 14:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <537CA4B4.2040001@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]
Hi,
On Wed, May 21, 2014 at 04:05:56PM +0300, Tomi Valkeinen wrote:
> I'll try and see how the other options work, which are:
>
> - Bailing out from module_init in each display driver. The reason I
> don't like this (although I haven't tried it) is that all the display
> drivers need the modification, and because I need to catch the
> module_init, I cannot use the helpers like module_platform_driver(), so
> it adds multiple lines to every driver.
You could create your own omapdss_driver() define for that.
This can be replaced more simply once no longer needed and
creates less bloat.
I see one more disadvantage for this approach:
assumed situation (some future 3.16+x kernel):
* The kernel has an common display framework (CDF)
* The kernel has an panel driver using CDF
* There also exists omapdss driver for the same panel
* omapdss does not (yet) adopt CDF
* CDF and omapdss are enabled in .config
* Kernel is booted from an OMAP system
This would result in both drivers being loaded using the same
DT compatible string. The same scenario works using the rewriting
method, since the common display framework would only see the
rewritten compatible string.
Of course this scenario only happens when omapdss is not adopted
to the common display framework from the start on.
> - Traveling the video graph, starting from omapdss. This one is possibly
> better performance-wise than my original version, as we only need to
> search for the omapdss node and can then follow the links. But the code
> will be more complex.
I think the main advantage is the missing lookup table/whitelist,
which adds redundancy. Not having it has some advantages:
* new drivers don't need to touch any existing files (making
rebasing etc. easier)
* table can get out of sync (though that shouldn't happen anyway,
since the binding is supposed to be stable)
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH 4/4] ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp
From: Tony Lindgren @ 2014-05-21 14:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <537C9FC6.8020104@ti.com>
* Tomi Valkeinen <tomi.valkeinen@ti.com> [140521 05:45]:
> On 14/05/14 00:32, Tony Lindgren wrote:
>
> > +&dss {
> > + status = "ok";
> > + vdds_dsi-supply = <&vpll2>;
> > + port {
> > + dpi_out: endpoint {
> > + remote-endpoint = <&lcd_in>;
> > + data-lines = <18>;
> > + };
> > + };
> > +};
>
> I just noticed the vdds_dsi-supply there. While the driver currently
> uses that if available, I think it should be removed, and done the same
> way Florian did with his overo patches:
>
> /* Needed to power the DPI pins */
> &vpll2 {
> regulator-always-on;
> };
>
> That supply is not DSS's supply, but it's used to power up the pins. If
> the pins were used as GPIOs, that power should be enabled.
OK thanks for catching it.
Regards,
Tony
^ permalink raw reply
* Re: [PATCH resend 1/4] nouveau: Don't check acpi_video_backlight_support() before registering backli
From: Rafael J. Wysocki @ 2014-05-21 23:30 UTC (permalink / raw)
To: Hans de Goede
Cc: Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie, Zhang Rui, Len Brown, linux-acpi, linux-fbdev,
dri-devel
In-Reply-To: <1400679596-19663-2-git-send-email-hdegoede@redhat.com>
On Wednesday, May 21, 2014 03:39:53 PM Hans de Goede wrote:
> acpi_video_backlight_support() is supposed to be called by other (vendor
> specific) firmware backlight controls, not by native / raw backlight controls
> like nv_backlight.
>
> Userspace will normally prefer firmware interfaces over raw interfaces, so
> if acpi_video backlight support is present it will use that even if
> nv_backlight is registered as well.
>
> Except when video.use_native_backlight is present on the kernel cmdline
> (or enabled through a dmi based quirk). As the name indicates the goal here
> is to make only the raw interface available to userspace so that it will use
> that (it only does this when it sees a win8 compliant bios).
>
> This is done by:
> 1) Not registering any acpi_video# backlight devices; and
> 2) Making acpi_video_backlight_support() return true so that other firmware
> drivers, ie acer_wmi, thinkpad_acpi, dell_laptop, etc. Don't register their
> own vender specific interfaces.
>
> Currently nouveau breaks this setup, as when acpi_video_backlight_support()
> returns true, it does not register itself, resulting in no backlight control
> at all.
>
> This is esp. going to be a problem with 3.16 which will default to
> video.use_native_backlight=1, and thus nouveau based laptops with a win8 bios
> will get no backlight control at all.
>
> This also likely explains why the previous attempt to make
> video.use_native_backlight=1 the default was not a success, as without this
> patch having a default of video.use_native_backlight=1 will cause regressions.
>
> Note this effectively reverts commit 5bead799
>
> Also see: https://bugzilla.redhat.com/show_bug.cgi?id\x1093171
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
It would be good to have an ACK from the nouveau people for this one.
> ---
> drivers/gpu/drm/nouveau/nouveau_backlight.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> index 630f6e8..2c1e4aa 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> @@ -31,7 +31,6 @@
> */
>
> #include <linux/backlight.h>
> -#include <linux/acpi.h>
>
> #include "nouveau_drm.h"
> #include "nouveau_reg.h"
> @@ -222,14 +221,6 @@ nouveau_backlight_init(struct drm_device *dev)
> struct nouveau_device *device = nv_device(drm->device);
> struct drm_connector *connector;
>
> -#ifdef CONFIG_ACPI
> - if (acpi_video_backlight_support()) {
> - NV_INFO(drm, "ACPI backlight interface available, "
> - "not registering our own\n");
> - return 0;
> - }
> -#endif
> -
> list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
> if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
> connector->connector_type != DRM_MODE_CONNECTOR_eDP)
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* Re: [PATCH resend 2/4] backlight: Add backlight device (un)registration notification
From: Rafael J. Wysocki @ 2014-05-21 23:31 UTC (permalink / raw)
To: Hans de Goede
Cc: Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie, Zhang Rui, Len Brown, linux-acpi, linux-fbdev,
dri-devel
In-Reply-To: <1400679596-19663-3-git-send-email-hdegoede@redhat.com>
On Wednesday, May 21, 2014 03:39:54 PM Hans de Goede wrote:
> Some firmware drivers, ie acpi-video want to get themselves out of the
> way (in some cases) when their also is a raw backlight device available.
>
> Due to module loading ordering being unknown, acpi-video cannot be certain
> that the backlight_device_registered(BACKLIGHT_RAW) it does for this is
> the final verdict wrt there being a BACKLIGHT_RAW device.
>
> By adding notification acpi-video can listen for backlight devices showing
> up after it has loaded, and unregister its backlight device if desired.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Backlight maintainer's ACK is requisite here.
> ---
> drivers/video/backlight/backlight.c | 40 +++++++++++++++++++++++++++++++++++++
> include/linux/backlight.h | 7 +++++++
> 2 files changed, 47 insertions(+)
>
> diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
> index bd2172c..4280890 100644
> --- a/drivers/video/backlight/backlight.c
> +++ b/drivers/video/backlight/backlight.c
> @@ -23,6 +23,7 @@
>
> static struct list_head backlight_dev_list;
> static struct mutex backlight_dev_list_mutex;
> +static struct blocking_notifier_head backlight_notifier;
>
> static const char *const backlight_types[] = {
> [BACKLIGHT_RAW] = "raw",
> @@ -370,6 +371,9 @@ struct backlight_device *backlight_device_register(const char *name,
> list_add(&new_bd->entry, &backlight_dev_list);
> mutex_unlock(&backlight_dev_list_mutex);
>
> + blocking_notifier_call_chain(&backlight_notifier,
> + BACKLIGHT_REGISTERED, new_bd);
> +
> return new_bd;
> }
> EXPORT_SYMBOL(backlight_device_register);
> @@ -413,6 +417,10 @@ void backlight_device_unregister(struct backlight_device *bd)
> pmac_backlight = NULL;
> mutex_unlock(&pmac_backlight_mutex);
> #endif
> +
> + blocking_notifier_call_chain(&backlight_notifier,
> + BACKLIGHT_UNREGISTERED, bd);
> +
> mutex_lock(&bd->ops_lock);
> bd->ops = NULL;
> mutex_unlock(&bd->ops_lock);
> @@ -438,6 +446,36 @@ static int devm_backlight_device_match(struct device *dev, void *res,
> }
>
> /**
> + * backlight_register_notifier - get notified of backlight (un)registration
> + * @nb: notifier block with the notifier to call on backlight (un)registration
> + *
> + * @return 0 on success, otherwise a negative error code
> + *
> + * Register a notifier to get notified when backlight devices get registered
> + * or unregistered.
> + */
> +int backlight_register_notifier(struct notifier_block *nb)
> +{
> + return blocking_notifier_chain_register(&backlight_notifier, nb);
> +}
> +EXPORT_SYMBOL(backlight_register_notifier);
> +
> +/**
> + * backlight_unregister_notifier - unregister a backlight notifier
> + * @nb: notifier block to unregister
> + *
> + * @return 0 on success, otherwise a negative error code
> + *
> + * Register a notifier to get notified when backlight devices get registered
> + * or unregistered.
> + */
> +int backlight_unregister_notifier(struct notifier_block *nb)
> +{
> + return blocking_notifier_chain_unregister(&backlight_notifier, nb);
> +}
> +EXPORT_SYMBOL(backlight_unregister_notifier);
> +
> +/**
> * devm_backlight_device_register - resource managed backlight_device_register()
> * @dev: the device to register
> * @name: the name of the device
> @@ -544,6 +582,8 @@ static int __init backlight_class_init(void)
> backlight_class->pm = &backlight_class_dev_pm_ops;
> INIT_LIST_HEAD(&backlight_dev_list);
> mutex_init(&backlight_dev_list_mutex);
> + BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier);
> +
> return 0;
> }
>
> diff --git a/include/linux/backlight.h b/include/linux/backlight.h
> index 7264742..adb14a8 100644
> --- a/include/linux/backlight.h
> +++ b/include/linux/backlight.h
> @@ -40,6 +40,11 @@ enum backlight_type {
> BACKLIGHT_TYPE_MAX,
> };
>
> +enum backlight_notification {
> + BACKLIGHT_REGISTERED,
> + BACKLIGHT_UNREGISTERED,
> +};
> +
> struct backlight_device;
> struct fb_info;
>
> @@ -133,6 +138,8 @@ extern void devm_backlight_device_unregister(struct device *dev,
> extern void backlight_force_update(struct backlight_device *bd,
> enum backlight_update_reason reason);
> extern bool backlight_device_registered(enum backlight_type type);
> +extern int backlight_register_notifier(struct notifier_block *nb);
> +extern int backlight_unregister_notifier(struct notifier_block *nb);
>
> #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)
>
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* Re: [PATCH resend 1/4] nouveau: Don't check acpi_video_backlight_support() before registering backli
From: Hans de Goede @ 2014-05-22 8:41 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie, Zhang Rui, Len Brown, linux-acpi, linux-fbdev,
dri-devel
In-Reply-To: <2450872.0pLqjZcv9y@vostro.rjw.lan>
Hi,
On 05/22/2014 01:30 AM, Rafael J. Wysocki wrote:
> On Wednesday, May 21, 2014 03:39:53 PM Hans de Goede wrote:
>> acpi_video_backlight_support() is supposed to be called by other (vendor
>> specific) firmware backlight controls, not by native / raw backlight controls
>> like nv_backlight.
>>
>> Userspace will normally prefer firmware interfaces over raw interfaces, so
>> if acpi_video backlight support is present it will use that even if
>> nv_backlight is registered as well.
>>
>> Except when video.use_native_backlight is present on the kernel cmdline
>> (or enabled through a dmi based quirk). As the name indicates the goal here
>> is to make only the raw interface available to userspace so that it will use
>> that (it only does this when it sees a win8 compliant bios).
>>
>> This is done by:
>> 1) Not registering any acpi_video# backlight devices; and
>> 2) Making acpi_video_backlight_support() return true so that other firmware
>> drivers, ie acer_wmi, thinkpad_acpi, dell_laptop, etc. Don't register their
>> own vender specific interfaces.
>>
>> Currently nouveau breaks this setup, as when acpi_video_backlight_support()
>> returns true, it does not register itself, resulting in no backlight control
>> at all.
>>
>> This is esp. going to be a problem with 3.16 which will default to
>> video.use_native_backlight=1, and thus nouveau based laptops with a win8 bios
>> will get no backlight control at all.
>>
>> This also likely explains why the previous attempt to make
>> video.use_native_backlight=1 the default was not a success, as without this
>> patch having a default of video.use_native_backlight=1 will cause regressions.
>>
>> Note this effectively reverts commit 5bead799
>>
>> Also see: https://bugzilla.redhat.com/show_bug.cgi?id\x1093171
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> It would be good to have an ACK from the nouveau people for this one.
Right, it could / should even go in through the drm tree I guess.
Regards,
Hans
^ permalink raw reply
* Re: [PATCH resend 2/4] backlight: Add backlight device (un)registration notification
From: Hans de Goede @ 2014-05-22 8:44 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Aaron Lu, Jingoo Han, Bryan Wu, Lee Jones,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie, Zhang Rui, Len Brown, linux-acpi, linux-fbdev,
dri-devel
In-Reply-To: <82426680.ILvbY8i4gL@vostro.rjw.lan>
Hi,
On 05/22/2014 01:31 AM, Rafael J. Wysocki wrote:
> On Wednesday, May 21, 2014 03:39:54 PM Hans de Goede wrote:
>> Some firmware drivers, ie acpi-video want to get themselves out of the
>> way (in some cases) when their also is a raw backlight device available.
>>
>> Due to module loading ordering being unknown, acpi-video cannot be certain
>> that the backlight_device_registered(BACKLIGHT_RAW) it does for this is
>> the final verdict wrt there being a BACKLIGHT_RAW device.
>>
>> By adding notification acpi-video can listen for backlight devices showing
>> up after it has loaded, and unregister its backlight device if desired.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Backlight maintainer's ACK is requisite here.
Agreed, which is why I send this set to all 3 the backlight maintainers
directly on both postings.
What may be helpful for them is to hear from you if you're ok with the
acpi-video bits which are actually going to use this, since those will
be the only user of the new backlight api (for now).
Thanks & Regardsm
Hans
>
>> ---
>> drivers/video/backlight/backlight.c | 40 +++++++++++++++++++++++++++++++++++++
>> include/linux/backlight.h | 7 +++++++
>> 2 files changed, 47 insertions(+)
>>
>> diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
>> index bd2172c..4280890 100644
>> --- a/drivers/video/backlight/backlight.c
>> +++ b/drivers/video/backlight/backlight.c
>> @@ -23,6 +23,7 @@
>>
>> static struct list_head backlight_dev_list;
>> static struct mutex backlight_dev_list_mutex;
>> +static struct blocking_notifier_head backlight_notifier;
>>
>> static const char *const backlight_types[] = {
>> [BACKLIGHT_RAW] = "raw",
>> @@ -370,6 +371,9 @@ struct backlight_device *backlight_device_register(const char *name,
>> list_add(&new_bd->entry, &backlight_dev_list);
>> mutex_unlock(&backlight_dev_list_mutex);
>>
>> + blocking_notifier_call_chain(&backlight_notifier,
>> + BACKLIGHT_REGISTERED, new_bd);
>> +
>> return new_bd;
>> }
>> EXPORT_SYMBOL(backlight_device_register);
>> @@ -413,6 +417,10 @@ void backlight_device_unregister(struct backlight_device *bd)
>> pmac_backlight = NULL;
>> mutex_unlock(&pmac_backlight_mutex);
>> #endif
>> +
>> + blocking_notifier_call_chain(&backlight_notifier,
>> + BACKLIGHT_UNREGISTERED, bd);
>> +
>> mutex_lock(&bd->ops_lock);
>> bd->ops = NULL;
>> mutex_unlock(&bd->ops_lock);
>> @@ -438,6 +446,36 @@ static int devm_backlight_device_match(struct device *dev, void *res,
>> }
>>
>> /**
>> + * backlight_register_notifier - get notified of backlight (un)registration
>> + * @nb: notifier block with the notifier to call on backlight (un)registration
>> + *
>> + * @return 0 on success, otherwise a negative error code
>> + *
>> + * Register a notifier to get notified when backlight devices get registered
>> + * or unregistered.
>> + */
>> +int backlight_register_notifier(struct notifier_block *nb)
>> +{
>> + return blocking_notifier_chain_register(&backlight_notifier, nb);
>> +}
>> +EXPORT_SYMBOL(backlight_register_notifier);
>> +
>> +/**
>> + * backlight_unregister_notifier - unregister a backlight notifier
>> + * @nb: notifier block to unregister
>> + *
>> + * @return 0 on success, otherwise a negative error code
>> + *
>> + * Register a notifier to get notified when backlight devices get registered
>> + * or unregistered.
>> + */
>> +int backlight_unregister_notifier(struct notifier_block *nb)
>> +{
>> + return blocking_notifier_chain_unregister(&backlight_notifier, nb);
>> +}
>> +EXPORT_SYMBOL(backlight_unregister_notifier);
>> +
>> +/**
>> * devm_backlight_device_register - resource managed backlight_device_register()
>> * @dev: the device to register
>> * @name: the name of the device
>> @@ -544,6 +582,8 @@ static int __init backlight_class_init(void)
>> backlight_class->pm = &backlight_class_dev_pm_ops;
>> INIT_LIST_HEAD(&backlight_dev_list);
>> mutex_init(&backlight_dev_list_mutex);
>> + BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier);
>> +
>> return 0;
>> }
>>
>> diff --git a/include/linux/backlight.h b/include/linux/backlight.h
>> index 7264742..adb14a8 100644
>> --- a/include/linux/backlight.h
>> +++ b/include/linux/backlight.h
>> @@ -40,6 +40,11 @@ enum backlight_type {
>> BACKLIGHT_TYPE_MAX,
>> };
>>
>> +enum backlight_notification {
>> + BACKLIGHT_REGISTERED,
>> + BACKLIGHT_UNREGISTERED,
>> +};
>> +
>> struct backlight_device;
>> struct fb_info;
>>
>> @@ -133,6 +138,8 @@ extern void devm_backlight_device_unregister(struct device *dev,
>> extern void backlight_force_update(struct backlight_device *bd,
>> enum backlight_update_reason reason);
>> extern bool backlight_device_registered(enum backlight_type type);
>> +extern int backlight_register_notifier(struct notifier_block *nb);
>> +extern int backlight_unregister_notifier(struct notifier_block *nb);
>>
>> #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)
>>
>>
>
^ permalink raw reply
* Re: [PATCH resend 2/4] backlight: Add backlight device (un)registration notification
From: Lee Jones @ 2014-05-22 9:02 UTC (permalink / raw)
To: Hans de Goede
Cc: Rafael J. Wysocki, Aaron Lu, Jingoo Han, Bryan Wu,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Ben Skeggs,
David Airlie, Zhang Rui, Len Brown, linux-acpi, linux-fbdev,
dri-devel
In-Reply-To: <537DB904.50901@redhat.com>
> >> Some firmware drivers, ie acpi-video want to get themselves out of the
> >> way (in some cases) when their also is a raw backlight device available.
> >>
> >> Due to module loading ordering being unknown, acpi-video cannot be certain
> >> that the backlight_device_registered(BACKLIGHT_RAW) it does for this is
> >> the final verdict wrt there being a BACKLIGHT_RAW device.
> >>
> >> By adding notification acpi-video can listen for backlight devices showing
> >> up after it has loaded, and unregister its backlight device if desired.
> >>
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >
> > Backlight maintainer's ACK is requisite here.
>
> Agreed, which is why I send this set to all 3 the backlight maintainers
> directly on both postings.
>
> What may be helpful for them is to hear from you if you're ok with the
> acpi-video bits which are actually going to use this, since those will
> be the only user of the new backlight api (for now).
I'm happy to apply any Backlight patches which have either Bryan or
Jingoo's Ack, as they are the reviewers for the BL subsystem.
> >> ---
> >> drivers/video/backlight/backlight.c | 40 +++++++++++++++++++++++++++++++++++++
> >> include/linux/backlight.h | 7 +++++++
> >> 2 files changed, 47 insertions(+)
> >>
> >> diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
> >> index bd2172c..4280890 100644
> >> --- a/drivers/video/backlight/backlight.c
> >> +++ b/drivers/video/backlight/backlight.c
> >> @@ -23,6 +23,7 @@
> >>
> >> static struct list_head backlight_dev_list;
> >> static struct mutex backlight_dev_list_mutex;
> >> +static struct blocking_notifier_head backlight_notifier;
> >>
> >> static const char *const backlight_types[] = {
> >> [BACKLIGHT_RAW] = "raw",
> >> @@ -370,6 +371,9 @@ struct backlight_device *backlight_device_register(const char *name,
> >> list_add(&new_bd->entry, &backlight_dev_list);
> >> mutex_unlock(&backlight_dev_list_mutex);
> >>
> >> + blocking_notifier_call_chain(&backlight_notifier,
> >> + BACKLIGHT_REGISTERED, new_bd);
> >> +
> >> return new_bd;
> >> }
> >> EXPORT_SYMBOL(backlight_device_register);
> >> @@ -413,6 +417,10 @@ void backlight_device_unregister(struct backlight_device *bd)
> >> pmac_backlight = NULL;
> >> mutex_unlock(&pmac_backlight_mutex);
> >> #endif
> >> +
> >> + blocking_notifier_call_chain(&backlight_notifier,
> >> + BACKLIGHT_UNREGISTERED, bd);
> >> +
> >> mutex_lock(&bd->ops_lock);
> >> bd->ops = NULL;
> >> mutex_unlock(&bd->ops_lock);
> >> @@ -438,6 +446,36 @@ static int devm_backlight_device_match(struct device *dev, void *res,
> >> }
> >>
> >> /**
> >> + * backlight_register_notifier - get notified of backlight (un)registration
> >> + * @nb: notifier block with the notifier to call on backlight (un)registration
> >> + *
> >> + * @return 0 on success, otherwise a negative error code
> >> + *
> >> + * Register a notifier to get notified when backlight devices get registered
> >> + * or unregistered.
> >> + */
> >> +int backlight_register_notifier(struct notifier_block *nb)
> >> +{
> >> + return blocking_notifier_chain_register(&backlight_notifier, nb);
> >> +}
> >> +EXPORT_SYMBOL(backlight_register_notifier);
> >> +
> >> +/**
> >> + * backlight_unregister_notifier - unregister a backlight notifier
> >> + * @nb: notifier block to unregister
> >> + *
> >> + * @return 0 on success, otherwise a negative error code
> >> + *
> >> + * Register a notifier to get notified when backlight devices get registered
> >> + * or unregistered.
> >> + */
> >> +int backlight_unregister_notifier(struct notifier_block *nb)
> >> +{
> >> + return blocking_notifier_chain_unregister(&backlight_notifier, nb);
> >> +}
> >> +EXPORT_SYMBOL(backlight_unregister_notifier);
> >> +
> >> +/**
> >> * devm_backlight_device_register - resource managed backlight_device_register()
> >> * @dev: the device to register
> >> * @name: the name of the device
> >> @@ -544,6 +582,8 @@ static int __init backlight_class_init(void)
> >> backlight_class->pm = &backlight_class_dev_pm_ops;
> >> INIT_LIST_HEAD(&backlight_dev_list);
> >> mutex_init(&backlight_dev_list_mutex);
> >> + BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier);
> >> +
> >> return 0;
> >> }
> >>
> >> diff --git a/include/linux/backlight.h b/include/linux/backlight.h
> >> index 7264742..adb14a8 100644
> >> --- a/include/linux/backlight.h
> >> +++ b/include/linux/backlight.h
> >> @@ -40,6 +40,11 @@ enum backlight_type {
> >> BACKLIGHT_TYPE_MAX,
> >> };
> >>
> >> +enum backlight_notification {
> >> + BACKLIGHT_REGISTERED,
> >> + BACKLIGHT_UNREGISTERED,
> >> +};
> >> +
> >> struct backlight_device;
> >> struct fb_info;
> >>
> >> @@ -133,6 +138,8 @@ extern void devm_backlight_device_unregister(struct device *dev,
> >> extern void backlight_force_update(struct backlight_device *bd,
> >> enum backlight_update_reason reason);
> >> extern bool backlight_device_registered(enum backlight_type type);
> >> +extern int backlight_register_notifier(struct notifier_block *nb);
> >> +extern int backlight_unregister_notifier(struct notifier_block *nb);
> >>
> >> #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)
> >>
> >>
> >
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox