[Windows 8 General] Wootever:
Updated kernel source is available at: https://github.com/Wootever/kernel_i7_stylus/tree/kernel-4.4

A patch to set acceleration to inverted via property settings:

commit adfcc60a041401d25c89984071045e524fa2c457
Author: Wootever <Wootever@users.noreply.github.com>
Date: Sat Feb 6 16:41:07 2016 +0100

add property setting for inverting acceleration axis

diff --git a/iio-sensors.cpp b/iio-sensors.cpp
index 157d68c..4c5007c 100644
--- a/iio-sensors.cpp
+++ b/iio-sensors.cpp
@@ -239,12 +239,20 @@ template<> int Sensor<ID_ACCELERATION>::readEvents(sensors_event_t *data, int cn
{
static float scale = read_sysfs_float((*nodes)[0]);
int ret = SensorBase::readEvents(data, cnt);
-	// TODO: read orientation from the properties
+
+	char invert[PROPERTY_VALUE_MAX];
+	property_get("hal.sensors.iio.accel", invert, "0");
+
for (int i = 0; i < ret; ++i) {
-	data[i].acceleration.x = -scale * read_sysfs_int("in_accel_x_raw");
-	data[i].acceleration.y = scale * read_sysfs_int("in_accel_y_raw");
-	data[i].acceleration.z = -scale * read_sysfs_int("in_accel_z_raw");
-	data[i].acceleration.status = SENSOR_STATUS_ACCURACY_HIGH;
+	if (strcmp(invert, "1") == 0) {
+	data[i].acceleration.x = scale * read_sysfs_int("in_accel_x_raw");
+	data[i].acceleration.y = -scale * read_sysfs_int("in_accel_y_raw");
+	} else {
+	data[i].acceleration.x = -scale * read_sysfs_int("in_accel_x_raw");
+	data[i].acceleration.y = scale * read_sysfs_int("in_accel_y_raw");
+	}
+	data[i].acceleration.z = -scale * read_sysfs_int("in_accel_z_raw");
+	data[i].acceleration.status = SENSOR_STATUS_ACCURACY_HIGH;
}
return ret;
}[/HIDE]

And a patch to fix the acpi charger detection on android:

commit 12c3e04fb7744c5c8f211e81960161a830ec06f4
Author: Wootever <Wootever@users.noreply.github.com>
Date: Sat Feb 6 16:37:25 2016 +0100

simple workaround for failing acpi charger detection

diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp
index 396dfef..1f0e95d 100644
--- a/healthd/BatteryMonitor.cpp
+++ b/healthd/BatteryMonitor.cpp
@@ -200,15 +200,6 @@ bool BatteryMonitor::update(void) {
mBatteryFixedTemperature :
getIntField(mHealthdConfig->batteryTemperaturePath);

- // For devices which do not have battery and are always plugged
- // into power souce.
- if (mAlwaysPluggedDevice) {
- props.chargerAcOnline = true;
- props.batteryPresent = true;
- props.batteryStatus = BATTERY_STATUS_CHARGING;
- props.batteryHealth = BATTERY_HEALTH_GOOD;
- }
-
const int SIZE = 128;
char buf[SIZE];
String8 btech;
@@ -216,6 +207,11 @@ bool BatteryMonitor::update(void) {
if (readFromFile(mHealthdConfig->batteryStatusPath, buf, SIZE) > 0)
props.batteryStatus = getBatteryStatus(buf);

+ if (props.batteryStatus == 2)
+ props.chargerAcOnline = true;
+ else
+ props.chargerAcOnline = false;
+
if (readFromFile(mHealthdConfig->batteryHealthPath, buf, SIZE) > 0)
props.batteryHealth = getBatteryHealth(buf);

@@ -552,15 +548,6 @@ void BatteryMonitor::init(struct healthd_config *hc) {
closedir(dir);
}

- // This indicates that there is no charger driver registered.
- // Typically the case for devices which do not have a battery and
- // and are always plugged into AC mains.
- if (!mChargerNames.size()) {
- KLOG_ERROR(LOG_TAG, "No charger supplies found\n");
- mBatteryFixedCapacity = ALWAYS_PLUGGED_CAPACITY;
- mBatteryFixedTemperature = FAKE_BATTERY_TEMPERATURE;
- mAlwaysPluggedDevice = true;
- }
if (!mBatteryDevicePresent) {
KLOG_WARNING(LOG_TAG, "No battery devices found\n");
hc->periodic_chores_interval_fast = -1;[/HIDE]

Additions for init.sh:

VENDOR=$(cat $DMIPATH/sys_vendor)

if [ "$VENDOR" = "Cube" ]; then
setprop hal.sensors.iio.accel 1
if [ ! -d /sys/bus/i2c/drivers/i2c_hid/i2c-FTSC* ]; then
rmmod i2c_hid
modprobe i2c_hid; fi; fi[/HIDE]

[MENTION=7253207]techbissu[/MENTION]

Check if one of the lower flexible flat cables are jammed or touched by the backcover.

Fast link training disabled Bios: https://mega.nz/#!rIxnzQQS!Dv0YIjfAflYvKrHMJSzCdVRtukN2txdUr-zjiRDBdTs