linux/drivers/auxdisplay/charlcd.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Character LCD driver for Linux
 *
 * Copyright (C) 2000-2008, Willy Tarreau <[email protected]>
 * Copyright (C) 2016-2017 Glider bvba
 */

#include <linux/atomic.h>
#include <linux/ctype.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/workqueue.h>

#ifndef CONFIG_PANEL_BOOT_MESSAGE
#include <generated/utsrelease.h>
#endif

#include "charlcd.h"

/* Keep the backlight on this many seconds for each flash */
#define LCD_BL_TEMPO_PERIOD

#define LCD_ESCAPE_LEN
#define LCD_ESCAPE_CHAR

struct charlcd_priv {};

#define charlcd_to_priv(p)

/* Device single-open policy control */
static atomic_t charlcd_available =;

/* turn the backlight on or off */
void charlcd_backlight(struct charlcd *lcd, enum charlcd_onoff on)
{}
EXPORT_SYMBOL_GPL();

static void charlcd_bl_off(struct work_struct *work)
{}

/* turn the backlight on for a little while */
void charlcd_poke(struct charlcd *lcd)
{}
EXPORT_SYMBOL_GPL();

static void charlcd_home(struct charlcd *lcd)
{}

static void charlcd_print(struct charlcd *lcd, char c)
{}

static void charlcd_clear_display(struct charlcd *lcd)
{}

/*
 * Parses a movement command of the form "(.*);", where the group can be
 * any number of subcommands of the form "(x|y)[0-9]+".
 *
 * Returns whether the command is valid. The position arguments are
 * only written if the parsing was successful.
 *
 * For instance:
 *   - ";"          returns (<original x>, <original y>).
 *   - "x1;"        returns (1, <original y>).
 *   - "y2x1;"      returns (1, 2).
 *   - "x12y34x56;" returns (56, 34).
 *   - ""           fails.
 *   - "x"          fails.
 *   - "x;"         fails.
 *   - "x1"         fails.
 *   - "xy12;"      fails.
 *   - "x12yy12;"   fails.
 *   - "xx"         fails.
 */
static bool parse_xy(const char *s, unsigned long *x, unsigned long *y)
{}

/*
 * These are the file operation function for user access to /dev/lcd
 * This function can also be called from inside the kernel, by
 * setting file and ppos to NULL.
 *
 */

static inline int handle_lcd_special_code(struct charlcd *lcd)
{}

static void charlcd_write_char(struct charlcd *lcd, char c)
{}

static struct charlcd *the_charlcd;

static ssize_t charlcd_write(struct file *file, const char __user *buf,
			     size_t count, loff_t *ppos)
{}

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

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

static const struct file_operations charlcd_fops =;

static struct miscdevice charlcd_dev =;

static void charlcd_puts(struct charlcd *lcd, const char *s)
{}

#ifdef CONFIG_PANEL_BOOT_MESSAGE
#define LCD_INIT_TEXT
#else
#define LCD_INIT_TEXT
#endif

#ifdef CONFIG_CHARLCD_BL_ON
#define LCD_INIT_BL
#elif defined(CONFIG_CHARLCD_BL_FLASH)
#define LCD_INIT_BL
#else
#define LCD_INIT_BL
#endif

/* initialize the LCD driver */
static int charlcd_init(struct charlcd *lcd)
{}

struct charlcd *charlcd_alloc(void)
{}
EXPORT_SYMBOL_GPL();

void charlcd_free(struct charlcd *lcd)
{}
EXPORT_SYMBOL_GPL();

static int panel_notify_sys(struct notifier_block *this, unsigned long code,
			    void *unused)
{}

static struct notifier_block panel_notifier =;

int charlcd_register(struct charlcd *lcd)
{}
EXPORT_SYMBOL_GPL();

int charlcd_unregister(struct charlcd *lcd)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();