1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2010 Trusted Logic S.A.
4 * modifications copyright (C) 2015 NXP B.V.
5 */
6
7#define PN544_MAGIC	0xE9
8
9/*
10 * PN544 power control via ioctl
11 * PN544_SET_PWR(0): power off
12 * PN544_SET_PWR(1): power on
13 * PN544_SET_PWR(2): reset and power on with firmware download enabled
14 */
15
16#define PWR_OFF 0
17#define PWR_ON  1
18#define PWR_FW  2
19
20#define CLK_OFF 0
21#define CLK_ON  1
22
23#define GPIO_UNUSED -1
24
25#define PN544_SET_PWR	_IOW(PN544_MAGIC, 0x01, unsigned int)
26#define PN54X_CLK_REQ	_IOW(PN544_MAGIC, 0x02, unsigned int)
27
28struct pn544_i2c_platform_data {
29	unsigned int irq_gpio;
30	unsigned int ven_gpio;
31	unsigned int firm_gpio;
32	unsigned int clkreq_gpio;
33	struct regulator *pvdd_reg;
34	struct regulator *vbat_reg;
35	struct regulator *pmuvcc_reg;
36	struct regulator *sevdd_reg;
37};
38