as there seem to be several people looking for a fast solution for the problem, here is my (dirty) workaround.
1. Look for the MAVEN device in /sys/devices/platform/i2c-X/name. Mine is i2c-2.
2. Change matrox_maven.c (in your DirectFB-sources) according to this snipplet:
/* Locate G400 maven /dev/i2c file */ if (!mav->g450) {
/*
found = 0; file = fopen( "/proc/bus/i2c", "r" );
if (!file) {
PERRORMSG( "DirectFB/Matrox/Maven: "
"Error opening `/proc/bus/i2c'!\n" );
return errno2dfb( errno );
}
while (fgets( line, 512, file )) {
if (strstr( line, "MAVEN" )) {
char *p = line;
while (!isspace( *p ))
p++;
*p = '\0';
strncpy( mav->dev, "/dev/", 6 );
strncat( mav->dev, line, 250 );
found = 1;
break;
}
}
fclose( file ); if (!found) {
ERRORMSG( "DirectFB/Matrox/Maven: "
"Can't find MAVEN in /proc/bus/i2c!\n" );
return DFB_UNSUPPORTED;
}
*/
strncpy( mav->dev, "/dev/i2c-2", 11 ); /* Try to use it */
if ((fd = open( mav->dev, O_RDWR )) < 0) {
PERRORMSG( "DirectFB/Matrox/Maven: Error opening `%s'!\n",
mav->dev );
return errno2dfb( errno );
}I basically commented out the /proc/-part and hardcoded the device id:
strncpy( mav->dev, "/dev/i2c-2", 11 )
3. Compile (and don't change your i2c-device order ;-)
Best regards, Markus Schneider
--
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe directfb-users" as subject.
