+ else if( access( "/sys/devices/applesmc.768/position", R_OK ) == 0 )
+ {
+ /* Apple SMC (newer macbooks) */
+ /* Should be factorised with HDAPS */
+ f = fopen( "/sys/devices/applesmc.768/calibrate", "r" );
+ if( f )
+ {
+ i_x = i_y = 0;
+ fscanf( f, "(%d,%d)", &i_x, &i_y );
+ fclose( f );
+ p_intf->p_sys->i_calibrate = i_x;
+ p_intf->p_sys->sensor = APPLESMC_SENSOR;
+ }
+ else
+ {
+ p_intf->p_sys->sensor = NO_SENSOR;
+ }
+ }
+#ifdef __APPLE__
+ else if((p_intf->p_sys->unimotion_hw = detect_sms()))
+ p_intf->p_sys->sensor = UNIMOTION_SENSOR;
+#endif