r2269 - trunk/src/host/qemu-neo1973/hw
andrew at sita.openmoko.org
andrew at sita.openmoko.org
Fri Jun 15 19:06:21 CEST 2007
Author: andrew
Date: 2007-06-15 19:06:20 +0200 (Fri, 15 Jun 2007)
New Revision: 2269
Modified:
trunk/src/host/qemu-neo1973/hw/pcf5060x.c
Log:
Invert PCF50606 NIRQ output. This should fix http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=607
Modified: trunk/src/host/qemu-neo1973/hw/pcf5060x.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/pcf5060x.c 2007-06-15 15:54:26 UTC (rev 2268)
+++ trunk/src/host/qemu-neo1973/hw/pcf5060x.c 2007-06-15 17:06:20 UTC (rev 2269)
@@ -62,6 +62,14 @@
QEMUTimer *onkeylow;
};
+static inline void pcf_update(struct pcf_s *s)
+{
+ qemu_set_irq(s->irq,
+ !((s->intr[0] & ~s->intm[0]) ||
+ (s->intr[1] & ~s->intm[1]) ||
+ (s->intr[2] & ~s->intm[2])));
+}
+
void pcf_reset(i2c_slave *i2c)
{
struct pcf_s *s = (struct pcf_s *) i2c;
@@ -123,16 +131,9 @@
s->gpoc[3] = 0x00;
s->gpoc[4] = 0x00;
s->gpo = 0x3c;
+ pcf_update(s);
}
-static inline void pcf_update(struct pcf_s *s)
-{
- qemu_set_irq(s->irq,
- (s->intr[0] & ~s->intm[0]) ||
- (s->intr[1] & ~s->intm[1]) ||
- (s->intr[2] & ~s->intm[2]));
-}
-
#define BATVOLT 88 /* Percentage */
#define BATT_MVOLTS_MIN 2800 /* Millivolts */
More information about the commitlog
mailing list