• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/uwb/i1480/dfu/

Lines Matching defs:i1480

23  * This driver will prepare the i1480 device to behave as a real
34 * uses to do its job. All the ops in the common code are i1480->NAME,
45 #include "i1480-dfu.h"
48 struct i1480 i1480;
58 i1480_init(&i1480_usb->i1480);
96 * Write a buffer to a memory address in the i1480 device
98 * @i1480: i1480 instance
106 * so we copy it to the local i1480 buffer before proceeding. In any
110 int i1480_usb_write(struct i1480 *i1480, u32 memory_address,
114 struct i1480_usb *i1480_usb = container_of(i1480, struct i1480_usb, i1480);
119 buffer_size = size < i1480->buf_size ? size : i1480->buf_size;
120 memcpy(i1480->cmd_buf, buffer + itr, buffer_size);
125 i1480->cmd_buf, buffer_size, 100);
137 * Read a block [max size 512] of the device's memory to @i1480's buffer.
139 * @i1480: i1480 instance
150 int i1480_usb_read(struct i1480 *i1480, u32 addr, size_t size)
153 size_t itr, read_size = i1480->buf_size;
154 struct i1480_usb *i1480_usb = container_of(i1480, struct i1480_usb, i1480);
156 BUG_ON(size > i1480->buf_size);
170 i1480->cmd_buf + itr, itr_size,
173 dev_err(i1480->dev, "%s: USB read error: %zd\n",
179 dev_err(i1480->dev,
200 struct i1480 *i1480 = urb->context;
201 struct device *dev = i1480->dev;
217 i1480->evt_result = urb->actual_length;
218 complete(&i1480->evt_complete);
227 * initializing. Get that notification into i1480->evt_buf; upper layer
230 * Set i1480->evt_result with the result of getting the event or its
233 * Delivers the data directly to i1480->evt_buf
236 int i1480_usb_wait_init_done(struct i1480 *i1480)
239 struct device *dev = i1480->dev;
240 struct i1480_usb *i1480_usb = container_of(i1480, struct i1480_usb, i1480);
243 init_completion(&i1480->evt_complete);
244 i1480->evt_result = -EINPROGRESS;
248 i1480->evt_buf, i1480->buf_size,
249 i1480_usb_neep_cb, i1480, epd->bInterval);
258 &i1480->evt_complete, HZ);
269 i1480->evt_result = result;
275 * Generic function for issuing commands to the i1480
277 * @i1480: i1480 instance
291 int i1480_usb_cmd(struct i1480 *i1480, const char *cmd_name, size_t cmd_size)
294 struct device *dev = i1480->dev;
295 struct i1480_usb *i1480_usb = container_of(i1480, struct i1480_usb, i1480);
297 struct uwb_rccb *cmd = i1480->cmd_buf;
306 i1480->evt_buf, i1480->buf_size,
307 i1480_usb_neep_cb, i1480, epd->bInterval);
337 * Probe a i1480 device for uploading firmware.
345 struct i1480 *i1480;
373 i1480 = &i1480_usb->i1480;
374 i1480->buf_size = 512;
375 i1480->cmd_buf = kmalloc(2 * i1480->buf_size, GFP_KERNEL);
376 if (i1480->cmd_buf == NULL) {
381 i1480->evt_buf = i1480->cmd_buf + i1480->buf_size;
390 i1480->pre_fw_name = "i1480-pre-phy-0.0.bin";
391 i1480->mac_fw_name = "i1480-usb-0.0.bin";
392 i1480->mac_fw_name_deprecate = "ptc-0.0.bin";
393 i1480->phy_fw_name = "i1480-phy-0.0.bin";
394 i1480->dev = &iface->dev;
395 i1480->write = i1480_usb_write;
396 i1480->read = i1480_usb_read;
397 i1480->rc_setup = NULL;
398 i1480->wait_init_done = i1480_usb_wait_init_done;
399 i1480->cmd = i1480_usb_cmd;
401 result = i1480_fw_upload(&i1480_usb->i1480); /* the real thing */
408 kfree(i1480->cmd_buf);
415 MODULE_FIRMWARE("i1480-pre-phy-0.0.bin");
416 MODULE_FIRMWARE("i1480-usb-0.0.bin");
417 MODULE_FIRMWARE("i1480-phy-0.0.bin");
448 .name = "i1480-dfu-usb",
456 * Initialize the i1480 DFU driver.