Lines Matching defs:par

10  *   void (*write_reg)(struct fbtft_par *par, int len, ...);
15 void func(struct fbtft_par *par, int len, ...) \
20 buffer_type *buf = (buffer_type *)par->buf; \
22 if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) { \
29 fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, \
30 par->info->device, buffer_type, buf, len, \
36 if (par->startbyte) { \
37 *(u8 *)par->buf = par->startbyte; \
38 buf = (buffer_type *)(par->buf + 1); \
43 ret = fbtft_write_buf_dc(par, par->buf, sizeof(data_type) + offset, \
49 if (par->startbyte) \
50 *(u8 *)par->buf = par->startbyte | 0x2; \
57 fbtft_write_buf_dc(par, par->buf, \
69 void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
74 u16 *buf = (u16 *)par->buf;
76 if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {
81 fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par,
82 par->info->device, u8, buf, len, "%s: ",
88 if (par->spi && (par->spi->bits_per_word == 8)) {
105 ret = par->fbtftops.write(par, par->buf, (len + pad) * sizeof(u16));
107 dev_err(par->info->device,
116 * int (*write_vmem)(struct fbtft_par *par);
121 int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
124 __be16 *txbuf16 = par->txbuf.buf;
132 fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
136 vmem16 = (u16 *)(par->info->screen_buffer + offset);
138 gpiod_set_value(par->gpio.dc, 1);
141 if (!par->txbuf.buf)
142 return par->fbtftops.write(par, vmem16, len);
145 tx_array_size = par->txbuf.len / 2;
147 if (par->startbyte) {
148 txbuf16 = par->txbuf.buf + 1;
150 *(u8 *)(par->txbuf.buf) = par->startbyte | 0x2;
156 dev_dbg(par->info->device, "to_copy=%zu, remain=%zu\n",
163 ret = par->fbtftops.write(par, par->txbuf.buf,
175 int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len)
178 u16 *txbuf16 = par->txbuf.buf;
185 fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
188 if (!par->txbuf.buf) {
189 dev_err(par->info->device, "%s: txbuf.buf is NULL\n", __func__);
194 vmem8 = par->info->screen_buffer + offset;
196 tx_array_size = par->txbuf.len / 2;
200 dev_dbg(par->info->device, "to_copy=%zu, remain=%zu\n",
213 ret = par->fbtftops.write(par, par->txbuf.buf, to_copy * 2);
223 int fbtft_write_vmem8_bus8(struct fbtft_par *par, size_t offset, size_t len)
225 dev_err(par->info->device, "%s: function not implemented\n", __func__);
231 int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len)
235 fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
238 vmem16 = (u16 *)(par->info->screen_buffer + offset);
241 return fbtft_write_buf_dc(par, vmem16, len, 1);