Hi Jacek, On 16.04.2015 16:37, Jacek Anaszewski wrote: > Hi Alvaro, > > On 04/05/2015 05:08 PM, Álvaro Fernández Rojas wrote: (snip) >> +static int bcm6328_hwled(struct device *dev, struct device_node *nc, u32 reg, >> + void __iomem *mem, spinlock_t *lock) >> +{ >> + int i, cnt; >> + unsigned long flags, val; >> + >> + spin_lock_irqsave(lock, flags); >> + val = bcm6328_led_read(mem + REG_HWDIS); >> + val &= ~BIT(reg); >> + bcm6328_led_write(mem + REG_HWDIS, val); > > What is the purpose of REG_HWDIS register? Does it activate the LED or > so? The HWDIS register controls whether the led will be controlled by a hardware signal, with 0 meaning hardware control enabled and 1 hardware control disabled. This is usually 1:1 for hardware to led signals, but through the activity/link registers you have some limited control over rerouting it. Note that even with a bit cleared there is limited control over the led; you can still let it blink and light it up if it isn't, but not turn it off if the hardware decided to light it up. The default is to disable all hardware signals, and only enable them to be driven by hardware if requested. Regards Jonas -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html