Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
fa20fd0
VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist
fenrus75 Mar 21, 2024
8da3a84
dmaengine: idxd: add a new security check to deal with a hardware err…
fenrus75 Apr 24, 2024
21a8f1c
dmaengine: idxd: add a write() method for applications to submit work
nikhilprao Apr 24, 2024
cc219cb
keys: Fix overwrite of key expiration on instantiation
Mar 15, 2024
ddb0273
wifi: mt76: mt7915: add missing chanctx ops
greearb Mar 27, 2024
b019fcc
Linux 6.9.1
gregkh May 17, 2024
a8c1ad2
ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER
heftig Sep 16, 2019
373866d
drivers/firmware: skip simpledrm if nvidia-drm.modeset=1 is set
martinezjavier May 19, 2022
2cd747d
arch/Kconfig: Default to maximum amount of ASLR bits
heftig Jan 13, 2024
308d531
docs: kernel_include.py: Fix build with docutils 0.21.1
heftig Apr 13, 2024
85c0510
amdgpu: enable overdrive by default
BoukeHaarsma23 Dec 12, 2023
9c38019
drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model
Samsagax Jun 21, 2023
696dcc5
drm: panel-orientation-quirks: Add quirk for AYA NEO Founder edition
Samsagax Jun 21, 2023
10eb4cd
drm: panel-orientation-quirks: Add quirk for AYA NEO GEEK
Samsagax Jun 21, 2023
cede4d0
drm: panel-orientation-quirks: Add quirk for Ayn Loki Zero
BoukeHaarsma23 Oct 7, 2023
9c5cb4f
drm: panel-orientation-quirks: Add quirk for Ayn Loki Max
BoukeHaarsma23 Oct 7, 2023
6127393
Ayaneo geek headset patch
BoukeHaarsma23 Sep 22, 2023
b62b72b
ayaneo 2 headphone fix
BoukeHaarsma23 Sep 22, 2023
07bce11
HID: asus: fix more n-key report descriptors if n-key quirked
flukejones Dec 2, 2023
309a530
HID: asus: make asus_kbd_init() generic, remove rog_nkey_led_init()
flukejones Dec 2, 2023
b0de133
HID: asus: add ROG Ally N-Key ID and keycodes
flukejones Nov 29, 2023
9ea9f9f
HID: asus: add ROG Ally xpad settings
flukejones Dec 1, 2023
7a07635
HACK: add KConfig to enable driver-specific color mgmt props
melissawen Apr 22, 2023
4f6589f
Don't create color_mgmt_properties on asics < SIENNA_CICHLID
BoukeHaarsma23 Dec 15, 2023
025468c
drm: Add GPU reset sysfs event
contactshashanksharma Mar 7, 2022
8be4d27
drm/amdgpu: add work function for GPU reset event
contactshashanksharma Mar 7, 2022
5a3e3c7
drm/amdgpu: schedule GPU reset event work function
Mar 10, 2022
a167209
oxp-sensors: hwmon: Add OrangePi Neo PWM fan control
pastaq Mar 28, 2024
43dea56
oxp-sensors: hwmon: Add OneXPlayer 2 and OneXFly
pastaq Mar 28, 2024
969c7fb
oxp-sensors: hwmon: Add support for AYANEO 2s, air 1s, geek 1s and ku…
pastaq Mar 28, 2024
e3e37b1
oxp-sensors: hwmon: Add GPD Win Mini
pastaq Mar 28, 2024
1bb0ad7
platform/x86: asus-wmi: add support for 2024 ROG Mini-LED
flukejones Mar 10, 2024
28397ba
platform/x86: asus-wmi: add support for Vivobook GPU MUX
flukejones Mar 10, 2024
e7e60c1
platform/x86: asus-wmi: add support variant of TUF RGB
flukejones Mar 10, 2024
63c4469
platform/x86: asus-wmi: support toggling POST sound
flukejones Mar 10, 2024
6d94319
platform/x86: asus-wmi: store a min default for ppt options
flukejones Mar 10, 2024
0e04ad9
platform/x86: asus-wmi: adjust formatting of ppt-<name>() functions
flukejones Mar 25, 2024
c2b41eb
platform/x86: asus-wmi: ROG Ally increase wait time, allow MCU powersave
flukejones Mar 24, 2024
b531f33
platform/x86: asus-wmi: Add support for MCU powersave
flukejones Mar 25, 2024
660b637
platform/x86: asus-wmi: cleanup main struct to avoid some holes
flukejones Mar 25, 2024
c10b77f
bump the sensitivity of AMD SFH
antheas Mar 3, 2024
d1c9df0
IIO: add aya neo tablet identifier
BoukeHaarsma23 Apr 10, 2024
9cfd358
iio: imu: Add driver for Bosch BMI260 IMU
justinweiss Feb 14, 2024
cf880cc
Codec: Add aw87xxx codec with partial acpi implementation
ruineka Apr 25, 2024
a08def2
drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations
mohamexiety Apr 30, 2024
fc783d2
Updated AW87xxx driver to be more verbose for debugging purposes, but…
CVMagic May 16, 2024
5d79930
linux-chimeraos v6.9.1-chos1
BoukeHaarsma23 May 19, 2024
9a7a467
Revert "drm/nouveau: use tile_mode and pte_kind for VM_BIND bo alloca…
BoukeHaarsma23 May 19, 2024
35b6190
drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations
mohamexiety May 9, 2024
24cdf77
linux-chimeraos v6.9.1-chos2
BoukeHaarsma23 May 19, 2024
6c957c3
Updated AW87xxx driver to automatically enumerate a second I2C chip i…
CVMagic May 19, 2024
be9b1cb
linux-chimeraos v6.9.1-chos3
BoukeHaarsma23 May 19, 2024
123ddfc
Updated AW87xxx driver to implement Suspend and Resume.
CVMagic May 22, 2024
ea1a76a
Added Realtek HDA patch for AYN Loki MiniPro
CVMagic May 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
HID: asus: make asus_kbd_init() generic, remove rog_nkey_led_init()
Some of the n-key stuff is old and outdated, so
make asus_kbd_init() generic to use with other
report ID and remove rog_nkey_led_init().

