Lines Matching refs:rtspi
8 struct rtspi { struct
30 #define REG(x) (rtspi->base + x) argument
35 struct rtspi *rtspi = spi_controller_get_devdata(spi->controller); in rt_set_cs() local
47 static void set_size(struct rtspi *rtspi, int size) in set_size() argument
60 static inline void wait_ready(struct rtspi *rtspi) in wait_ready() argument
65 static void send4(struct rtspi *rtspi, const u32 *buf) in send4() argument
67 wait_ready(rtspi); in send4()
68 set_size(rtspi, 4); in send4()
72 static void send1(struct rtspi *rtspi, const u8 *buf) in send1() argument
74 wait_ready(rtspi); in send1()
75 set_size(rtspi, 1); in send1()
79 static void rcv4(struct rtspi *rtspi, u32 *buf) in rcv4() argument
81 wait_ready(rtspi); in rcv4()
82 set_size(rtspi, 4); in rcv4()
86 static void rcv1(struct rtspi *rtspi, u8 *buf) in rcv1() argument
88 wait_ready(rtspi); in rcv1()
89 set_size(rtspi, 1); in rcv1()
96 struct rtspi *rtspi = spi_controller_get_devdata(ctrl); in transfer_one() local
106 send4(rtspi, tx_buf); in transfer_one()
111 send1(rtspi, tx_buf); in transfer_one()
117 rcv4(rtspi, rx_buf); in transfer_one()
122 rcv1(rtspi, rx_buf); in transfer_one()
133 static void init_hw(struct rtspi *rtspi) in init_hw() argument
153 struct rtspi *rtspi; in realtek_rtl_spi_probe() local
156 ctrl = devm_spi_alloc_master(&pdev->dev, sizeof(*rtspi)); in realtek_rtl_spi_probe()
162 rtspi = spi_controller_get_devdata(ctrl); in realtek_rtl_spi_probe()
164 rtspi->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); in realtek_rtl_spi_probe()
165 if (IS_ERR(rtspi->base)) { in realtek_rtl_spi_probe()
170 init_hw(rtspi); in realtek_rtl_spi_probe()