2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 23:53:55 +08:00
linux-next/drivers/staging
Jérôme Pouiller b0998f0c04 staging: wfx: add IRQ handling
bh_work() is in charge to schedule all HIF message from/to chip.

On normal operation, when an IRQ is received, driver can get size of
next message in control register. In order to save control register
access, when chip send a message, it also appends a copy of control
register after the message (this register is not accounted in message
length declared in message header, but must accounted in bus request).
This copy of control register is called "piggyback".

It also handles a power saving mechanism specific to WFxxx series. This
mechanism is based on a GPIO called "wakeup" GPIO. Obviously, this gpio
is not part of SPI/SDIO standard buses and must be declared
independently (this is the main reason for why SDIO mode try to get
parameters from DT).

When wakeup is enabled, host can communicate with chip only if it is
awake. To wake up chip, there are two cases:
    - host receive an IRQ from chip (chip initiate communication): host
      just have to set wakeup GPIO before reading data
    - host want to send data to chip: host set wakeup GPIO, then wait
      for an IRQ (in fact, wait for an empty message) and finally send data

bh_work() is also in charge to track usage of chip buffers. Normally
each request expect a confirmation. However, you can notice that special
"multi tx" confirmation can acknowledge multiple requests at time.

Finally, note that wfx_bh_request_rx() is not atomic (because of
control_reg_read()). So, in SPI mode, hard-irq handler only postpone all
processing to wfx_spi_request_rx().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20190919142527.31797-8-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04 10:43:40 +02:00
..
android mm: introduce page_size() 2019-09-24 15:54:08 -07:00
axis-fifo staging: remove redundant 'default n' from Kconfig 2019-04-16 13:39:01 +02:00
board staging: board: use appropriate macro to initialize struct 2019-09-30 21:57:57 +02:00
clocking-wizard
comedi staging: comedi: ni_mio_common: Fix a typo in ni_mio_common.c 2019-08-21 05:44:07 -07:00
emxx_udc staging: emxx_udc: remove local TRUE/FALSE definition 2019-09-12 10:35:51 +01:00
exfat staging: exfat: explain the fs_sync() issue in TODO 2019-10-04 10:17:57 +02:00
fbtft staging: fbtft: make several arrays static const, makes object smaller 2019-09-12 10:35:52 +01:00
fieldbus staging: fieldbus: move "offline mode" definition to fieldbus core 2019-09-30 21:58:03 +02:00
fsl-dpaa2 staging: fsl-dpaa2/ethsw: do not force user to bring interface down 2019-08-14 16:46:25 +02:00
fwserial
gasket Staging: gasket: Use temporaries to reduce line length. 2019-09-12 10:38:45 +01:00
gdm724x
goldfish staging: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:50:04 +02:00
greybus staging: greybus: light: fix a couple double frees 2019-09-03 09:39:10 +02:00
gs_fpgaboot staging: remove redundant 'default n' from Kconfig 2019-04-16 13:39:01 +02:00
iio staging: iio: accel: adis16240: Improve readability on write_raw function 2019-08-18 20:12:52 +01:00
isdn staging: Use pr_warn instead of pr_warning 2019-09-30 21:58:00 +02:00
kpc2000 staging: kpc2000: Fix long constant sparse warning 2019-09-03 09:39:48 +02:00
ks7010 Revert "staging: ks7010: Fix build error" 2019-06-24 16:45:34 +08:00
media Staging/IIO driver patches for 5.4-rc1 2019-09-18 11:05:34 -07:00
most staging: most: sound: Fix error path of audio_init 2019-08-28 22:22:13 +02:00
mt7621-dma staging: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:50:04 +02:00
mt7621-dts staging: mt7621-dts: add support for second network interface 2019-07-03 18:28:29 +02:00
mt7621-pci staging: mt7621-pci: avoid use 'err' local variable 2019-07-25 09:58:26 +02:00
mt7621-pci-phy staging: mt7621-pci-phy: remove disable clock from the phy exit function 2019-06-21 16:50:10 +02:00
mt7621-pinctrl staging: mt7621-pinctrl: Add of_node_put() before return 2019-07-22 07:34:15 +02:00
netlogic staging: netlogic: Change GFP_ATOMIC to GFP_KERNEL 2019-07-01 09:07:03 +02:00
nvec staging: nvec: make use of devm_platform_ioremap_resource 2019-09-12 10:35:50 +01:00
octeon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-09-18 12:34:53 -07:00
octeon-usb usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
olpc_dcon staging: olpc_dcon: fix wrong dependencies in Kconfig file 2019-09-30 21:58:00 +02:00
pi433 staging: pi433: Fix typo in documentation 2019-09-06 18:20:33 +02:00
qlge staging: qlge: Removed unnecessary variable 2019-09-30 21:57:59 +02:00
ralink-gdma staging: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:50:04 +02:00
rtl8188eu staging: rtl8188eu: cleanup comments in update_hw_ht_param 2019-10-04 10:17:21 +02:00
rtl8192e staging: rtl8192e: clean up indentation issue 2019-09-30 21:58:01 +02:00
rtl8192u staging: rtl8192u: fix multiple memory leaks on error path 2019-09-30 21:58:00 +02:00
rtl8712 staging: rtl8712: fix boundary condition for n 2019-10-04 10:16:49 +02:00
rtl8723bs staging: rtl8723bs: remove unused function write_cam_from_cache 2019-09-30 21:58:01 +02:00
rts5208 staging: rts5208: Fix checkpath warning 2019-09-03 09:36:29 +02:00
sm750fb staging: sm750fb: CHECK: Avoid CamelCase 2019-09-30 21:57:56 +02:00
speakup staging: speakup: serialio: fix warning linux/serial.h is included more than once 2019-05-30 13:59:16 -07:00
unisys Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-19 11:54:03 -07:00
uwb USB: Move wusbcore and UWB to staging as it is obsolete 2019-08-08 07:52:01 +02:00
vc04_services staging: vc04_services: Avoid typedef 2019-10-04 10:16:48 +02:00
vme
vt6655 staging: Add missing newline at end of file 2019-06-18 08:59:40 +02:00
vt6656 staging: vt6656: clean up an indentation issue 2019-09-30 21:58:01 +02:00
wfx staging: wfx: add IRQ handling 2019-10-04 10:43:40 +02:00
wilc1000 staging: wilc1000: look for rtc_clk clock in spi mode 2019-09-30 21:58:03 +02:00
wlan-ng staging: wlan-ng: Remove function prism2mib_excludeunencrypted() 2019-08-02 13:55:38 +02:00
wusbcore staging: wusbcore: Fix build error without CONFIG_USB 2019-08-09 14:56:57 +02:00
Kconfig staging: wfx: add infrastructure for new driver 2019-10-04 10:26:51 +02:00
Makefile staging: wfx: add infrastructure for new driver 2019-10-04 10:26:51 +02:00