Benign repos Download

spi-axiado.c

Includes Linux kernel module headerAssigns a negative errno constant
SHA-256bbe32dd8a076c65a3dce835558f87ed9a5baae1263fafdabb076ff428bc7f69b
MaleculeO(Er)H(Os)

Evidence

Includes Linux kernel module header lines 1–33
⋯5 lines
6//
7
8#include <linux/clk.h>
9#include <linux/delay.h>
10#include <linux/gpio/consumer.h>
11#include <linux/interrupt.h>
12#include <linux/io.h>
13#include <linux/module.h>
14#include <linux/of_irq.h>
15#include <linux/of_address.h>
16#include <linux/platform_device.h>
17#include <linux/pm_runtime.h>
18#include <linux/spi/spi.h>
19#include <linux/spi/spi-mem.h>
20#include <linux/sizes.h>
21
22#include "spi-axiado.h"
23
24/**
25 * ax_spi_read - Register Read - 32 bit per word
26 * @xspi: Pointer to the ax_spi structure
27 * @offset: Register offset address
28 *
29 * @return: Returns the value of that register
30 */
31static inline u32 ax_spi_read(struct ax_spi *xspi, u32 offset)
32{
33 return readl_rel …
English function-word token "and" lines 58–62
58/**
59 * ax_spi_init_hw - Initialize the hardware and configure the SPI controller
60 * @xspi: Pointer to the ax_spi structure
61 *
62 * * On reset the SPI …
English function-word token "for" lines 63–67
63:16… baud rate divisor is set to 4, threshold value for TX FIFO
64 * not full interrupt is set to 1 and size of the word to be transferred as 8 bit.
65 *
66 * This function initializes the SPI controller to disable and clear all the
67 * interrupts, enable manu …
Kernel error code return lines 581–596
581:20… , "Unsupported bus width, only 1-bit bus width supported\n");
582 return -EOPNOTSUPP;
583 }
584
⋯12 lines
Assigns a negative errno constant lines 656–665
656:30… to prevent aggressive busy-waiting */
657 }
658
659 if (timeout < 0) {
660 ret = -ETIMEDOUT;
661 goto out_unlock;
662 }
663
664 /* Calculate how many bytes we need to discard from the RX FIFO.
665 * Since we set SRI, we only need …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.