View | Details | Raw Unified | Return to bug 265005 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/src/sys/dev/asmc/asmc.c (-1 / +17 lines)
Lines 227-232 Link Here
227
	},
227
	},
228
228
229
	{
229
	{
230
	 "MacBookPro6,2", "Apple SMC MacBook Pro (Mid 2010, 15-inch)",
231
	 ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS,
232
	 ASMC_MBP62_TEMPS, ASMC_MBP62_TEMPNAMES, ASMC_MBP62_TEMPDESCS
233
	},
234
235
	{
230
	  "MacBookPro8,1", "Apple SMC MacBook Pro (early 2011, 13-inch)",
236
	  "MacBookPro8,1", "Apple SMC MacBook Pro (early 2011, 13-inch)",
231
	  ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS,
237
	  ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS,
232
	  ASMC_MBP81_TEMPS, ASMC_MBP81_TEMPNAMES, ASMC_MBP81_TEMPDESCS
238
	  ASMC_MBP81_TEMPS, ASMC_MBP81_TEMPNAMES, ASMC_MBP81_TEMPDESCS
Lines 1314-1319 Link Here
1314
static void
1320
static void
1315
asmc_sms_printintr(device_t dev, uint8_t type)
1321
asmc_sms_printintr(device_t dev, uint8_t type)
1316
{
1322
{
1323
	char *model;
1317
1324
1318
	switch (type) {
1325
	switch (type) {
1319
	case ASMC_SMS_INTFF:
1326
	case ASMC_SMS_INTFF:
Lines 1325-1332 Link Here
1325
	case ASMC_SMS_INTSH:
1332
	case ASMC_SMS_INTSH:
1326
		device_printf(dev, "WARNING: possible shock!\n");
1333
		device_printf(dev, "WARNING: possible shock!\n");
1327
		break;
1334
		break;
1335
	case ASMC_ALSL_INT2A:
1336
		/* 
1337
		 * This suppresses console and log messages for the ambient light sensor
1338
		 * for the only model known to generate this interrupt.
1339
		 */
1340
		model = kern_getenv("smbios.system.product");
1341
		if( strcmp(model,"MacBookPro6,2") != 0 )
1342
			device_printf(dev, "%s unknown interrupt for model %s: 0x%x\n", __func__, model, type);
1343
		break;
1328
	default:
1344
	default:
1329
		device_printf(dev, "%s unknown interrupt\n", __func__);
1345
		device_printf(dev, "%s unknown interrupt: 0x%x\n", __func__, type);
1330
	}
1346
	}
1331
}
1347
}
1332
1348
(-)/usr/src/sys/dev/asmc/asmcvar.h (+32 lines)
Lines 110-115 Link Here
110
#define ASMC_SMS_INTSH		0x80	/* Shock Interrupt */
110
#define ASMC_SMS_INTSH		0x80	/* Shock Interrupt */
111
111
112
/*
112
/*
113
 * Light Sensor.
114
 */
115
#define ASMC_ALSL_INT2A		0x2a	/* Ambient Light related Interrupt */
116
117
/*
113
 * Keyboard backlight.
118
 * Keyboard backlight.
114
 */
119
 */
115
#define ASMC_KEY_LIGHTLEFT	"ALV0"	/* RO; 6 bytes */
120
#define ASMC_KEY_LIGHTLEFT	"ALV0"	/* RO; 6 bytes */
Lines 231-236 Link Here
231
				  "Northbridge Pin", "Unknown", \
236
				  "Northbridge Pin", "Unknown", \
232
				  "Heatsink 2", "Memory Controller", \
237
				  "Heatsink 2", "Memory Controller", \
233
				  "PCI Express Slot Pin", "PCI Express Slot (unk)" }
238
				  "PCI Express Slot Pin", "PCI Express Slot (unk)" }
239
240
#define ASMC_MBP62_TEMPS         { "TB0T", "TB1T", "TB2T", \
241
				   "TC0C", "TC0D", "TC0P", \
242
				   "TC1C", "TG0D", "TG0P", \
243
				   "TG0T", "TMCD", "TP0P", \
244
				   "TPCD", "Th1H", "Th2H", \
245
                   "Tm0P", "Ts0P", "Ts0S" }
246
        
247
#define ASMC_MBP62_TEMPNAMES     { "enclosure_bottom_0", "enclosure_bottom_1", \
248
				   "enclosure_bottom_2", "cpu0", \
249
				   "cpu_diode", "cpu_proximity", \
250
				   "cpu1", "gpu_diode", \
251
				   "gpu_pin", "gpu_transistor", \
252
				   "TMCD", "pch_controller_proximity", \
253
				   "pch_die", "heatsink1", \
254
				   "heatsink2", "memory-controller", \
255
				   "palmrest", "memoryproximity" }
256
        
257
#define ASMC_MBP62_TEMPDESCS     { "Enclosure Bottom 0", "Enclosure Bottom 1", \
258
				   "Enclosure Bottom 2", "CPU 0", \
259
				   "CPU Diode", "CPU Proximity", \
260
				   "CPU 1", "GPU Diode", \
261
				   "GPU Pin", "GPU Transistor", \
262
                   "TMCD", "PCH Controller Proximity", \
263
				   "PCH Die", "Heat Sink 1", \
264
				   "Heat Sink 2", "Memory Controller", \
265
				   "Palm Rest", "Memory Proximity" }
234
266
235
#define ASMC_MBP81_TEMPS	{ "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \
267
#define ASMC_MBP81_TEMPS	{ "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \
236
				  "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \
268
				  "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \

Return to bug 265005