google/chromeec/acpi/ec: Add support for Device DPTF Profile Number
In order to support Multi-DPTF profile, Device DPTF Profile Number is introduced into EC_ACPI_MEM_DEVICE_ORIENTATION ACPI Space at offset 0x09. This bit field stays along with Tablet Mode Device flag. BUG=b:118149364 BRANCH=None TEST=Ensured that the expected DPTF table are loaded in different modes(base attached/detached and clamshell/360-flipped) on Soraka and Nautilus. Change-Id: Ie14916ac16c50cbe0990021e2eb03d5121cd0e07 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/29248 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
This commit is contained in:
parent
017b5c453a
commit
036ccd73a3
|
@ -52,6 +52,7 @@ Device (EC0)
|
||||||
PATC, 8, // Programmable Auxiliary Trip Commit
|
PATC, 8, // Programmable Auxiliary Trip Commit
|
||||||
CHGL, 8, // Charger Current Limit
|
CHGL, 8, // Charger Current Limit
|
||||||
TBMD, 1, // Tablet mode
|
TBMD, 1, // Tablet mode
|
||||||
|
DDPN, 3, // Device DPTF Profile Number
|
||||||
// DFUD must be 0 for the other 31 values to be valid
|
// DFUD must be 0 for the other 31 values to be valid
|
||||||
Offset (0x0a),
|
Offset (0x0a),
|
||||||
DFUD, 1, // Device Features Undefined
|
DFUD, 1, // Device Features Undefined
|
||||||
|
@ -509,6 +510,21 @@ Device (EC0)
|
||||||
Return (^TBMD)
|
Return (^TBMD)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Read current Device DPTF Profile Number */
|
||||||
|
Method (RCDP, 0, NotSerialized)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* DDPN = 0 is reserved for backwards compatibility.
|
||||||
|
* If DDPN == 0 use TBMD to load appropriate DPTF table.
|
||||||
|
*/
|
||||||
|
If (LEqual (^DDPN, 0)) {
|
||||||
|
Return (^TBMD)
|
||||||
|
} Else {
|
||||||
|
Subtract (^DDPN, 1, Local0)
|
||||||
|
Return (Local0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER)
|
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER)
|
||||||
/*
|
/*
|
||||||
* Enable USB Port Power
|
* Enable USB Port Power
|
||||||
|
|
Loading…
Reference in New Issue