I'm using the Mini2440 with the one wire ts P35 display. Everything works fine until I try and initialize the GPIO's on the mini2440 then i get a constant ouput "one_wire_status: 1" in the console. Here is the code I'm using to initialize the GPIOs (This code used to work fine with the other displays): //****************************************************************************** ** // GPIO initialization //****************************************************************************** ** int GPIOInit(u8 GPIO, u8 Direction, u8 Value) { FILE *TempFilePtr; char TempString[50]; int TempFileHandle; // Export the GPIO TempFilePtr = fopen("/sys/class/gpio/export", "w"); sprintf(TempString, "%i", GPIO); fputs(TempString, TempFilePtr); fclose(TempFilePtr); // Set the GPIO direction sprintf(TempString, "/sys/class/gpio/gpio%i/direction", GPIO); TempFilePtr = fopen(TempString, "w"); switch (Direction) { case DIRECTION_OUT : fputs("out", TempFilePtr); break; case DIRECTION_IN : fputs("in", TempFilePtr); break; default : fputs("in", TempFilePtr); break; } fclose(TempFilePtr); // Set the GPIO value sprintf(TempString, "/sys/class/gpio/gpio%i/value", GPIO); //TempFilePtr = fopen(TempString, "w"); TempFileHandle = open(TempString, 0); switch (Value) { case 0 : write(TempFileHandle, "0", 1); break; case 1 : write(TempFileHandle, "1", 1); break; default : write(TempFileHandle, "0", 1); break; } close(TempFileHandle); return TempFileHandle; }
One wire ts conflict with GPIO access problem
Mount the debugfs and take a look into the gpio related files in "/sys/kernel/debug". Maybe it could give you some hints, what is going wrong.
Ok, I had to add a 1wire touch screen driver (mini2440_1wire_host) to the kernel such that it will create a "touchscreen-1wire" device node. I got this driver from the FriendlyARM linix-2.6.32.2 kernel. This guy is the culprit for sending those messages. Not sure yet its this that is conflicting with the GPIO. I will have to dig in the driver code to see why its doing that and also have a look at debugfs.