linux-stable/drivers/nfc/s3fwrn5
Stephan Gerhold 340f42f7ff nfc: s3fwrn5: i2c: Enable optional clock from device tree
S3FWRN5 depends on a clock input ("XI" pin) to function properly.
Depending on the hardware configuration this could be an always-on
oscillator or some external clock that must be explicitly enabled.

So far we assumed that the clock is always-on.
Make the driver request an (optional) clock from the device tree
and make sure the clock is running before starting S3FWRN5.

Note: S3FWRN5 asserts "GPIO2" whenever it needs the clock input to
function correctly. On some hardware configurations, GPIO2 is
connected directly to an input pin of the external clock provider
(e.g. the main PMIC of the SoC). In that case, it can automatically
AND the clock enable bit and clock request from S3FWRN5 so that
the clock is actually only enabled when needed.

It is also conceivable that on some other hardware configuration
S3FWRN5's GPIO2 might be connected as a regular GPIO input
of the SoC. In that case, follow-up patches could extend the
driver to request the GPIO, set up an interrupt and only enable
the clock when requested by S3FWRN5.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-19 12:44:23 -07:00
..
core.c nfc: s3fwrn5: remove unnecessary label 2021-04-06 16:24:20 -07:00
firmware.c Networking updates for 5.11 2020-12-15 13:22:29 -08:00
firmware.h nfc: s3fwrn5: skip the NFC bootloader mode 2020-12-04 15:30:47 -08:00
i2c.c nfc: s3fwrn5: i2c: Enable optional clock from device tree 2021-05-19 12:44:23 -07:00
Kconfig nfc: s3fwrn5: Support a UART interface 2020-12-02 17:55:25 -08:00
Makefile nfc: s3fwrn5: Support a UART interface 2020-12-02 17:55:25 -08:00
nci.c nfc: s3fwrn5: Remove unused NCI prop commands 2020-12-16 13:09:35 -08:00
nci.h nfc: s3fwrn5: Remove unused NCI prop commands 2020-12-16 13:09:35 -08:00
phy_common.c nfc: s3fwrn5: Remove the delay for NFC sleep 2020-12-16 13:09:35 -08:00
phy_common.h nfc: s3fwrn5: Support a UART interface 2020-12-02 17:55:25 -08:00
s3fwrn5.h nfc: s3fwrn5: Change the error code 2020-11-18 17:42:13 -08:00
uart.c nfc: s3fwrn5: Support a UART interface 2020-12-02 17:55:25 -08:00