Skip to content

Commit 6052abf

Browse files
Rajat Jaindtor
authored andcommitted
Input: i8042 - attach fwnode to serio i8042 kbd device
Attach the firmware node to the serio i8042 kbd device so that device properties can be passed from the firmware. Signed-off-by: Rajat Jain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 7842087 commit 6052abf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/input/serio/i8042-x86ia64io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,7 @@ static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *
938938
}
939939
i8042_pnp_id_to_string(dev->id, i8042_kbd_firmware_id,
940940
sizeof(i8042_kbd_firmware_id));
941+
i8042_kbd_fwnode = dev_fwnode(&dev->dev);
941942

942943
/* Keyboard ports are always supposed to be wakeup-enabled */
943944
device_set_wakeup_enable(&dev->dev, true);

drivers/input/serio/i8042.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/i8042.h>
2222
#include <linux/slab.h>
2323
#include <linux/suspend.h>
24+
#include <linux/property.h>
2425

2526
#include <asm/io.h>
2627

@@ -124,6 +125,7 @@ MODULE_PARM_DESC(unmask_kbd_data, "Unconditional enable (may reveal sensitive da
124125
static bool i8042_bypass_aux_irq_test;
125126
static char i8042_kbd_firmware_id[128];
126127
static char i8042_aux_firmware_id[128];
128+
static struct fwnode_handle *i8042_kbd_fwnode;
127129

128130
#include "i8042.h"
129131

@@ -1335,6 +1337,7 @@ static int __init i8042_create_kbd_port(void)
13351337
strlcpy(serio->phys, I8042_KBD_PHYS_DESC, sizeof(serio->phys));
13361338
strlcpy(serio->firmware_id, i8042_kbd_firmware_id,
13371339
sizeof(serio->firmware_id));
1340+
set_primary_fwnode(&serio->dev, i8042_kbd_fwnode);
13381341

13391342
port->serio = serio;
13401343
port->irq = I8042_KBD_IRQ;

0 commit comments

Comments
 (0)