Skip to content

Instantly share code, notes, and snippets.

View aaronlu's full-sized avatar

Aaron Lu aaronlu

  • Intel
  • China, Shanghai
View GitHub Profile
@aaronlu
aaronlu / t100_PMIC_operation_region
Created September 5, 2014 02:53
T100 CrystalCove PMIC example ASL code
Device (PMIC)
{
Name (_ADR, Zero) // _ADR: Address
Name (_HID, "INT33FD") // _HID: Hardware ID
Name (_CID, "INT33FD") // _CID: Compatible ID
Name (_DDN, "PMIC GPIO Controller") // _DDN: DOS Device Name
Name (_HRV, 0x02) // _HRV: Hardware Revision
Name (_UID, One) // _UID: Unique ID
Name (_DEP, Package (0x01) // _DEP: Dependencies
{
@aaronlu
aaronlu / opregion_bqc.txt
Last active December 21, 2015 13:48
Intel operation region and _BQC
A typical ASL code for the backlight control method _BCM with Intel
graphics card is as follows:
Method (_BCM, 1, NotSerialized)
{
If (BRNC)
{
AINT (One, Arg0)
}
Else
@aaronlu
aaronlu / hrtimer
Created July 26, 2013 09:01
x86_64 timer init
1st stage
start_kernel
-> time_init -> set late_time_init to x86_late_time_init
-> late_time_init => x86_late_time_init
-> x86_init.timers.timer_init => hpet_timer_init
-> hpet_enable
-> hpet_legacy_clockevent_register()
the clock_event_device is registered as a per-cpu clock event device
-> tsc_init
@aaronlu
aaronlu / backlight
Created June 14, 2013 06:16
Backlight background and solution
i. Some background on backlight control:
For a laptop, there usually are three sources to control backlight:
one from video module's ACPI interface;
one from x86 platform driver's ACPI interface;
one from GPU driver's native interface.
All of them will register a backlight device, which will create a sysfs
interface under /sys/class/backlight for users to control, they are
identified by their type:
@aaronlu
aaronlu / backlight_background
Last active December 18, 2015 05:39
Backlight control
i. Some background on backlight control:
For a laptop, there usually are three sources to control backlight:
one from video module's ACPI interface;
one from x86 platform driver's ACPI interface;
one from GPU driver's native interface.
All of them will register a backlight device, which will create a sysfs
interface under /sys/class/backlight for users to control, they are
identified by their type: