aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/bh.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-04-06wfx: get out from the staging areaJérôme Pouiller1-34/+0
The wfx driver is now mature enough to leave the staging area. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Signed-off-by: Kalle Valo <kvalo@kernel.org>
2022-01-25staging: wfx: fix missing headersJérôme Pouiller1-0/+1
Each headers files should include every types it needs to compile (ie. "gcc $CFLAGS -xc file.h" should compile) Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14staging: wfx: remove useless comments after #endifJérôme Pouiller1-1/+1
Comments after the last #endif of header files don't bring any information and are redundant with the name of the file. Drop them. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20210913130203.1903622-30-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14staging: wfx: update files descriptionsJérôme Pouiller1-1/+1
Each file of the driver contains a short description of its purpose. These description were a bit outdated. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20210913130203.1903622-26-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10Revert "staging: wfx: remove unused included header files"Greg Kroah-Hartman1-0/+4
This reverts commit 314fd52f01ead9528a5cda5a868425bb736d93a2. It turns .h files into non-stand-alone when building, which might cause problems in the long-run. Reported-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Cc: Muhammad Usama Anjum <musamaanjum@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-12staging: wfx: remove unused included header filesMuhammad Usama Anjum1-4/+0
Many header files have been included, but never used. Those header files have been removed. Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com> Link: https://lore.kernel.org/r/20210211143637.GA177425@LEGION Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-07staging: wfx: update copyrights datesJérôme Pouiller1-1/+1
Most of the files have been modified in 2020, so update the copyright notices. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201007101943.749898-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13staging: wfx: introduce a way to poll IRQJérôme Pouiller1-0/+1
It is possible to check if an IRQ is ending by polling the control register. This function must used with care: if an IRQ fires while the host reads control register, the IRQ can be lost. However, it could be useful in some cases. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200505123757.39506-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04staging: wfx: add IRQ handlingJérôme Pouiller1-0/+32
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>