linux/drivers/gpio/gpio-sloppy-logic-analyzer.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Sloppy logic analyzer using GPIOs (to be run on an isolated CPU)
 *
 * Use the 'gpio-sloppy-logic-analyzer' script in the 'tools/gpio' folder for
 * easier usage and further documentation. Note that this is a last resort
 * analyzer which can be affected by latencies and non-deterministic code
 * paths. However, for e.g. remote development, it may be useful to get a first
 * view and aid further debugging.
 *
 * Copyright (C) Wolfram Sang <[email protected]>
 * Copyright (C) Renesas Electronics Corporation
 */

#include <linux/ctype.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/ktime.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <linux/sizes.h>
#include <linux/timekeeping.h>
#include <linux/types.h>
#include <linux/vmalloc.h>

#define GPIO_LA_NAME
#define GPIO_LA_DEFAULT_BUF_SIZE
/* can be increased but then we need to extend the u8 buffers */
#define GPIO_LA_MAX_PROBES
#define GPIO_LA_NUM_TESTS

struct gpio_la_poll_priv {};

static struct dentry *gpio_la_poll_debug_dir;

static __always_inline int gpio_la_get_array(struct gpio_descs *d, unsigned long *sptr)
{}

static int fops_capture_set(void *data, u64 val)
{}
DEFINE_DEBUGFS_ATTRIBUTE();

static int fops_buf_size_get(void *data, u64 *val)
{}

static int fops_buf_size_set(void *data, u64 val)
{}
DEFINE_DEBUGFS_ATTRIBUTE();

static int trigger_open(struct inode *inode, struct file *file)
{}

static ssize_t trigger_write(struct file *file, const char __user *ubuf,
			     size_t count, loff_t *offset)
{}

static const struct file_operations fops_trigger =;

static int gpio_la_poll_probe(struct platform_device *pdev)
{}

static void gpio_la_poll_remove(struct platform_device *pdev)
{}

static const struct of_device_id gpio_la_poll_of_match[] =;
MODULE_DEVICE_TABLE(of, gpio_la_poll_of_match);

static struct platform_driver gpio_la_poll_device_driver =;

static int __init gpio_la_poll_init(void)
{}
/*
 * Non-strict pin controllers can read GPIOs while being muxed to something else.
 * To support that, we need to claim GPIOs before further pinmuxing happens. So,
 * we probe early using 'late_initcall'
 */
late_initcall(gpio_la_poll_init);

static void __exit gpio_la_poll_exit(void)
{}
module_exit(gpio_la_poll_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();