Skip to content

Instantly share code, notes, and snippets.

View chenhn123's full-sized avatar
📈

Weida chenhn123

📈
  • Weida Hi-Tech
  • 3F, No. 4, Creation Rd. III, Hsinchu Science Park,HsinChu 300093 Taiwan, R.O.C.
View GitHub Profile
@chenhn123
chenhn123 / bind_rebind_usbhid_driver
Last active November 23, 2022 07:26
Bind and unbind usbhid driver
(terminal):/sys/bus/usb/drivers/usbhid$ echo "1-11:1.0" | sudo tee -a bind
(terminal):/sys/bus/usb/drivers/usbhid$ echo "1-11:1.0" | sudo tee -a unbind
&i2c0 {
touchscreen@2c {
compatible = "hid-over-i2c";
reg = <0x2c>;
pinctrl-names = "default";
pinctrl-0 = <&touchscreen_pins>;
interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
post-power-on-delay-ms = <200>;
hid-descr-addr = <0x0020>;
};
@chenhn123
chenhn123 / rebind_hid_i2c.sh
Created February 5, 2024 10:30
How to rebind weida hid i2c device
#!/bin/sh
#
# Copyright (c) 2024 Randy Lai
# Copyright (c) Weida
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0