linux/drivers/input/misc/cs40l50-vibra.c

// SPDX-License-Identifier: GPL-2.0
/*
 * CS40L50 Advanced Haptic Driver with waveform memory,
 * integrated DSP, and closed-loop algorithms
 *
 * Copyright 2024 Cirrus Logic, Inc.
 *
 * Author: James Ogletree <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/input.h>
#include <linux/mfd/cs40l50.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>

/* Wavetables */
#define CS40L50_RAM_INDEX_START
#define CS40L50_RAM_INDEX_END
#define CS40L50_RTH_INDEX_START
#define CS40L50_RTH_INDEX_END
#define CS40L50_ROM_INDEX_START
#define CS40L50_ROM_INDEX_END
#define CS40L50_TYPE_PCM
#define CS40L50_TYPE_PWLE
#define CS40L50_PCM_ID
#define CS40L50_OWT_CUSTOM_DATA_SIZE
#define CS40L50_CUSTOM_DATA_MASK

/* DSP */
#define CS40L50_GPIO_BASE
#define CS40L50_OWT_BASE
#define CS40L50_OWT_SIZE
#define CS40L50_OWT_NEXT
#define CS40L50_EFFECTS_MAX

/* GPIO */
#define CS40L50_GPIO_NUM_MASK
#define CS40L50_GPIO_EDGE_MASK
#define CS40L50_GPIO_MAPPING_NONE
#define CS40L50_GPIO_DISABLE

enum cs40l50_bank_type {};

/* Describes an area in DSP memory populated by effects */
struct cs40l50_bank {};

struct cs40l50_effect {};

/* Describes haptic interface of loaded DSP firmware */
struct cs40l50_vibra_dsp {};

/* Describes configuration and state of haptic operations */
struct cs40l50_vibra {};

struct cs40l50_work {};

static struct cs40l50_bank cs40l50_banks[] =;

static struct cs40l50_vibra_dsp cs40l50_dsp =;

static struct cs40l50_effect *cs40l50_find_effect(int id, struct list_head *effect_head)
{}

static int cs40l50_effect_bank_set(struct cs40l50_work *work_data,
				   struct cs40l50_effect *effect)
{}

static int cs40l50_effect_index_set(struct cs40l50_work *work_data,
				    struct cs40l50_effect *effect)
{}

static int cs40l50_effect_gpio_mapping_set(struct cs40l50_work *work_data,
					   struct cs40l50_effect *effect)
{}

struct cs40l50_owt_header {} __packed;

static int cs40l50_upload_owt(struct cs40l50_work *work_data)
{}

static void cs40l50_add_worker(struct work_struct *work)
{}

static int cs40l50_add(struct input_dev *dev, struct ff_effect *effect,
		       struct ff_effect *old)
{}

static void cs40l50_start_worker(struct work_struct *work)
{}

static void cs40l50_stop_worker(struct work_struct *work)
{}

static int cs40l50_playback(struct input_dev *dev, int effect_id, int val)
{}

static void cs40l50_erase_worker(struct work_struct *work)
{}

static int cs40l50_erase(struct input_dev *dev, int effect_id)
{}

static void cs40l50_remove_wq(void *data)
{}

static int cs40l50_vibra_probe(struct platform_device *pdev)
{}

static const struct platform_device_id cs40l50_vibra_id_match[] =;
MODULE_DEVICE_TABLE(platform, cs40l50_vibra_id_match);

static struct platform_driver cs40l50_vibra_driver =;
module_platform_driver();

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