diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-22 22:11:48 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-22 22:11:48 +0300 |
commit | be81389c82e2c1ed0997629cb3d910f584666e33 (patch) | |
tree | f5e7e34d3d13ae9b1c70c562bfb1f2eba7bd1684 /drivers/staging/nvec | |
parent | f6b8e86b7a65495d3947a1d1fc22183c52f786f6 (diff) | |
parent | eb563dc752d33b0a5d4952964af15ca892f59524 (diff) | |
download | linux-be81389c82e2c1ed0997629cb3d910f584666e33.tar.xz |
Merge tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH:
"Here is the big set of staging driver changes for 6.10-rc1. Not a lot
of cleanups happening this kernel release, intern applications must be
out of sync at the moment. But we did delete two drivers, wlan-ng and
pi433, as they are no longer in use and the developers involved wanted
them just gone entirely, allowing us to drop 19k lines from the tree.
Other than the normal coding style cleanups here, there has been a lot
of work on the vc04_services code, with the intent to finally get that
out of staging hopefully soon. It's getting closer, which is nice to
see.
All of these have been in linux-next for a while with no reported
issues"
* tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (98 commits)
staging: pi433: Remove unused driver
staging: vchiq_core: Add missing blank lines
staging: vchiq_core: Drop unnecessary blank lines
staging: vchiq_core: Add parentheses to VCHIQ_MSG_SRCPORT
staging: vchiq_core: Use printk messages for devices
staging: vchiq_arm: Drop unnecessary NULL check
staging: vc04_services: Delete unnecessary NULL check
staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences
Staging: rtl8192e: Rename variable DssCCk
Staging: rtl8192e: Rename variable ExtHTCapInfo
Staging: rtl8192e: Rename variable MPDUDensity
Staging: rtl8192e: Rename variable MaxRxAMPDUFactor
Staging: rtl8192e: Rename variable MaxAMSDUSize
Staging: rtl8192e: Rename variable DelayBA
Staging: rtl8192e: Rename variable RxSTBC
Staging: rtl8192e: Rename variable TxSTBC
Staging: rtl8192e: Rename variable GreenField
Staging: rtl8192e: Rename variable ShortGI20Mhz
Staging: rtl8192e: Rename variable ShortGI40Mhz
Staging: rtl8192e: Rename variable MimoPwrSave
...
Diffstat (limited to 'drivers/staging/nvec')
-rw-r--r-- | drivers/staging/nvec/TODO | 1 | ||||
-rw-r--r-- | drivers/staging/nvec/nvec.c | 11 | ||||
-rw-r--r-- | drivers/staging/nvec/nvec_kbd.c | 9 | ||||
-rw-r--r-- | drivers/staging/nvec/nvec_ps2.c | 31 |
4 files changed, 34 insertions, 18 deletions
diff --git a/drivers/staging/nvec/TODO b/drivers/staging/nvec/TODO index 8afde3ccc960..33f9ebe6d59b 100644 --- a/drivers/staging/nvec/TODO +++ b/drivers/staging/nvec/TODO @@ -1,5 +1,4 @@ ToDo list (incomplete, unordered) - move the driver to the new i2c slave framework - finish suspend/resume support - - fix udelay in the isr - add atomic ops in order to fix shutoff/reboot problems diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 282a664c9176..e5ca78e57384 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -300,7 +300,9 @@ int nvec_write_sync(struct nvec_chip *nvec, { mutex_lock(&nvec->sync_write_mutex); - *msg = NULL; + if (msg != NULL) + *msg = NULL; + nvec->sync_write_pending = (data[1] << 8) + data[0]; if (nvec_write_async(nvec, data, size) < 0) { @@ -320,7 +322,10 @@ int nvec_write_sync(struct nvec_chip *nvec, dev_dbg(nvec->dev, "nvec_sync_write: pong!\n"); - *msg = nvec->last_sync_msg; + if (msg != NULL) + *msg = nvec->last_sync_msg; + else + nvec_msg_free(nvec, nvec->last_sync_msg); mutex_unlock(&nvec->sync_write_mutex); @@ -712,7 +717,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) * TODO: replace the udelay with a read back after each writel above * in order to work around a hardware issue, see i2c-tegra.c * - * Unfortunately, this change causes an intialisation issue with the + * Unfortunately, this change causes an initialisation issue with the * touchpad, which needs to be fixed first. */ udelay(100); diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c index f9a1da952c0a..d0259c80f810 100644 --- a/drivers/staging/nvec/nvec_kbd.c +++ b/drivers/staging/nvec/nvec_kbd.c @@ -148,15 +148,16 @@ static int nvec_kbd_probe(struct platform_device *pdev) nvec_register_notifier(nvec, &keys_dev.notifier, 0); /* Enable keyboard */ - nvec_write_async(nvec, enable_kbd, 2); + nvec_write_sync(nvec, enable_kbd, 2, NULL); /* configures wake on special keys */ - nvec_write_async(nvec, cnfg_wake, 4); + nvec_write_sync(nvec, cnfg_wake, 4, NULL); + /* enable wake key reporting */ - nvec_write_async(nvec, cnfg_wake_key_reporting, 3); + nvec_write_sync(nvec, cnfg_wake_key_reporting, 3, NULL); /* Disable caps lock LED */ - nvec_write_async(nvec, clear_leds, sizeof(clear_leds)); + nvec_write_sync(nvec, clear_leds, sizeof(clear_leds), NULL); return 0; } diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c index cb6d71b8dc83..f34016c4a26b 100644 --- a/drivers/staging/nvec/nvec_ps2.c +++ b/drivers/staging/nvec/nvec_ps2.c @@ -60,16 +60,6 @@ static void ps2_stopstreaming(struct serio *ser_dev) nvec_write_async(ps2_dev.nvec, buf, sizeof(buf)); } -static int ps2_sendcommand(struct serio *ser_dev, unsigned char cmd) -{ - unsigned char buf[] = { NVEC_PS2, SEND_COMMAND, ENABLE_MOUSE, 1 }; - - buf[2] = cmd & 0xff; - - dev_dbg(&ser_dev->dev, "Sending ps2 cmd %02x\n", cmd); - return nvec_write_async(ps2_dev.nvec, buf, sizeof(buf)); -} - static int nvec_ps2_notifier(struct notifier_block *nb, unsigned long event_type, void *data) { @@ -98,6 +88,27 @@ static int nvec_ps2_notifier(struct notifier_block *nb, return NOTIFY_DONE; } +static int ps2_sendcommand(struct serio *ser_dev, unsigned char cmd) +{ + unsigned char buf[] = { NVEC_PS2, SEND_COMMAND, ENABLE_MOUSE, 1 }; + struct nvec_msg *msg; + int ret; + + buf[2] = cmd & 0xff; + + dev_dbg(&ser_dev->dev, "Sending ps2 cmd %02x\n", cmd); + + ret = nvec_write_sync(ps2_dev.nvec, buf, sizeof(buf), &msg); + if (ret < 0) + return ret; + + nvec_ps2_notifier(NULL, NVEC_PS2, msg->data); + + nvec_msg_free(ps2_dev.nvec, msg); + + return 0; +} + static int nvec_mouse_probe(struct platform_device *pdev) { struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); |