Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samsung R710 battery #78

Open
otofoto opened this issue Jul 15, 2019 · 0 comments
Open

Samsung R710 battery #78

otofoto opened this issue Jul 15, 2019 · 0 comments

Comments

@otofoto
Copy link

otofoto commented Jul 15, 2019

Is it possible mod so battery reports correct cycle count?

`Device(H_EC)
{
Name(_HID, EISAID("PNP0C09"))
Name(_UID, One)
Method(_CRS, 0, NotSerialized)
{
Name(BFFR, ResourceTemplate()
{
IO(Decode16, 0x0062, 0x0062, 0x00, 0x01)
IO(Decode16, 0x0066, 0x0066, 0x00, 0x01)
})
Return(BFFR)
}
OperationRegion(ECR, EmbeddedControl, Zero, 0xFF)
Field(ECR, ByteAcc, Lock, Preserve)
{
Offset(0x18), //Offset(24),
SPTR, 8,
SSTS, 8,
SADR, 8,
SCMD, 8,
SBFR, 256,
SCNT, 8,
Offset(0x80), //Offset(128),
B1EX, 1,
, 1,
ACEX, 1,
, 5,
SWBE, 1,
DCBE, 1,
, 6,
WLST, 1,
, 7,
LIDS, 1,
, 7,
B1ST, 8,
, 8,
BRIT, 8,
Offset(0xA0), //Offset(160),
B1RP, 16,
B1RA, 16,
B1PR, 16,
B1VO, 16,
Offset(0xB0), //Offset(176),
B1DA, 16,
B1DF, 16,
B1DV, 16,
B1DL, 16,
Offset(0xC0), //Offset(192),
CTMP, 8,
Offset(0xC7), //Offset(199),
TIST, 8,
Offset(0xD0), //Offset(208),
B1TI, 16,
B1SE, 16,
B1CR, 16,
B1TM, 16,
}

Device(BAT1)
{
Name(_HID, EISAID("PNP0C0A"))
Name(_UID, One)
Name(BATI, Package(13)
{
One, 0xFFFFFFFF, 0xFFFFFFFF, One, 0xFFFFFFFF, 0x03, 0x0A, One, One,
"Unknown", "Unknown", "Unknown", "Unknown"
})
Method(_BIF, 0, NotSerialized)
{
If(LEqual(ECON, Zero))
{
Store(SECW(0x82, 0xB0, Zero), Local0)
If(LEqual(Local0, 0xFFFF))
{
Store(0xFFFFFFFF, Index(BATI, One))
}
Else
{
Store(Local0, Index(BATI, One))
}
Store(SECW(0x82, 0xB2, Zero), Local0)
If(LEqual(Local0, 0xFFFF))
{
Store(0xFFFFFFFF, Index(BATI, 0x02))
}
Else
{
Store(Local0, Index(BATI, 0x02))
}
Store(SECW(0x82, 0xB4, Zero), Local0)
If(LEqual(Local0, 0xFFFF))
{
Store(0xFFFFFFFF, Index(BATI, 0x04))
}
Else
{
Store(Local0, Index(BATI, 0x04))
}
Store(Zero, Index(BATI, 0x05))
Store(SECW(0x82, 0xB6, Zero), Local0)
If(LEqual(Local0, 0xFFFF))
{
Store(Zero, Index(BATI, 0x06))
}
Else
{
Store(Local0, Index(BATI, 0x06))
}
}
Else
{
Store(B1DA, Local0)
ShiftLeft(Local0, 0x08, Local1)
And(Local1, 0xFF00, Local1)
ShiftRight(Local0, 0x08, Local0)
Or(Local0, Local1, Local0)
If(LEqual(Local0, 0xFFFF))
{
Store(0xFFFFFFFF, Index(BATI, One))
}
Else
{
Store(Local0, Index(BATI, One))
}
Store(B1DF, Local0)
ShiftLeft(Local0, 0x08, Local1)
And(Local1, 0xFF00, Local1)
ShiftRight(Local0, 0x08, Local0)
Or(Local0, Local1, Local0)
If(LEqual(Local0, 0xFFFF))
{
Store(0xFFFFFFFF, Index(BATI, 0x02))
}
Else
{
Store(Local0, Index(BATI, 0x02))
}
Store(B1DV, Local0)
ShiftLeft(Local0, 0x08, Local1)
And(Local1, 0xFF00, Local1)
ShiftRight(Local0, 0x08, Local0)
Or(Local0, Local1, Local0)
If(LEqual(Local0, 0xFFFF))
{
Store(0xFFFFFFFF, Index(BATI, 0x04))
}
Else
{
Store(Local0, Index(BATI, 0x04))
}
Store(Zero, Index(BATI, 0x05))
Store(B1DL, Local0)
ShiftLeft(Local0, 0x08, Local1)
And(Local1, 0xFF00, Local1)
ShiftRight(Local0, 0x08, Local0)
Or(Local0, Local1, Local0)
If(LEqual(Local0, 0xFFFF))
{
Store(0xFFFFFFFF, Index(BATI, 0x06))
}
Else
{
Store(Local0, Index(BATI, 0x06))
}
}
Store("", Index(BATI, 0x09))
Store("", Index(BATI, 0x0A))
Store("LION", Index(BATI, 0x0B))
Store("SAMSUNG Electronics", Index(BATI, 0x0C))
Return(BATI)
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant