Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
43 lines
858 B
C
43 lines
858 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
* Copyright (c) 2014-2020, Elliptic Laboratories AS. All rights reserved.
|
|
* Elliptic Labs Linux driver
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <linux/ioctl.h>
|
|
#include <linux/cdev.h>
|
|
#include <linux/semaphore.h>
|
|
#include "elliptic_data_io.h"
|
|
|
|
#define ELLIPTIC_DEVICENAME "elliptic"
|
|
#define ELLIPTIC_NUM_DEVICES 2
|
|
|
|
#define IOCTL_ELLIPTIC_APP 197
|
|
#define MIRROR_TAG 0x3D0A4842
|
|
|
|
#define IOCTL_ELLIPTIC_DATA_IO_CANCEL \
|
|
_IO(IOCTL_ELLIPTIC_APP, 2)
|
|
|
|
#define IOCTL_ELLIPTIC_ACTIVATE_ENGINE \
|
|
_IOW(IOCTL_ELLIPTIC_APP, 3, int)
|
|
|
|
#define IOCTL_ELLIPTIC_SET_RAMP_DOWN \
|
|
_IO(IOCTL_ELLIPTIC_APP, 4)
|
|
|
|
#define IOCTL_ELLIPTIC_SYSTEM_CONFIGURATION \
|
|
_IOW(IOCTL_ELLIPTIC_APP, 5, int)
|
|
|
|
struct elliptic_device {
|
|
int opened;
|
|
struct cdev cdev;
|
|
struct semaphore sem;
|
|
struct elliptic_data el_data;
|
|
};
|
|
|
|
extern struct class *elliptic_class;
|
|
|
|
|