* [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast
@ 2009-11-23 17:57 Janusz Krzysztofik
2009-11-23 18:09 ` [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control Janusz Krzysztofik
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Janusz Krzysztofik @ 2009-11-23 17:57 UTC (permalink / raw)
To: linux-fbdev, linux-omap; +Cc: Imre Deak, Tony Lindgren
Initialy submitted on 2009-11-16
(http://www.spinics.net/lists/linux-omap/msg20629.html).
Resendig due to fbdev mailing list address changed.
The series consists of 2 patches:
[PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control
[PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support
It is intended for 2.6.33, if it's not too late.
Thanks,
Janusz
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control
2009-11-23 17:57 [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
@ 2009-11-23 18:09 ` Janusz Krzysztofik
2009-11-23 18:11 ` [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support Janusz Krzysztofik
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Janusz Krzysztofik @ 2009-11-23 18:09 UTC (permalink / raw)
To: linux-fbdev; +Cc: linux-omap, Imre Deak, Tony Lindgren
The patch extends the Amstrad Delta LCD panel driver with optional support for
changing contrast using standard LCD class device API instead of setting it
silently to a default value at panel enable. It also allows for lowering power
consumption by turning off OMAP_PWL_CLK_ENABLE via lcd_ops.set_power callback.
Created and tested against linux-omap for-next,
commit 155a75d9725e66e5ec8a383822957dee52427057.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
--- a/drivers/video/omap/lcd_ams_delta.c 2009-11-14 23:49:16.000000000 +0100
+++ b/drivers/video/omap/lcd_ams_delta.c 2009-11-16 01:32:19.000000000 +0100
@@ -24,6 +24,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/delay.h>
+#include <linux/lcd.h>
#include <plat/board-ams-delta.h>
#include <mach/hardware.h>
@@ -31,6 +32,71 @@
#define AMS_DELTA_DEFAULT_CONTRAST 112
+#define AMS_DELTA_MAX_CONTRAST 0x00FF
+#define AMS_DELTA_LCD_POWER 0x0100
+
+
+/* LCD class device section */
+
+static int ams_delta_lcd;
+
+static int ams_delta_lcd_set_power(struct lcd_device *dev, int power)
+{
+ if (power = FB_BLANK_UNBLANK) {
+ if (!(ams_delta_lcd & AMS_DELTA_LCD_POWER)) {
+ omap_writeb(ams_delta_lcd & AMS_DELTA_MAX_CONTRAST,
+ OMAP_PWL_ENABLE);
+ omap_writeb(1, OMAP_PWL_CLK_ENABLE);
+ ams_delta_lcd |= AMS_DELTA_LCD_POWER;
+ }
+ } else {
+ if (ams_delta_lcd & AMS_DELTA_LCD_POWER) {
+ omap_writeb(0, OMAP_PWL_ENABLE);
+ omap_writeb(0, OMAP_PWL_CLK_ENABLE);
+ ams_delta_lcd &= ~AMS_DELTA_LCD_POWER;
+ }
+ }
+ return 0;
+}
+
+static int ams_delta_lcd_set_contrast(struct lcd_device *dev, int value)
+{
+ if ((value >= 0) && (value <= AMS_DELTA_MAX_CONTRAST)) {
+ omap_writeb(value, OMAP_PWL_ENABLE);
+ ams_delta_lcd &= ~AMS_DELTA_MAX_CONTRAST;
+ ams_delta_lcd |= value;
+ }
+ return 0;
+}
+
+#ifdef CONFIG_LCD_CLASS_DEVICE
+static int ams_delta_lcd_get_power(struct lcd_device *dev)
+{
+ if (ams_delta_lcd & AMS_DELTA_LCD_POWER)
+ return FB_BLANK_UNBLANK;
+ else
+ return FB_BLANK_POWERDOWN;
+}
+
+static int ams_delta_lcd_get_contrast(struct lcd_device *dev)
+{
+ if (!(ams_delta_lcd & AMS_DELTA_LCD_POWER))
+ return 0;
+
+ return ams_delta_lcd & AMS_DELTA_MAX_CONTRAST;
+}
+
+static struct lcd_ops ams_delta_lcd_ops = {
+ .get_power = ams_delta_lcd_get_power,
+ .set_power = ams_delta_lcd_set_power,
+ .get_contrast = ams_delta_lcd_get_contrast,
+ .set_contrast = ams_delta_lcd_set_contrast,
+};
+#endif
+
+
+/* omapfb panel section */
+
static int ams_delta_panel_init(struct lcd_panel *panel,
struct omapfb_device *fbdev)
{
@@ -47,10 +113,6 @@ static int ams_delta_panel_enable(struct
AMS_DELTA_LATCH2_LCD_NDISP);
ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN,
AMS_DELTA_LATCH2_LCD_VBLEN);
-
- omap_writeb(1, OMAP_PWL_CLK_ENABLE);
- omap_writeb(AMS_DELTA_DEFAULT_CONTRAST, OMAP_PWL_ENABLE);
-
return 0;
}
@@ -90,8 +152,31 @@ static struct lcd_panel ams_delta_panel
.get_caps = ams_delta_panel_get_caps,
};
+
+/* platform driver section */
+
static int ams_delta_panel_probe(struct platform_device *pdev)
{
+ struct lcd_device *lcd_device = NULL;
+#ifdef CONFIG_LCD_CLASS_DEVICE
+ int ret;
+
+ lcd_device = lcd_device_register("omapfb", &pdev->dev, NULL,
+ &ams_delta_lcd_ops);
+
+ if (IS_ERR(lcd_device)) {
+ ret = PTR_ERR(lcd_device);
+ dev_err(&pdev->dev, "failed to register device\n");
+ return ret;
+ }
+
+ platform_set_drvdata(pdev, lcd_device);
+ lcd_device->props.max_contrast = AMS_DELTA_MAX_CONTRAST;
+#endif
+
+ ams_delta_lcd_set_contrast(lcd_device, AMS_DELTA_DEFAULT_CONTRAST);
+ ams_delta_lcd_set_power(lcd_device, FB_BLANK_UNBLANK);
+
omapfb_register_panel(&ams_delta_panel);
return 0;
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support
2009-11-23 17:57 [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
2009-11-23 18:09 ` [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control Janusz Krzysztofik
@ 2009-11-23 18:11 ` Janusz Krzysztofik
2009-12-01 0:17 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
2009-12-05 13:54 ` Janusz Krzysztofik
3 siblings, 0 replies; 12+ messages in thread
From: Janusz Krzysztofik @ 2009-11-23 18:11 UTC (permalink / raw)
To: linux-omap; +Cc: linux-fbdev, Imre Deak, Tony Lindgren
The patch enables LCD class device support in ams_delta_defconfig in order to
get optional contrast control functional.
Created and tested against linux-omap for-next,
commit 155a75d9725e66e5ec8a383822957dee52427057.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
--- a/arch/arm/configs/ams_delta_defconfig 2009-11-14 23:48:40.000000000 +0100
+++ b/arch/arm/configs/ams_delta_defconfig 2009-11-16 01:06:12.000000000 +0100
@@ -836,7 +836,8 @@
#
# Graphics support
#
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
#
# Display device support
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast
2009-11-23 17:57 [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
2009-11-23 18:09 ` [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control Janusz Krzysztofik
2009-11-23 18:11 ` [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support Janusz Krzysztofik
@ 2009-12-01 0:17 ` Janusz Krzysztofik
2009-12-05 13:54 ` Janusz Krzysztofik
3 siblings, 0 replies; 12+ messages in thread
From: Janusz Krzysztofik @ 2009-12-01 0:17 UTC (permalink / raw)
To: linux-fbdev; +Cc: linux-omap, Imre Deak, Tony Lindgren
Monday 23 November 2009 18:57:51 Janusz Krzysztofik wrote:
> Initialy submitted on 2009-11-16
> (http://www.spinics.net/lists/linux-omap/msg20629.html).
> Resendig due to fbdev mailing list address changed.
Hi,
2 weeks have passed now since my initial submisison, and I still got no single
answer. I can assume that Tony is just waiting with OMAP part for someone
from fbdev to answer first, but I have no idea why I can't hear from Imre,
who is still pointed out in MAINTAINERS as a right person to talk to about
drivers/video/omap/*, nor anybody else involved in framebuffer development.
Could someone please give me an advice what I should do now?
Thanks,
Janusz
> The series consists of 2 patches:
>
> [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control
http://marc.info/?l=linux-fbdev&m\x125899977102760
> [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support
http://marc.info/?l=linux-fbdev&m\x125899990003070
> It is intended for 2.6.33, if it's not too late.
>
> Thanks,
> Janusz
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast
2009-11-23 17:57 [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
` (2 preceding siblings ...)
2009-12-01 0:17 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
@ 2009-12-05 13:54 ` Janusz Krzysztofik
2009-12-07 21:32 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD Tony Lindgren
3 siblings, 1 reply; 12+ messages in thread
From: Janusz Krzysztofik @ 2009-12-05 13:54 UTC (permalink / raw)
To: Imre Deak, Tomi Valkeinen, linux-fbdev-devel
Cc: linux-fbdev, linux-omap, Tony Lindgren, linux-kernel
Monday 23 November 2009 18:57:51 Janusz Krzysztofik napisał(a):
> Initialy submitted on 2009-11-16
> (http://www.spinics.net/lists/linux-omap/msg20629.html).
> Resendig due to fbdev mailing list address changed.
>
> The series consists of 2 patches:
>
> [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control
> [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support
>
> It is intended for 2.6.33, if it's not too late.
Hi,
Now that Tony has changed the series status from New to Awaiting Upstream in
his patchwork queue[1][2], chances of getting it in throungh linux-omap tree,
like a few other omapfb related patches managed to do lately, seem falling
down drastically to me if still not answered by anyone involved in omapfb
development.
Imre,
Could you please take the patches, or give your ack for Tony to take them, or
just point me on the right way to the get them integrated or NAKed, if none
of the former is?
Tomi,
I am not sure if you are the right person for bothering here, but maybe you
could give your comments that would help pushing it forward?
Thanks,
Janusz
[1] http://patchwork.kernel.org/patch/62248/
[2] http://patchwork.kernel.org/patch/62249/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD
2009-12-05 13:54 ` Janusz Krzysztofik
@ 2009-12-07 21:32 ` Tony Lindgren
2009-12-08 9:21 ` Tomi Valkeinen
2009-12-11 9:53 ` Tomi Valkeinen
0 siblings, 2 replies; 12+ messages in thread
From: Tony Lindgren @ 2009-12-07 21:32 UTC (permalink / raw)
To: Janusz Krzysztofik
Cc: Imre Deak, Tomi Valkeinen, linux-fbdev-devel, linux-fbdev,
linux-omap, linux-kernel
* Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [091205 05:54]:
> Monday 23 November 2009 18:57:51 Janusz Krzysztofik napisał(a):
> > Initialy submitted on 2009-11-16
> > (http://www.spinics.net/lists/linux-omap/msg20629.html).
> > Resendig due to fbdev mailing list address changed.
> >
> > The series consists of 2 patches:
> >
> > [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control
> > [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support
> >
> > It is intended for 2.6.33, if it's not too late.
>
> Hi,
>
> Now that Tony has changed the series status from New to Awaiting Upstream in
> his patchwork queue[1][2], chances of getting it in throungh linux-omap tree,
> like a few other omapfb related patches managed to do lately, seem falling
> down drastically to me if still not answered by anyone involved in omapfb
> development.
>
> Imre,
> Could you please take the patches, or give your ack for Tony to take them, or
> just point me on the right way to the get them integrated or NAKed, if none
> of the former is?
>
> Tomi,
> I am not sure if you are the right person for bothering here, but maybe you
> could give your comments that would help pushing it forward?
I'd prefer Tomi to merge all the drivers/video/omap code rather
than merge it via linux-omap tree. Ideally with an ack from
Imre where possible.
Tony
> Thanks,
> Janusz
>
> [1] http://patchwork.kernel.org/patch/62248/
> [2] http://patchwork.kernel.org/patch/62249/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD
2009-12-07 21:32 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD Tony Lindgren
@ 2009-12-08 9:21 ` Tomi Valkeinen
2009-12-11 9:53 ` Tomi Valkeinen
1 sibling, 0 replies; 12+ messages in thread
From: Tomi Valkeinen @ 2009-12-08 9:21 UTC (permalink / raw)
To: ext Tony Lindgren, Deak Imre (Nokia-D/Helsinki)
Cc: Janusz Krzysztofik, linux-fbdev-devel@lists.sourceforge.net,
linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
On Mon, 2009-12-07 at 22:32 +0100, ext Tony Lindgren wrote:
> * Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [091205 05:54]:
> > Monday 23 November 2009 18:57:51 Janusz Krzysztofik napisał(a):
> > > Initialy submitted on 2009-11-16
> > > (http://www.spinics.net/lists/linux-omap/msg20629.html).
> > > Resendig due to fbdev mailing list address changed.
> > >
> > > The series consists of 2 patches:
> > >
> > > [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control
> > > [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support
> > >
> > > It is intended for 2.6.33, if it's not too late.
> >
> > Hi,
> >
> > Now that Tony has changed the series status from New to Awaiting Upstream in
> > his patchwork queue[1][2], chances of getting it in throungh linux-omap tree,
> > like a few other omapfb related patches managed to do lately, seem falling
> > down drastically to me if still not answered by anyone involved in omapfb
> > development.
> >
> > Imre,
> > Could you please take the patches, or give your ack for Tony to take them, or
> > just point me on the right way to the get them integrated or NAKed, if none
> > of the former is?
> >
> > Tomi,
> > I am not sure if you are the right person for bothering here, but maybe you
> > could give your comments that would help pushing it forward?
>
> I'd prefer Tomi to merge all the drivers/video/omap code rather
> than merge it via linux-omap tree. Ideally with an ack from
> Imre where possible.
And I, on the other hand, would like to keep away from the old omapfb
driver =).
Imre, do you still want to be the maintainer of the old omapfb, or how
should we handle it? I didn't have any plans to maintain it, but then
again, perhaps it wouldn't be too much of a burden to have the
(hopefully) few patches for old omapfb in the DSS2 tree.
Tomi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD
2009-12-07 21:32 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD Tony Lindgren
2009-12-08 9:21 ` Tomi Valkeinen
@ 2009-12-11 9:53 ` Tomi Valkeinen
2009-12-11 11:55 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
1 sibling, 1 reply; 12+ messages in thread
From: Tomi Valkeinen @ 2009-12-11 9:53 UTC (permalink / raw)
To: ext Tony Lindgren
Cc: Janusz Krzysztofik, Deak Imre (Nokia-D/Helsinki),
linux-fbdev-devel@lists.sourceforge.net,
linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
On Mon, 2009-12-07 at 22:32 +0100, ext Tony Lindgren wrote:
> * Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [091205 05:54]:
> > Monday 23 November 2009 18:57:51 Janusz Krzysztofik napisał(a):
> > > Initialy submitted on 2009-11-16
> > > (http://www.spinics.net/lists/linux-omap/msg20629.html).
> > > Resendig due to fbdev mailing list address changed.
> > >
> > > The series consists of 2 patches:
> > >
> > > [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control
> > > [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support
> > >
> > > It is intended for 2.6.33, if it's not too late.
> >
> > Hi,
> >
> > Now that Tony has changed the series status from New to Awaiting Upstream in
> > his patchwork queue[1][2], chances of getting it in throungh linux-omap tree,
> > like a few other omapfb related patches managed to do lately, seem falling
> > down drastically to me if still not answered by anyone involved in omapfb
> > development.
> >
> > Imre,
> > Could you please take the patches, or give your ack for Tony to take them, or
> > just point me on the right way to the get them integrated or NAKed, if none
> > of the former is?
> >
> > Tomi,
> > I am not sure if you are the right person for bothering here, but maybe you
> > could give your comments that would help pushing it forward?
>
> I'd prefer Tomi to merge all the drivers/video/omap code rather
> than merge it via linux-omap tree. Ideally with an ack from
> Imre where possible.
I talked with Imre, and he's not too keen on maintaining the old omapfb,
so I'll take over it. And perhaps it's easier to have all omap display
related patches in one place.
Tomi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast
2009-12-11 9:53 ` Tomi Valkeinen
@ 2009-12-11 11:55 ` Janusz Krzysztofik
2009-12-11 12:07 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD Tomi Valkeinen
0 siblings, 1 reply; 12+ messages in thread
From: Janusz Krzysztofik @ 2009-12-11 11:55 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Tony Lindgren, linux-fbdev-devel@lists.sourceforge.net,
linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org
(dropping Imre to not bother him personally any longer)
(dropping LKML, no need to spam them since omapfb maintaner problem solved)
(not sure if old fbdev list should be dropped as well - seems closed)
Friday 11 December 2009 10:53:43 Tomi Valkeinen napisał(a):
>
> I talked with Imre, and he's not too keen on maintaining the old omapfb,
> so I'll take over it.
Tomi,
That's great, thank you.
> And perhaps it's easier to have all omap display
> related patches in one place.
Am I supposed to do anything about this series[1]? Resend to you?
Thanks,
Janusz
[1] http://marc.info/?l=linux-fbdev&m\x125900108905412&w=2
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD
2009-12-11 11:55 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
@ 2009-12-11 12:07 ` Tomi Valkeinen
2009-12-11 13:21 ` [PATCH 1/2] [Resend] omapfb: lcd_ams_delta: add support for contrast control Janusz Krzysztofik
2009-12-11 13:21 ` [PATCH 2/2] [Resend] OMAP: ams_delta_defconfig: enable LCD class device support Janusz Krzysztofik
0 siblings, 2 replies; 12+ messages in thread
From: Tomi Valkeinen @ 2009-12-11 12:07 UTC (permalink / raw)
To: ext Janusz Krzysztofik
Cc: Tony Lindgren, linux-fbdev@vger.kernel.org,
linux-omap@vger.kernel.org
On Fri, 2009-12-11 at 12:55 +0100, ext Janusz Krzysztofik wrote:
> (dropping Imre to not bother him personally any longer)
> (dropping LKML, no need to spam them since omapfb maintaner problem solved)
> (not sure if old fbdev list should be dropped as well - seems closed)
>
> Friday 11 December 2009 10:53:43 Tomi Valkeinen napisał(a):
> >
> > I talked with Imre, and he's not too keen on maintaining the old omapfb,
> > so I'll take over it.
>
> Tomi,
>
> That's great, thank you.
>
> > And perhaps it's easier to have all omap display
> > related patches in one place.
>
> Am I supposed to do anything about this series[1]? Resend to you?
Yes, please resend to me. I don't seem to have the patches in my mailbox
anymore.
Tomi
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] [Resend] omapfb: lcd_ams_delta: add support for contrast control
2009-12-11 12:07 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD Tomi Valkeinen
@ 2009-12-11 13:21 ` Janusz Krzysztofik
2009-12-11 13:21 ` [PATCH 2/2] [Resend] OMAP: ams_delta_defconfig: enable LCD class device support Janusz Krzysztofik
1 sibling, 0 replies; 12+ messages in thread
From: Janusz Krzysztofik @ 2009-12-11 13:21 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Tony Lindgren, linux-fbdev@vger.kernel.org,
linux-omap@vger.kernel.org
The patch extends the Amstrad Delta LCD panel driver with optional support for
changing contrast using standard LCD class device API instead of setting it
silently to a default value at panel enable. It also allows for lowering power
consumption by turning off OMAP_PWL_CLK_ENABLE via lcd_ops.set_power callback.
Created and tested against linux-omap for-next,
commit 155a75d9725e66e5ec8a383822957dee52427057.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
Friday 11 December 2009 13:07:39 Tomi Valkeinen napisał(a):
> On Fri, 2009-12-11 at 12:55 +0100, ext Janusz Krzysztofik wrote:
> >
> > Am I supposed to do anything about this series[1]? Resend to you?
>
> Yes, please resend to me. I don't seem to have the patches in my mailbox
> anymore.
Tomi,
I tested it on top of l-o commit 82f1d8f22f2c65e70206e40a6f17688bf64a892c that
already had your DSS2 merged. I'll refresh it against your tree if required,
or when submitting a new version if changes requested.
Thanks,
Janusz
--- a/drivers/video/omap/lcd_ams_delta.c 2009-11-14 23:49:16.000000000 +0100
+++ b/drivers/video/omap/lcd_ams_delta.c 2009-11-16 01:32:19.000000000 +0100
@@ -24,6 +24,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/delay.h>
+#include <linux/lcd.h>
#include <plat/board-ams-delta.h>
#include <mach/hardware.h>
@@ -31,6 +32,71 @@
#define AMS_DELTA_DEFAULT_CONTRAST 112
+#define AMS_DELTA_MAX_CONTRAST 0x00FF
+#define AMS_DELTA_LCD_POWER 0x0100
+
+
+/* LCD class device section */
+
+static int ams_delta_lcd;
+
+static int ams_delta_lcd_set_power(struct lcd_device *dev, int power)
+{
+ if (power = FB_BLANK_UNBLANK) {
+ if (!(ams_delta_lcd & AMS_DELTA_LCD_POWER)) {
+ omap_writeb(ams_delta_lcd & AMS_DELTA_MAX_CONTRAST,
+ OMAP_PWL_ENABLE);
+ omap_writeb(1, OMAP_PWL_CLK_ENABLE);
+ ams_delta_lcd |= AMS_DELTA_LCD_POWER;
+ }
+ } else {
+ if (ams_delta_lcd & AMS_DELTA_LCD_POWER) {
+ omap_writeb(0, OMAP_PWL_ENABLE);
+ omap_writeb(0, OMAP_PWL_CLK_ENABLE);
+ ams_delta_lcd &= ~AMS_DELTA_LCD_POWER;
+ }
+ }
+ return 0;
+}
+
+static int ams_delta_lcd_set_contrast(struct lcd_device *dev, int value)
+{
+ if ((value >= 0) && (value <= AMS_DELTA_MAX_CONTRAST)) {
+ omap_writeb(value, OMAP_PWL_ENABLE);
+ ams_delta_lcd &= ~AMS_DELTA_MAX_CONTRAST;
+ ams_delta_lcd |= value;
+ }
+ return 0;
+}
+
+#ifdef CONFIG_LCD_CLASS_DEVICE
+static int ams_delta_lcd_get_power(struct lcd_device *dev)
+{
+ if (ams_delta_lcd & AMS_DELTA_LCD_POWER)
+ return FB_BLANK_UNBLANK;
+ else
+ return FB_BLANK_POWERDOWN;
+}
+
+static int ams_delta_lcd_get_contrast(struct lcd_device *dev)
+{
+ if (!(ams_delta_lcd & AMS_DELTA_LCD_POWER))
+ return 0;
+
+ return ams_delta_lcd & AMS_DELTA_MAX_CONTRAST;
+}
+
+static struct lcd_ops ams_delta_lcd_ops = {
+ .get_power = ams_delta_lcd_get_power,
+ .set_power = ams_delta_lcd_set_power,
+ .get_contrast = ams_delta_lcd_get_contrast,
+ .set_contrast = ams_delta_lcd_set_contrast,
+};
+#endif
+
+
+/* omapfb panel section */
+
static int ams_delta_panel_init(struct lcd_panel *panel,
struct omapfb_device *fbdev)
{
@@ -47,10 +113,6 @@ static int ams_delta_panel_enable(struct
AMS_DELTA_LATCH2_LCD_NDISP);
ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN,
AMS_DELTA_LATCH2_LCD_VBLEN);
-
- omap_writeb(1, OMAP_PWL_CLK_ENABLE);
- omap_writeb(AMS_DELTA_DEFAULT_CONTRAST, OMAP_PWL_ENABLE);
-
return 0;
}
@@ -90,8 +152,31 @@ static struct lcd_panel ams_delta_panel
.get_caps = ams_delta_panel_get_caps,
};
+
+/* platform driver section */
+
static int ams_delta_panel_probe(struct platform_device *pdev)
{
+ struct lcd_device *lcd_device = NULL;
+#ifdef CONFIG_LCD_CLASS_DEVICE
+ int ret;
+
+ lcd_device = lcd_device_register("omapfb", &pdev->dev, NULL,
+ &ams_delta_lcd_ops);
+
+ if (IS_ERR(lcd_device)) {
+ ret = PTR_ERR(lcd_device);
+ dev_err(&pdev->dev, "failed to register device\n");
+ return ret;
+ }
+
+ platform_set_drvdata(pdev, lcd_device);
+ lcd_device->props.max_contrast = AMS_DELTA_MAX_CONTRAST;
+#endif
+
+ ams_delta_lcd_set_contrast(lcd_device, AMS_DELTA_DEFAULT_CONTRAST);
+ ams_delta_lcd_set_power(lcd_device, FB_BLANK_UNBLANK);
+
omapfb_register_panel(&ams_delta_panel);
return 0;
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/2] [Resend] OMAP: ams_delta_defconfig: enable LCD class device support
2009-12-11 12:07 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD Tomi Valkeinen
2009-12-11 13:21 ` [PATCH 1/2] [Resend] omapfb: lcd_ams_delta: add support for contrast control Janusz Krzysztofik
@ 2009-12-11 13:21 ` Janusz Krzysztofik
1 sibling, 0 replies; 12+ messages in thread
From: Janusz Krzysztofik @ 2009-12-11 13:21 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Tony Lindgren, linux-fbdev@vger.kernel.org,
linux-omap@vger.kernel.org
The patch enables LCD class device support in ams_delta_defconfig in order to
get optional contrast control functional.
Created and tested against linux-omap for-next,
commit 155a75d9725e66e5ec8a383822957dee52427057.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
Friday 11 December 2009 13:07:39 Tomi Valkeinen napisał(a):
> On Fri, 2009-12-11 at 12:55 +0100, ext Janusz Krzysztofik wrote:
> >
> > Am I supposed to do anything about this series[1]? Resend to you?
>
> Yes, please resend to me. I don't seem to have the patches in my mailbox
> anymore.
--- a/arch/arm/configs/ams_delta_defconfig 2009-11-14 23:48:40.000000000 +0100
+++ b/arch/arm/configs/ams_delta_defconfig 2009-11-16 01:06:12.000000000 +0100
@@ -836,7 +836,8 @@
#
# Graphics support
#
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
#
# Display device support
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-12-11 13:21 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-23 17:57 [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
2009-11-23 18:09 ` [PATCH 1/2] omapfb: lcd_ams_delta: add support for contrast control Janusz Krzysztofik
2009-11-23 18:11 ` [PATCH 2/2] OMAP: ams_delta_defconfig: enable LCD class device support Janusz Krzysztofik
2009-12-01 0:17 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
2009-12-05 13:54 ` Janusz Krzysztofik
2009-12-07 21:32 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD Tony Lindgren
2009-12-08 9:21 ` Tomi Valkeinen
2009-12-11 9:53 ` Tomi Valkeinen
2009-12-11 11:55 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD contrast Janusz Krzysztofik
2009-12-11 12:07 ` [PATCH 0/2] [RESEND] Amstrad Delta: add support for LCD Tomi Valkeinen
2009-12-11 13:21 ` [PATCH 1/2] [Resend] omapfb: lcd_ams_delta: add support for contrast control Janusz Krzysztofik
2009-12-11 13:21 ` [PATCH 2/2] [Resend] OMAP: ams_delta_defconfig: enable LCD class device support Janusz Krzysztofik
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).