^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Linux driver for TerraTec DMX 6Fire USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Author: Torsten Schenk <torsten.schenk@zoho.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Created: Jan 01, 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright: (C) Torsten Schenk
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #ifndef USB6FIRE_COMM_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define USB6FIRE_COMM_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include "common.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) enum /* settings for comm */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) COMM_RECEIVER_BUFSIZE = 64,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) struct comm_runtime {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) struct sfire_chip *chip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) struct urb receiver;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) u8 *receiver_buffer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) u8 serial; /* urb serial */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) void (*init_urb)(struct comm_runtime *rt, struct urb *urb, u8 *buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) void *context, void(*handler)(struct urb *urb));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) /* writes control data to the device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) int (*write8)(struct comm_runtime *rt, u8 request, u8 reg, u8 value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) int (*write16)(struct comm_runtime *rt, u8 request, u8 reg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) u8 vh, u8 vl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) int usb6fire_comm_init(struct sfire_chip *chip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) void usb6fire_comm_abort(struct sfire_chip *chip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) void usb6fire_comm_destroy(struct sfire_chip *chip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) #endif /* USB6FIRE_COMM_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)