Signed-off-by: Luke D. Jones <[email protected]>
  • Loading branch information
flukejones authored and BoukeHaarsma23 committed May 19, 2024
commit 309a5309925d67722b52f173e05a6e79ca5a1837
70 changes: 18 additions & 52 deletions drivers/hid/hid-asus.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ static int asus_kbd_set_report(struct hid_device *hdev, const u8 *buf, size_t bu
return ret;
}

static int asus_kbd_init(struct hid_device *hdev)
static int asus_kbd_init(struct hid_device *hdev, u8 report_id)
{
const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54,
const u8 buf[] = { report_id, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54,
0x65, 0x63, 0x68, 0x2e, 0x49, 0x6e, 0x63, 0x2e, 0x00 };
int ret;

Expand All @@ -400,9 +400,10 @@ static int asus_kbd_init(struct hid_device *hdev)
}

static int asus_kbd_get_functions(struct hid_device *hdev,
unsigned char *kbd_func)
unsigned char *kbd_func,
u8 report_id)
{
const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 };
const u8 buf[] = { report_id, 0x05, 0x20, 0x31, 0x00, 0x08 };
u8 *readbuf;
int ret;

Expand Down Expand Up @@ -431,51 +432,6 @@ static int asus_kbd_get_functions(struct hid_device *hdev,
return ret;
}

static int rog_nkey_led_init(struct hid_device *hdev)
{
const u8 buf_init_start[] = { FEATURE_KBD_LED_REPORT_ID1, 0xB9 };
u8 buf_init2[] = { FEATURE_KBD_LED_REPORT_ID1, 0x41, 0x53, 0x55, 0x53, 0x20,
0x54, 0x65, 0x63, 0x68, 0x2e, 0x49, 0x6e, 0x63, 0x2e, 0x00 };
u8 buf_init3[] = { FEATURE_KBD_LED_REPORT_ID1,
0x05, 0x20, 0x31, 0x00, 0x08 };
int ret;

hid_info(hdev, "Asus initialise N-KEY Device");
/* The first message is an init start */
ret = asus_kbd_set_report(hdev, buf_init_start, sizeof(buf_init_start));
if (ret < 0) {
hid_warn(hdev, "Asus failed to send init start command: %d\n", ret);
return ret;
}
/* Followed by a string */
ret = asus_kbd_set_report(hdev, buf_init2, sizeof(buf_init2));
if (ret < 0) {
hid_warn(hdev, "Asus failed to send init command 1.0: %d\n", ret);
return ret;
}
/* Followed by a string */
ret = asus_kbd_set_report(hdev, buf_init3, sizeof(buf_init3));
if (ret < 0) {
hid_warn(hdev, "Asus failed to send init command 1.1: %d\n", ret);
return ret;
}

/* begin second report ID with same data */
buf_init2[0] = FEATURE_KBD_LED_REPORT_ID2;
buf_init3[0] = FEATURE_KBD_LED_REPORT_ID2;

ret = asus_kbd_set_report(hdev, buf_init2, sizeof(buf_init2));
if (ret < 0) {
hid_warn(hdev, "Asus failed to send init command 2.0: %d\n", ret);
return ret;
}
ret = asus_kbd_set_report(hdev, buf_init3, sizeof(buf_init3));
if (ret < 0)
hid_warn(hdev, "Asus failed to send init command 2.1: %d\n", ret);

return ret;
}

static void asus_schedule_work(struct asus_kbd_leds *led)
{
unsigned long flags;
Expand Down Expand Up @@ -558,17 +514,27 @@ static int asus_kbd_register_leds(struct hid_device *hdev)
int ret;

if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD) {
ret = rog_nkey_led_init(hdev);
/* Initialize keyboard */
ret = asus_kbd_init(hdev, FEATURE_KBD_REPORT_ID);
if (ret < 0)
return ret;

/* The LED endpoint is initialised in two HID */
ret = asus_kbd_init(hdev, FEATURE_KBD_LED_REPORT_ID1);
if (ret < 0)
return ret;

ret = asus_kbd_init(hdev, FEATURE_KBD_LED_REPORT_ID2);
if (ret < 0)
return ret;
} else {
/* Initialize keyboard */
ret = asus_kbd_init(hdev);
ret = asus_kbd_init(hdev, FEATURE_KBD_REPORT_ID);
if (ret < 0)
return ret;

/* Get keyboard functions */
ret = asus_kbd_get_functions(hdev, &kbd_func);
ret = asus_kbd_get_functions(hdev, &kbd_func, FEATURE_KBD_REPORT_ID);
if (ret < 0)
return ret;

Expand Down