mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
![Bongsu Jeon](/assets/img/avatar_default.png)
Since S3FWRN82 NFC Chip, The UART interface can be used. S3FWRN82 uses NCI protocol and supports I2C and UART interface. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
37 lines
874 B
C
37 lines
874 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*
|
|
* Link Layer for Samsung S3FWRN5 NCI based Driver
|
|
*
|
|
* Copyright (C) 2015 Samsung Electrnoics
|
|
* Robert Baldyga <r.baldyga@samsung.com>
|
|
* Copyright (C) 2020 Samsung Electrnoics
|
|
* Bongsu Jeon <bongsu.jeon@samsung.com>
|
|
*/
|
|
|
|
#ifndef __NFC_S3FWRN5_PHY_COMMON_H
|
|
#define __NFC_S3FWRN5_PHY_COMMON_H
|
|
|
|
#include <linux/mutex.h>
|
|
#include <net/nfc/nci_core.h>
|
|
|
|
#include "s3fwrn5.h"
|
|
|
|
#define S3FWRN5_EN_WAIT_TIME 20
|
|
|
|
struct phy_common {
|
|
struct nci_dev *ndev;
|
|
|
|
int gpio_en;
|
|
int gpio_fw_wake;
|
|
|
|
struct mutex mutex;
|
|
|
|
enum s3fwrn5_mode mode;
|
|
};
|
|
|
|
void s3fwrn5_phy_set_wake(void *phy_id, bool wake);
|
|
bool s3fwrn5_phy_power_ctrl(struct phy_common *phy, enum s3fwrn5_mode mode);
|
|
void s3fwrn5_phy_set_mode(void *phy_id, enum s3fwrn5_mode mode);
|
|
enum s3fwrn5_mode s3fwrn5_phy_get_mode(void *phy_id);
|
|
|
|
#endif /* __NFC_S3FWRN5_PHY_COMMON_H */
|