Skip to content
Snippets Groups Projects
Commit 7efc564e authored by Denny Harijanto's avatar Denny Harijanto
Browse files

asus-tf101: USB Networking and Touch Screen Support

parent 2a4d30e5
No related branches found
No related tags found
No related merge requests found
Showing with 1098 additions and 17 deletions
......@@ -2,7 +2,7 @@
pkgname="device-asus-tf101"
pkgdesc="Asus Eee Pad Transformer"
pkgver=0.2
pkgrel=4
pkgrel=5
url="https://postmarketos.org"
license="MIT"
arch="armhf"
......@@ -19,4 +19,4 @@ package() {
devicepkg_package $startdir $pkgname
}
sha512sums="20dc8c549c692eed98d41117efb526db394089d9a2cfa98bbe349c42345388e88059205f6c72f4dda51ef532367adf4b0149a6ef8d0da95941e1a3f37b242538 deviceinfo"
sha512sums="2842325a598165fb33a1cd9ed9a9c227d220014267af5d36dcf20e7d4828403ef6d5fe3674d65d4d9949e5881dfbe3c3bdf5502c488ae3a81ca76e382cfefb7d deviceinfo"
......@@ -15,7 +15,7 @@ deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1280"
deviceinfo_screen_height="800"
deviceinfo_dev_touchscreen=""
deviceinfo_dev_touchscreen="/dev/input/event0"
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
......
From cff9887d760d3678198a3b8de8602cf464eb2f31 Mon Sep 17 00:00:00 2001
From: Denny Harijanto <denny@nusantara-cloud.com>
Date: Sun, 3 Feb 2019 11:36:15 +0700
Subject: [PATCH 1/5] Revert "Update TF101"
This cause Android USB networking to fail.
This reverts commit 1a5e680a26c7f820a60bea26ace5d1c014e4f8b3.
---
drivers/usb/gadget/f_rndis.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
index 3e3dcf401c8..f187b9eee9e 100644
--- a/drivers/usb/gadget/f_rndis.c
+++ b/drivers/usb/gadget/f_rndis.c
@@ -857,8 +857,8 @@ static inline bool can_support_rndis(struct usb_configuration *c)
* for calling @gether_cleanup() before module unload.
*/
int
-rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]/*,
- u32 vendorID, const char *manufacturer*/)
+rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
+ u32 vendorID, const char *manufacturer)
{
struct f_rndis *rndis;
int status;
@@ -903,8 +903,8 @@ rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]/*,
goto fail;
memcpy(rndis->ethaddr, ethaddr, ETH_ALEN);
-// rndis->vendorID = vendorID;
-// rndis->manufacturer = manufacturer;
+ rndis->vendorID = vendorID;
+ rndis->manufacturer = manufacturer;
/* RNDIS activates when the host changes this filter */
rndis->port.cdc_filter = 0;
--
2.19.1
From ba7dad392328029479155a17fce3a092a9324461 Mon Sep 17 00:00:00 2001
From: Denny Harijanto <denny@nusantara-cloud.com>
Date: Sun, 3 Feb 2019 11:37:56 +0700
Subject: [PATCH 2/5] Revert "Update TF101"
This caused Android USB Networking to fail.
This reverts commit cd2d67ade1f139664969465c86cb8136bd764e08.
---
drivers/usb/gadget/u_ether.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/u_ether.h
index a1ab45dbe08..46772413f0d 100644
--- a/drivers/usb/gadget/u_ether.h
+++ b/drivers/usb/gadget/u_ether.h
@@ -111,18 +111,18 @@ int eem_bind_config(struct usb_configuration *c);
#ifdef USB_ETH_RNDIS
-int rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]/*,
- u32 vendorID, const char *manufacturer*/);
+int rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
+ u32 vendorID, const char *manufacturer);
#else
static inline int
-rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]/*,
- u32 vendorID, const char *manufacturer*/)
+rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
+ u32 vendorID, const char *manufacturer)
{
return 0;
}
#endif
-#endif /* __U_ETHER_H */
\ No newline at end of file
+#endif /* __U_ETHER_H */
--
2.19.1
This diff is collapsed.
From d88ca42d93cc0f8b51dce0887578920eba0cb797 Mon Sep 17 00:00:00 2001
From: Denny Harijanto <denny@nusantara-cloud.com>
Date: Mon, 4 Feb 2019 13:13:11 +0700
Subject: [PATCH 4/5] Added Parameters to Atmel TouchScreen Drivers
Libinput expects both ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR to have
proper min and max value. Without them, the input device is rejected.
---
drivers/input/touchscreen/atmel_mxt1386.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt1386.c b/drivers/input/touchscreen/atmel_mxt1386.c
index 0ee2949edb5..6769d3a8938 100644
--- a/drivers/input/touchscreen/atmel_mxt1386.c
+++ b/drivers/input/touchscreen/atmel_mxt1386.c
@@ -2997,8 +2997,8 @@ static int __devinit mxt_probe(struct i2c_client *client,
// multi touch
input_set_abs_params(input, ABS_MT_POSITION_X, 0, mxt->pdata->max_x, 0, 0);
input_set_abs_params(input, ABS_MT_POSITION_Y, 0, mxt->pdata->max_y, 0, 0);
- input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 0, 0, 0);
- input_set_abs_params(input, ABS_MT_WIDTH_MAJOR, 0, 0, 0, 0);
+ input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 0xff, 0, 0);
+ input_set_abs_params(input, ABS_MT_WIDTH_MAJOR, 0, 0xff, 0, 0);
// input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, MXT_MAX_NUM_TOUCHES, 0, 0);
// input_set_abs_params(input, ABS_MT_PRESSURE, 0, 255, 0, 0);
--
2.19.1
......@@ -2,7 +2,7 @@
pkgname="linux-asus-tf101"
pkgver=3.1.10
pkgrel=2
pkgrel=3
pkgdesc="Asus Eee Pad Transformer kernel fork"
arch="armhf"
_carch="arm"
......@@ -27,12 +27,15 @@ _commit="5ddd9654ec52599fbef71657ad2e03b3cdacee31"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/jmrohwer/${_repository}/archive/${_commit}.tar.gz
$_config
compiler-gcc6.h
00_fix_return_address.patch
00-fix_return_address.patch
01-fix-alignment.patch
02_fix_static_vma_address.patch
03_remove_deprecated_perl.patch
02-fix_static_vma_address.patch
04-Revert-Update-TF101.patch
05-Revert-Update-TF101.patch
06-Enable-USB-Networking.patch
07-Added-Parameters-to-Atmel-TouchScreen-Drivers.patch
$_config
"
builddir="$srcdir/${_repository}-${_commit}"
......@@ -83,17 +86,19 @@ package() {
# Modules
cd "$builddir"
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
CONFIG_NO_ERROR_ON_MISMATCH=y \
make modules_install \
ARCH="$_carch" \
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 \
modules_install
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1
}
sha512sums="44a2bccef4f5d9258aee8d7c8cdb2572f7136cf1a3487e6290457a21de28ecc4201951f5ea89d9392a44d0980f66a590cf23696209639b63dafefd4d39662902 linux-asus-tf101-5ddd9654ec52599fbef71657ad2e03b3cdacee31.tar.gz
533575b9b66d99eb4237325ed7972f68adb01c0d3948f58e8c014f7f26338c3e224dea738d76e3ebdd35816f16bacb1ee46abcaeeeee52adec1aee2b43d8b805 config-asus-tf101.armhf
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00-fix_return_address.patch
cdddc37d3c173c931631037d7c337e45589420eba956231436b8d3b857b942db7fd33e4800d0badaa6f09d33a5373a9f0bf173748e8e72b237bd7d699e7fe4a8 01-fix-alignment.patch
59231af0dee68fc424d1ad78f62c491ace795d4cc4af4c26e59b08da5c10cfc406dfc980305f851254bbfa7f03b1bc75f8072f4b4d0f06629ebdbb9ca5a6fea9 02_fix_static_vma_address.patch
cd0bc463eae0372554d09dac7914ae391f999ca4a77238f761dee636a398eb45e6c02280b7035c8d162ce539f646f3e4170f180ba2e78262c22e308f094d2cd2 03_remove_deprecated_perl.patch"
59231af0dee68fc424d1ad78f62c491ace795d4cc4af4c26e59b08da5c10cfc406dfc980305f851254bbfa7f03b1bc75f8072f4b4d0f06629ebdbb9ca5a6fea9 02-fix_static_vma_address.patch
3644b617593740112732fdfda50814889e0d23bed1b53666138efa2eaae2c73568c8d60c4eda7a5d3a041eb81baaef5935421548791ee92f53868314f58f3242 04-Revert-Update-TF101.patch
bc8d62c7bf3de7074b5526906716326dede61f7358278b0a88f33e8fa235dc5305e0fbb45e751817db2aec1fca9ea116962527a2d772fe3892e176a07a8635bd 05-Revert-Update-TF101.patch
60067a14f1b8f71c7cd32f7eaf09c086b0641240ffee55cf4363ba050526625f55e1601fc4702b115f0a301e4526effe487fd1b6cfa85790b20e26fb09ca4f08 06-Enable-USB-Networking.patch
59d9c2b365123acd6eca7b78403a893d8d78867db182ddc1fda2c521e85bb86f871fcb32ecc3ae5248a2cbb93a644a9d665085defe07987ece70326323329953 07-Added-Parameters-to-Atmel-TouchScreen-Drivers.patch
e0118841755fcd2e93fdbead56b7e2825819f0295a44a5456eef05fd058481074e706eb8de4ef3dae043b405a878b013bc013ca31ecd63273cecadb2801b6373 config-asus-tf101.armhf"
......@@ -2227,6 +2227,7 @@ CONFIG_USB_EHCI_TEGRA=y
# CONFIG_USB_WHCI_HCD is not set
# CONFIG_USB_HWA_HCD is not set
# CONFIG_USB_EHCI_ONOFF_FEATURE is not set
# CONFIG_USB_MUSB_HDRC is not set
#
# USB Device Class drivers
......@@ -2348,7 +2349,42 @@ CONFIG_USB_SERIAL_OPTION=y
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
# CONFIG_USB_GADGET is not set
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=2
# CONFIG_USB_FSL_USB2 is not set
# CONFIG_USB_FUSB300 is not set
CONFIG_USB_TEGRA=y
# CONFIG_USB_R8A66597 is not set
# CONFIG_USB_M66592 is not set
# CONFIG_USB_AMD5536UDC is not set
# CONFIG_USB_CI13XXX_PCI is not set
# CONFIG_USB_NET2272 is not set
# CONFIG_USB_NET2280 is not set
# CONFIG_USB_GOKU is not set
# CONFIG_USB_LANGWELL is not set
# CONFIG_USB_EG20T is not set
# CONFIG_USB_DUMMY_HCD is not set
CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_ZERO is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_ETH is not set
# CONFIG_USB_G_NCM is not set
# CONFIG_USB_GADGETFS is not set
# CONFIG_USB_FUNCTIONFS is not set
# CONFIG_USB_FILE_STORAGE is not set
# CONFIG_USB_MASS_STORAGE is not set
# CONFIG_USB_G_SERIAL is not set
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_G_PRINTER is not set
CONFIG_USB_G_ANDROID=y
# CONFIG_USB_CDC_COMPOSITE is not set
# CONFIG_USB_G_MULTI is not set
# CONFIG_USB_G_HID is not set
# CONFIG_USB_G_DBGP is not set
# CONFIG_USB_G_WEBCAM is not set
#
# OTG and related infrastructure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment