Merge remote-tracking branch 'qcom_sm8250/lineage-20' into lineage-20

Change-Id: I4b52f660c586a3f9a7393cbff534ff35e83fc1a3
This commit is contained in:
Sebastiano Barezzi
2024-05-12 14:21:16 +02:00
597 changed files with 7300 additions and 6752 deletions

View File

@@ -763,7 +763,6 @@ static int atkbd_probe(struct atkbd *atkbd)
{
struct ps2dev *ps2dev = &atkbd->ps2dev;
unsigned char param[2];
bool skip_getid;
/*
* Some systems, where the bit-twiddling when testing the io-lines of the
@@ -777,6 +776,11 @@ static int atkbd_probe(struct atkbd *atkbd)
"keyboard reset failed on %s\n",
ps2dev->serio->phys);
if (atkbd_skip_getid(atkbd)) {
atkbd->id = 0xab83;
return 0;
}
/*
* Then we check the keyboard ID. We should get 0xab83 under normal conditions.
* Some keyboards report different values, but the first byte is always 0xab or
@@ -785,18 +789,17 @@ static int atkbd_probe(struct atkbd *atkbd)
*/
param[0] = param[1] = 0xa5; /* initialize with invalid values */
skip_getid = atkbd_skip_getid(atkbd);
if (skip_getid || ps2_command(ps2dev, param, ATKBD_CMD_GETID)) {
if (ps2_command(ps2dev, param, ATKBD_CMD_GETID)) {
/*
* If the get ID command was skipped or failed, we check if we can at least set
* If the get ID command failed, we check if we can at least set
* the LEDs on the keyboard. This should work on every keyboard out there.
* It also turns the LEDs off, which we want anyway.
*/
param[0] = 0;
if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS))
return -1;
atkbd->id = skip_getid ? 0xab83 : 0xabba;
atkbd->id = 0xabba;
return 0;
}

View File

@@ -328,12 +328,10 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
error = devm_gpio_request_one(dev, button->gpio,
flags, button->desc ? : DRV_NAME);
if (error) {
dev_err(dev,
"unable to claim gpio %u, err=%d\n",
button->gpio, error);
return error;
}
if (error)
return dev_err_probe(dev, error,
"unable to claim gpio %u\n",
button->gpio);
bdata->gpiod = gpio_to_desc(button->gpio);
if (!bdata->gpiod) {

View File

@@ -1199,7 +1199,11 @@ static int rmi_driver_probe(struct device *dev)
}
rmi_driver_set_input_params(rmi_dev, data->input);
data->input->phys = devm_kasprintf(dev, GFP_KERNEL,
"%s/input0", dev_name(dev));
"%s/input0", dev_name(dev));
if (!data->input->phys) {
retval = -ENOMEM;
goto err;
}
}
retval = rmi_init_functions(data);

View File

@@ -1183,6 +1183,12 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP |
SERIO_QUIRK_NOPNP)
},
{
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "NS5x_7xPU"),
},
.driver_data = (void *)(SERIO_QUIRK_NOAUX)
},
{
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "NJ50_70CU"),