ARM: sun4i: dt: cubieboard: Add axp209 support

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
irq: Add a new IRQF_ACK_BEFORE_UNMASK irq flag

In some cases we want to do an ack right before the unmask of an irq.

A typical example of such a case is having an i2c device which uses a level
interrupt. Such devices usually have an interrupt status register with
write to clear status bits. This means that the interrupt handler needs to
sleep to do i2c transfers to read / write the interrupt status register.

This means using a threaded interrupt handler and IRQF_ONESHOT so that the
interrupt does not re-trigger while the interrupt handler is waiting for the
i2c transfer.

Without ack-before-unmask the sequence of a single interrupt in this setup
looks like this:

i2c-device raises interrupt line
interrupt gets triggered
interrupt gets masked
interrupt gets acked
interrupt handling thread starts running
interrupt handling thread does its stuff, write-clears irq-status register
 in i2c-device
i2c-device lowers interrupt line (note this happens after the ack!)
interrupt handling thread is done
interrupt gets unmasked
interrupt immediately retriggers again, because the line has been high
 after the ack
interrupt gets masked
interrupt gets acked
interrupt handling thread starts running
interrupt handling thread reads irq-status register, has nothing todo
interrupt handling thread is done
interrupt gets unmasked

So in essence we get and handle 2 interrupts for what is 1 interrupt from
the i2c-device pov. By doing an ack before the unmask, the second interrupt
is avoided since at the point of the unmask the irq-thread has done its
job and cleared the interrupt source.

Note that things work fine without this patch, the purpose of this patch is
soley to avoid the second unneeded interrupt.

This patch uses an interrupt flag for this and not an irqchip flag because
the need for ack before unmask is based on the device and not on the irqchip.

Cc: Carlo Caione <carlo.caione@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
mfd: axp20x: Add IRQF_ACK_BEFORE_UNMASK

Use the new ACK_BEFORE_UNMASK flag to avoid unnecessary interrupts after
unmask.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>