* [PATCH] leds/h1940: Use gpiolib for latch access / fix build failure
@ 2010-12-09 22:04 Peter Huewe
2010-12-09 22:16 ` Vasily Khoruzhick
0 siblings, 1 reply; 5+ messages in thread
From: Peter Huewe @ 2010-12-09 22:04 UTC (permalink / raw)
To: linux-arm-kernel
This patch fixes a build failure by converting leds-h1940.c to use
gpiolib for latch access introduced by 14477095abc6
(ARM: h1940: Use gpiolib for latch access)
Unfortunately this driver was not converted back then.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
KernelVersion: linux-next-20101209
Build failure:
CC [M] drivers/leds/leds-h1940.o
drivers/leds/leds-h1940.c: In function 'h1940_greenled_set':
drivers/leds/leds-h1940.c:33: error: implicit declaration of function 'h1940_latch_control'
make[2]: *** [drivers/leds/leds-h1940
drivers/leds/leds-h1940.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/leds/leds-h1940.c b/drivers/leds/leds-h1940.c
index 173d104..7811701 100644
--- a/drivers/leds/leds-h1940.c
+++ b/drivers/leds/leds-h1940.c
@@ -30,17 +30,17 @@ static void h1940_greenled_set(struct led_classdev *led_dev,
{
switch (value) {
case LED_HALF:
- h1940_latch_control(0, H1940_LATCH_LED_FLASH);
+ gpio_set_value(H1940_LATCH_LED_FLASH, 1);
s3c2410_gpio_setpin(S3C2410_GPA7, 1);
break;
case LED_FULL:
- h1940_latch_control(0, H1940_LATCH_LED_GREEN);
+ gpio_set_value(H1940_LATCH_LED_GREEN, 1);
s3c2410_gpio_setpin(S3C2410_GPA7, 1);
break;
default:
case LED_OFF:
- h1940_latch_control(H1940_LATCH_LED_FLASH, 0);
- h1940_latch_control(H1940_LATCH_LED_GREEN, 0);
+ gpio_set_value(H1940_LATCH_LED_FLASH, 0);
+ gpio_set_value(H1940_LATCH_LED_GREEN, 0);
s3c2410_gpio_setpin(S3C2410_GPA7, 0);
break;
}
@@ -60,17 +60,17 @@ static void h1940_redled_set(struct led_classdev *led_dev,
{
switch (value) {
case LED_HALF:
- h1940_latch_control(0, H1940_LATCH_LED_FLASH);
+ gpio_set_value(H1940_LATCH_LED_FLASH, 1);
s3c2410_gpio_setpin(S3C2410_GPA1, 1);
break;
case LED_FULL:
- h1940_latch_control(0, H1940_LATCH_LED_RED);
+ gpio_set_value(H1940_LATCH_LED_RED, 1);
s3c2410_gpio_setpin(S3C2410_GPA1, 1);
break;
default:
case LED_OFF:
- h1940_latch_control(H1940_LATCH_LED_FLASH, 0);
- h1940_latch_control(H1940_LATCH_LED_RED, 0);
+ gpio_set_value(H1940_LATCH_LED_FLASH, 0);
+ gpio_set_value(H1940_LATCH_LED_RED, 0);
s3c2410_gpio_setpin(S3C2410_GPA1, 0);
break;
}
@@ -91,10 +91,10 @@ static void h1940_blueled_set(struct led_classdev *led_dev,
{
if (value) {
/* flashing Blue */
- h1940_latch_control(0, H1940_LATCH_LED_FLASH);
+ gpio_set_value(H1940_LATCH_LED_FLASH, 1);
s3c2410_gpio_setpin(S3C2410_GPA3, 1);
} else {
- h1940_latch_control(H1940_LATCH_LED_FLASH, 0);
+ gpio_set_value(H1940_LATCH_LED_FLASH, 0);
s3c2410_gpio_setpin(S3C2410_GPA3, 0);
}
--
1.7.2.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] leds/h1940: Use gpiolib for latch access / fix build failure
2010-12-09 22:04 [PATCH] leds/h1940: Use gpiolib for latch access / fix build failure Peter Huewe
@ 2010-12-09 22:16 ` Vasily Khoruzhick
2011-01-04 23:37 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2010-12-09 22:16 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 10 December 2010 00:04:52 Peter Huewe wrote:
> This patch fixes a build failure by converting leds-h1940.c to use
> gpiolib for latch access introduced by 14477095abc6
> (ARM: h1940: Use gpiolib for latch access)
>
> Unfortunately this driver was not converted back then.
I sent similar patch (however, my patch does gpio_request/gpio_free) ~month
ago.
Here's link:
http://www.spinics.net/lists/arm-kernel/msg103429.html
Regards
Vasily
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] leds/h1940: Use gpiolib for latch access / fix build failure
2010-12-09 22:16 ` Vasily Khoruzhick
@ 2011-01-04 23:37 ` Andrew Morton
2011-01-05 7:08 ` Vasily Khoruzhick
2011-01-06 16:03 ` Vasily Khoruzhick
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Morton @ 2011-01-04 23:37 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 10 Dec 2010 00:16:57 +0200
Vasily Khoruzhick <anarsoul@gmail.com> wrote:
> On Friday 10 December 2010 00:04:52 Peter Huewe wrote:
> > This patch fixes a build failure by converting leds-h1940.c to use
> > gpiolib for latch access introduced by 14477095abc6
> > (ARM: h1940: Use gpiolib for latch access)
> >
> > Unfortunately this driver was not converted back then.
>
> I sent similar patch (however, my patch does gpio_request/gpio_free) ~month
> ago.
>
> Here's link:
> http://www.spinics.net/lists/arm-kernel/msg103429.html
>
So which patch to use?
I queued Peter's patch because it's simpler. I queued it for
2.6.38-rc1, taged for backporting into 2.6.37.x, so we have a bit of
time to think about it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] leds/h1940: Use gpiolib for latch access / fix build failure
2011-01-04 23:37 ` Andrew Morton
@ 2011-01-05 7:08 ` Vasily Khoruzhick
2011-01-06 16:03 ` Vasily Khoruzhick
1 sibling, 0 replies; 5+ messages in thread
From: Vasily Khoruzhick @ 2011-01-05 7:08 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 05 January 2011 01:37:25 Andrew Morton wrote:
> On Fri, 10 Dec 2010 00:16:57 +0200
>
> Vasily Khoruzhick <anarsoul@gmail.com> wrote:
> > On Friday 10 December 2010 00:04:52 Peter Huewe wrote:
> > > This patch fixes a build failure by converting leds-h1940.c to use
> > > gpiolib for latch access introduced by 14477095abc6
> > > (ARM: h1940: Use gpiolib for latch access)
> > >
> > > Unfortunately this driver was not converted back then.
> >
> > I sent similar patch (however, my patch does gpio_request/gpio_free)
> > ~month ago.
> >
> > Here's link:
> > http://www.spinics.net/lists/arm-kernel/msg103429.html
>
> So which patch to use?
>
> I queued Peter's patch because it's simpler. I queued it for
> 2.6.38-rc1, taged for backporting into 2.6.37.x, so we have a bit of
> time to think about it.
It's simplier, but it does not request gpio before use. It will work, but will
print nasty warning.
Regards,
Vasily
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] leds/h1940: Use gpiolib for latch access / fix build failure
2011-01-04 23:37 ` Andrew Morton
2011-01-05 7:08 ` Vasily Khoruzhick
@ 2011-01-06 16:03 ` Vasily Khoruzhick
1 sibling, 0 replies; 5+ messages in thread
From: Vasily Khoruzhick @ 2011-01-06 16:03 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 05 January 2011 01:37:25 Andrew Morton wrote:
> So which patch to use?
>
> I queued Peter's patch because it's simpler. I queued it for
> 2.6.38-rc1, taged for backporting into 2.6.37.x, so we have a bit of
> time to think about it.
Anyway, it's time to drop leds-h1940 driver, I'll submit patch to support
H1940 leds via generic leds-gpio driver tonight.
Regards
Vasily
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-06 16:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-09 22:04 [PATCH] leds/h1940: Use gpiolib for latch access / fix build failure Peter Huewe
2010-12-09 22:16 ` Vasily Khoruzhick
2011-01-04 23:37 ` Andrew Morton
2011-01-05 7:08 ` Vasily Khoruzhick
2011-01-06 16:03 ` Vasily Khoruzhick
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).