asmc: Add support for MacBookPro6,2
Modify asmc_sms_printintr() to be silent when the ambient light sensor interrupt fires on this model, since the messages can otherwise fill up the dmesg. PR: 265005 Reviewed by: markj MFC after: 2 weeks
This commit is contained in:
parent
05b6744c44
commit
3416f5cde7
@ -226,6 +226,12 @@ static const struct asmc_model asmc_models[] = {
|
||||
ASMC_MBP5_TEMPS, ASMC_MBP5_TEMPNAMES, ASMC_MBP5_TEMPDESCS
|
||||
},
|
||||
|
||||
{
|
||||
"MacBookPro6,2", "Apple SMC MacBook Pro (Mid 2010, 15-inch)",
|
||||
ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS,
|
||||
ASMC_MBP62_TEMPS, ASMC_MBP62_TEMPNAMES, ASMC_MBP62_TEMPDESCS
|
||||
},
|
||||
|
||||
{
|
||||
"MacBookPro8,1", "Apple SMC MacBook Pro (early 2011, 13-inch)",
|
||||
ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS,
|
||||
@ -1376,6 +1382,7 @@ asmc_sms_intrfast(void *arg)
|
||||
static void
|
||||
asmc_sms_printintr(device_t dev, uint8_t type)
|
||||
{
|
||||
struct asmc_softc *sc = device_get_softc(dev);
|
||||
|
||||
switch (type) {
|
||||
case ASMC_SMS_INTFF:
|
||||
@ -1387,8 +1394,17 @@ asmc_sms_printintr(device_t dev, uint8_t type)
|
||||
case ASMC_SMS_INTSH:
|
||||
device_printf(dev, "WARNING: possible shock!\n");
|
||||
break;
|
||||
case ASMC_ALSL_INT2A:
|
||||
/*
|
||||
* This suppresses console and log messages for the ambient
|
||||
* light sensor for the only model known to generate this
|
||||
* interrupt.
|
||||
*/
|
||||
if (strcmp(sc->sc_model->smc_model, "MacBookPro6,2") == 0)
|
||||
break;
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
device_printf(dev, "%s unknown interrupt\n", __func__);
|
||||
device_printf(dev, "unknown interrupt: 0x%x\n", type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,6 +109,11 @@ struct asmc_softc {
|
||||
#define ASMC_SMS_INTHA 0x6f /* High Acceleration Interrupt */
|
||||
#define ASMC_SMS_INTSH 0x80 /* Shock Interrupt */
|
||||
|
||||
/*
|
||||
* Light Sensor.
|
||||
*/
|
||||
#define ASMC_ALSL_INT2A 0x2a /* Ambient Light related Interrupt */
|
||||
|
||||
/*
|
||||
* Keyboard backlight.
|
||||
*/
|
||||
@ -232,6 +237,33 @@ struct asmc_softc {
|
||||
"Heatsink 2", "Memory Controller", \
|
||||
"PCI Express Slot Pin", "PCI Express Slot (unk)" }
|
||||
|
||||
#define ASMC_MBP62_TEMPS { "TB0T", "TB1T", "TB2T", \
|
||||
"TC0C", "TC0D", "TC0P", \
|
||||
"TC1C", "TG0D", "TG0P", \
|
||||
"TG0T", "TMCD", "TP0P", \
|
||||
"TPCD", "Th1H", "Th2H", \
|
||||
"Tm0P", "Ts0P", "Ts0S" }
|
||||
|
||||
#define ASMC_MBP62_TEMPNAMES { "enclosure_bottom_0", "enclosure_bottom_1", \
|
||||
"enclosure_bottom_2", "cpu0", \
|
||||
"cpu_diode", "cpu_proximity", \
|
||||
"cpu1", "gpu_diode", \
|
||||
"gpu_pin", "gpu_transistor", \
|
||||
"TMCD", "pch_controller_proximity", \
|
||||
"pch_die", "heatsink1", \
|
||||
"heatsink2", "memory-controller", \
|
||||
"palmrest", "memoryproximity" }
|
||||
|
||||
#define ASMC_MBP62_TEMPDESCS { "Enclosure Bottom 0", "Enclosure Bottom 1", \
|
||||
"Enclosure Bottom 2", "CPU 0", \
|
||||
"CPU Diode", "CPU Proximity", \
|
||||
"CPU 1", "GPU Diode", \
|
||||
"GPU Pin", "GPU Transistor", \
|
||||
"TMCD", "PCH Controller Proximity", \
|
||||
"PCH Die", "Heat Sink 1", \
|
||||
"Heat Sink 2", "Memory Controller", \
|
||||
"Palm Rest", "Memory Proximity" }
|
||||
|
||||
#define ASMC_MBP81_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \
|
||||
"TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \
|
||||
"TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \
|
||||
|
Loading…
Reference in New Issue
Block a user