You've already forked linux-t2-patches
mirror of
https://github.com/t2linux/linux-t2-patches.git
synced 2026-04-30 13:52:11 -07:00
Fixup checkpatch
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From a9d13314dcc6dde97bdb468248f2675782ef4a06 Mon Sep 17 00:00:00 2001
|
||||
From 006a51516285ebaa8333d19fb76efbc81e5cdb3e Mon Sep 17 00:00:00 2001
|
||||
From: Aditya Garg <gargaditya08@live.com>
|
||||
Date: Fri, 9 Aug 2024 19:40:53 +0530
|
||||
Subject: [PATCH] HID: hid-appletb-kbd: add support for fn toggle between media
|
||||
@@ -9,11 +9,11 @@ keys on the touchbar by pressing the Fn key on Apple Internal Keyboard.
|
||||
|
||||
Signed-off-by: Aditya Garg <gargaditya08@live.com>
|
||||
---
|
||||
drivers/hid/hid-appletb-kbd.c | 129 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 129 insertions(+)
|
||||
drivers/hid/hid-appletb-kbd.c | 128 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 128 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-appletb-kbd.c b/drivers/hid/hid-appletb-kbd.c
|
||||
index e07d57573..2f01c2d41 100644
|
||||
index e07d57573..ec8051dcf 100644
|
||||
--- a/drivers/hid/hid-appletb-kbd.c
|
||||
+++ b/drivers/hid/hid-appletb-kbd.c
|
||||
@@ -26,6 +26,8 @@
|
||||
@@ -44,7 +44,7 @@ index e07d57573..2f01c2d41 100644
|
||||
};
|
||||
|
||||
static const struct key_entry appletb_kbd_keymap[] = {
|
||||
@@ -172,6 +181,76 @@ static int appletb_kbd_hid_event(struct hid_device *hdev, struct hid_field *fiel
|
||||
@@ -172,6 +181,75 @@ static int appletb_kbd_hid_event(struct hid_device *hdev, struct hid_field *fiel
|
||||
return kbd->current_mode == APPLETB_KBD_MODE_OFF;
|
||||
}
|
||||
|
||||
@@ -60,12 +60,12 @@ index e07d57573..2f01c2d41 100644
|
||||
+ appletb_kbd_set_mode(kbd, APPLETB_KBD_MODE_FN);
|
||||
+ else if (kbd->current_mode == APPLETB_KBD_MODE_FN)
|
||||
+ appletb_kbd_set_mode(kbd, APPLETB_KBD_MODE_SPCL);
|
||||
+ }
|
||||
+ else if (value == 0)
|
||||
+ } else if (value == 0) {
|
||||
+ if (kbd->saved_mode != kbd->current_mode)
|
||||
+ appletb_kbd_set_mode(kbd, kbd->saved_mode);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int appletb_kbd_inp_connect(struct input_handler *handler,
|
||||
+ struct input_dev *dev,
|
||||
@@ -82,9 +82,8 @@ index e07d57573..2f01c2d41 100644
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+
|
||||
+ if (handle->dev) {
|
||||
+ if (handle->dev)
|
||||
+ return -EEXIST;
|
||||
+ }
|
||||
+
|
||||
+ handle->open = 0;
|
||||
+ handle->dev = input_get_device(dev);
|
||||
@@ -121,7 +120,7 @@ index e07d57573..2f01c2d41 100644
|
||||
static int appletb_kbd_input_configured(struct hid_device *hdev, struct hid_input *hidinput)
|
||||
{
|
||||
int idx;
|
||||
@@ -196,6 +275,40 @@ static int appletb_kbd_input_configured(struct hid_device *hdev, struct hid_inpu
|
||||
@@ -196,6 +274,40 @@ static int appletb_kbd_input_configured(struct hid_device *hdev, struct hid_inpu
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -162,7 +161,7 @@ index e07d57573..2f01c2d41 100644
|
||||
static int appletb_kbd_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
{
|
||||
struct appletb_kbd *kbd;
|
||||
@@ -228,6 +341,20 @@ static int appletb_kbd_probe(struct hid_device *hdev, const struct hid_device_id
|
||||
@@ -228,6 +340,20 @@ static int appletb_kbd_probe(struct hid_device *hdev, const struct hid_device_id
|
||||
goto stop_hw;
|
||||
}
|
||||
|
||||
@@ -183,7 +182,7 @@ index e07d57573..2f01c2d41 100644
|
||||
ret = appletb_kbd_set_mode(kbd, appletb_tb_def_mode);
|
||||
if (ret) {
|
||||
dev_err_probe(dev, ret, "Failed to set touchbar mode\n");
|
||||
@@ -251,6 +378,8 @@ static void appletb_kbd_remove(struct hid_device *hdev)
|
||||
@@ -251,6 +377,8 @@ static void appletb_kbd_remove(struct hid_device *hdev)
|
||||
|
||||
appletb_kbd_set_mode(kbd, APPLETB_KBD_MODE_OFF);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user