lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 May 2011 16:38:15 +0100 (BST)
From:	Paul Parsons <lost.distance@...oo.com>
To:	Philipp Zabel <philipp.zabel@...il.com>
Cc:	linux-kernel@...r.kernel.org, sameo@...ux.intel.com
Subject: Re: [PATCH 1/2] mfd: Add ASIC3 LED support

Hi Philipp,

--- On Tue, 3/5/11, Philipp Zabel <philipp.zabel@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