lkml.org 
[lkml]   [2011]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 1/2] mfd: Add ASIC3 LED support
Hi Philipp,

--- On Tue, 3/5/11, Philipp Zabel <philipp.zabel@gmail.com> wrote:
> This patch reverts your ASIC3_GPIOC?_LED? changes to keep
> the gpios as
> outputs and informs the led driver via struct asic3_led of
> the gpio to
> toggle in the brightness_set and blink_set callbacks.
>
> Does this work for you?

Well, it works in the sense that the LEDs still operate as before. In other words, calling gpio_set_value() has made no difference to the driver's behaviour.

So I'm confused as to what the patch is intended to demonstrate. Surely we want to use the LED GPIOs instead of the TimeBase enable bit, not in addition to it.

As a quick experiment, I modified the driver again to clear the TimeBase enable bit:

--- leds-asic3.c 2011-05-03 15:58:18.372196585 +0100
+++ drivers/leds/leds-asic3.c 2011-05-03 16:12:33.832902946 +0100
@@ -50,7 +50,7 @@ static void brightness_set(struct led_cl
if (value != LED_OFF)
gpio_set_value(led->gpio, 1);

- timebase = (value == LED_OFF) ? 0 : (LED_EN|0x4);
+ timebase = (value == LED_OFF) ? 0 : (0|0x4);

base = led_n_base[cell->id];
asic3_write_register(asic, (base + ASIC3_LED_PeriodTime), 32);
@@ -94,7 +94,7 @@ static int blink_set(struct led_classdev
asic3_write_register(asic, (base + ASIC3_LED_PeriodTime), (on + off));
asic3_write_register(asic, (base + ASIC3_LED_DutyTime), on);
asic3_write_register(asic, (base + ASIC3_LED_AutoStopCount), 0);
- asic3_write_register(asic, (base + ASIC3_LED_TimeBase), (LED_EN|0x4));
+ asic3_write_register(asic, (base + ASIC3_LED_TimeBase), (0|0x4));

*delay_on = CLK_TO_MS(on);
*delay_off = CLK_TO_MS(off);
This was to check whether the LED GPIOs performed the same function as the TimeBase enable bit, which would be a useful result. But they didn't; the LEDs stopped working.

So I must conclude that there is still no evidence that the LED GPIOs work as outputs. They do work as inputs however, per my previous observations.

Maybe there exists an ASIC3 control register which can change the direction of the LED GPIOs from inputs to outputs?

Regards,
Paul


\
 
 \ /
  Last update: 2011-05-03 17:41    [W:0.053 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site