From: Paul Parsons <lost.distance@yahoo.com>
To: Philipp Zabel <philipp.zabel@gmail.com>
Cc: linux-kernel@vger.kernel.org, sameo@linux.intel.com
Subject: Re: [PATCH 1/2] mfd: Add ASIC3 LED support
Date: Tue, 3 May 2011 16:38:15 +0100 (BST) [thread overview]
Message-ID: <482414.94626.qm@web29014.mail.ird.yahoo.com> (raw)
In-Reply-To: <1304419612.13769.17.camel@flow>
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
next prev parent reply other threads:[~2011-05-03 15:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-30 17:59 [PATCH 1/2] mfd: Add ASIC3 LED support Paul Parsons
2011-05-02 15:39 ` Samuel Ortiz
2011-05-02 22:16 ` Paul Parsons
2011-05-03 8:33 ` Samuel Ortiz
2011-05-03 10:41 ` Philipp Zabel
2011-05-03 10:46 ` Philipp Zabel
2011-05-03 15:38 ` Paul Parsons [this message]
2011-05-03 19:46 ` Paul Parsons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=482414.94626.qm@web29014.mail.ird.yahoo.com \
--to=lost.distance@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=philipp.zabel@gmail.com \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.