linux/drivers/leds/leds-sun50i-a100.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2021-2023 Samuel Holland <[email protected]>
 *
 * Partly based on drivers/leds/leds-turris-omnia.c, which is:
 *     Copyright (c) 2020 by Marek Behún <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/led-class-multicolor.h>
#include <linux/leds.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/property.h>
#include <linux/reset.h>
#include <linux/spinlock.h>

#define LEDC_CTRL_REG
#define LEDC_CTRL_REG_DATA_LENGTH
#define LEDC_CTRL_REG_RGB_MODE
#define LEDC_CTRL_REG_LEDC_EN
#define LEDC_T01_TIMING_CTRL_REG
#define LEDC_T01_TIMING_CTRL_REG_T1H
#define LEDC_T01_TIMING_CTRL_REG_T1L
#define LEDC_T01_TIMING_CTRL_REG_T0H
#define LEDC_T01_TIMING_CTRL_REG_T0L
#define LEDC_RESET_TIMING_CTRL_REG
#define LEDC_RESET_TIMING_CTRL_REG_TR
#define LEDC_RESET_TIMING_CTRL_REG_LED_NUM
#define LEDC_DATA_REG
#define LEDC_DMA_CTRL_REG
#define LEDC_DMA_CTRL_REG_DMA_EN
#define LEDC_DMA_CTRL_REG_FIFO_TRIG_LEVEL
#define LEDC_INT_CTRL_REG
#define LEDC_INT_CTRL_REG_GLOBAL_INT_EN
#define LEDC_INT_CTRL_REG_FIFO_CPUREQ_INT_EN
#define LEDC_INT_CTRL_REG_TRANS_FINISH_INT_EN
#define LEDC_INT_STS_REG
#define LEDC_INT_STS_REG_FIFO_WLW
#define LEDC_INT_STS_REG_FIFO_CPUREQ_INT
#define LEDC_INT_STS_REG_TRANS_FINISH_INT

#define LEDC_FIFO_DEPTH
#define LEDC_MAX_LEDS
#define LEDC_CHANNELS_PER_LED

#define LEDS_TO_BYTES(n)

struct sun50i_a100_ledc_led {};

#define to_ledc_led(mc)

struct sun50i_a100_ledc_timing {};

struct sun50i_a100_ledc {};

static int sun50i_a100_ledc_dma_xfer(struct sun50i_a100_ledc *priv, unsigned int length)
{}

static void sun50i_a100_ledc_pio_xfer(struct sun50i_a100_ledc *priv, unsigned int fifo_used)
{}

static void sun50i_a100_ledc_start_xfer(struct sun50i_a100_ledc *priv, unsigned int length)
{}

static irqreturn_t sun50i_a100_ledc_irq(int irq, void *data)
{}

static void sun50i_a100_ledc_brightness_set(struct led_classdev *cdev,
					    enum led_brightness brightness)
{}

static const char *const sun50i_a100_ledc_formats[] =;

static int sun50i_a100_ledc_parse_format(struct device *dev,
					 struct sun50i_a100_ledc *priv)
{}

static void sun50i_a100_ledc_set_format(struct sun50i_a100_ledc *priv)
{}

static const struct sun50i_a100_ledc_timing sun50i_a100_ledc_default_timing =;

static int sun50i_a100_ledc_parse_timing(struct device *dev,
					 struct sun50i_a100_ledc *priv)
{}

static void sun50i_a100_ledc_set_timing(struct sun50i_a100_ledc *priv)
{}

static int sun50i_a100_ledc_resume(struct device *dev)
{}

static int sun50i_a100_ledc_suspend(struct device *dev)
{}

static void sun50i_a100_ledc_dma_cleanup(void *data)
{}

static int sun50i_a100_ledc_probe(struct platform_device *pdev)
{}

static void sun50i_a100_ledc_remove(struct platform_device *pdev)
{}

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

static DEFINE_SIMPLE_DEV_PM_OPS(sun50i_a100_ledc_pm,
				sun50i_a100_ledc_suspend,
				sun50i_a100_ledc_resume);

static struct platform_driver sun50i_a100_ledc_driver =;
module_platform_driver();

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