core.c
Includes Linux kernel module headerAssigns a negative errno constant
SHA-256e023a19b68cf42ea4284ff2d7bdb3231472dd41de34ce53749cc182d763cf32d
MaleculeO(Er)H(Os)
Evidence
⋯4 lines
5 * Author: Nicolas Pitre <npitre@baylibre.com>
6 *
7 * Core driver code with main interface to the I3C subsystem.
8 */
9
10#include <linux/bitfield.h>
11#include <linux/device.h>
12#include <linux/errno.h>
13#include <linux/i3c/master.h>
14#include <linux/interrupt.h>
15#include <linux/iopoll.h>
16#include <linux/module.h>
17#include <linux/platform_data/mipi-i3c-hci.h>
18#include <linux/platform_device.h>
19#include <linux/pm_runtime.h>
20
21#include "hci.h"
22#include "ext_caps.h"
23#include "cmd.h"
24#include "dat.h"
25
26/*
27 * Host Controller Capabilities and Operation Registers
28 */
29
30#define HCI_VERSION 0x00 /* HCI Version (in BCD) */
31
32#define HC_CONT …
227:46… 0].payload.len);
228
229 xfer = hci_alloc_xfer(nxfers);
230 if (!xfer)
231 return -ENOMEM;
232
233 if (prefixed) {
⋯6 lines
240 }
241
242 for (i = 0; i < nxfers - prefixed; i++) {
243 xfer[i].data = ccc->dests[i].payload.data;
244 xfer[i].da …
262:34… (&done, HZ) &&
263 hci->io->dequeue_xfer(hci, xfer, nxfers)) {
264 ret = -ETIME;
265 goto out;
266 }
⋯4 lines
570:56… when the IRQ is
571 * due to a different device. That could happen when runtime suspended,
572 * so exit immediately if IRQs are not expected for this device.
573 */
574 if (hci->irq_inactive)
⋯4 lines
796:58… me, error %d\n", ret);
797
798 /*
799 * I3C devices may have retained their dynamic address anyway. Do not
800 * fail the resume because of DAA error.
801 */
802 r …