restore lost packages from 0.2.3 + fix overwritten 0.2.4 files

- Restore 29 recipe symlinks (libdrm, qtbase, dbus, sddm, pipewire, etc.)
- Restore 33 patches (KDE, libdrm, mesa, pipewire, sddm, wireplumber)
- Restore 20+ local/scripts (audit, lint, test, build helpers)
- Restore src/cook/scheduler.rs, status.rs, gnu-config/
- Restore scripts/patch-inclusion-gate.sh, run_mini1.sh, validate-collision-log.sh
- Recover TLC source from HEAD (was overwritten by 0.2.3 checkout)
- Recover 11 local/docs plans from HEAD (were overwritten)
- Recover qt6-wayland-smoke symlink from HEAD
- Fix MOTD: remove garbled ASCII art, use clean text
- Update version: 0.2.0 -> 0.2.4 in os-release, motd, config
- Reduce filesystem_size: 1536 -> 512 MiB
- Add ABSOLUTE RULE to AGENTS.md: never delete/ignore packages
- Reduce pcid scheme log verbosity: info -> debug
This commit is contained in:
2026-06-19 12:39:14 +03:00
parent ffbe098ef8
commit dc68054305
6418 changed files with 7066233 additions and 8670 deletions
@@ -0,0 +1,63 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* include/linux/input/ad714x.h
*
* AD714x is very flexible, it can be used as buttons, scrollwheel,
* slider, touchpad at the same time. That depends on the boards.
* The platform_data for the device's "struct device" holds this
* information.
*
* Copyright 2009-2011 Analog Devices Inc.
*/
#ifndef __LINUX_INPUT_AD714X_H__
#define __LINUX_INPUT_AD714X_H__
#define STAGE_NUM 12
#define STAGE_CFGREG_NUM 8
#define SYS_CFGREG_NUM 8
/* board information which need be initialized in arch/mach... */
struct ad714x_slider_plat {
int start_stage;
int end_stage;
int max_coord;
};
struct ad714x_wheel_plat {
int start_stage;
int end_stage;
int max_coord;
};
struct ad714x_touchpad_plat {
int x_start_stage;
int x_end_stage;
int x_max_coord;
int y_start_stage;
int y_end_stage;
int y_max_coord;
};
struct ad714x_button_plat {
int keycode;
unsigned short l_mask;
unsigned short h_mask;
};
struct ad714x_platform_data {
int slider_num;
int wheel_num;
int touchpad_num;
int button_num;
struct ad714x_slider_plat *slider;
struct ad714x_wheel_plat *wheel;
struct ad714x_touchpad_plat *touchpad;
struct ad714x_button_plat *button;
unsigned short stage_cfg_reg[STAGE_NUM][STAGE_CFGREG_NUM];
unsigned short sys_cfg_reg[SYS_CFGREG_NUM];
unsigned long irqflags;
};
#endif
@@ -0,0 +1,357 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* include/linux/input/adxl34x.h
*
* Digital Accelerometer characteristics are highly application specific
* and may vary between boards and models. The platform_data for the
* device's "struct device" holds this information.
*
* Copyright 2009 Analog Devices Inc.
*/
#ifndef __LINUX_INPUT_ADXL34X_H__
#define __LINUX_INPUT_ADXL34X_H__
#include <linux/input.h>
struct adxl34x_platform_data {
/*
* X,Y,Z Axis Offset:
* offer user offset adjustments in twoscompliment
* form with a scale factor of 15.6 mg/LSB (i.e. 0x7F = +2 g)
*/
s8 x_axis_offset;
s8 y_axis_offset;
s8 z_axis_offset;
/*
* TAP_X/Y/Z Enable: Setting TAP_X, Y, or Z Enable enables X,
* Y, or Z participation in Tap detection. A '0' excludes the
* selected axis from participation in Tap detection.
* Setting the SUPPRESS bit suppresses Double Tap detection if
* acceleration greater than tap_threshold is present during the
* tap_latency period, i.e. after the first tap but before the
* opening of the second tap window.
*/
#define ADXL_SUPPRESS (1 << 3)
#define ADXL_TAP_X_EN (1 << 2)
#define ADXL_TAP_Y_EN (1 << 1)
#define ADXL_TAP_Z_EN (1 << 0)
u8 tap_axis_control;
/*
* tap_threshold:
* holds the threshold value for tap detection/interrupts.
* The data format is unsigned. The scale factor is 62.5 mg/LSB
* (i.e. 0xFF = +16 g). A zero value may result in undesirable
* behavior if Tap/Double Tap is enabled.
*/
u8 tap_threshold;
/*
* tap_duration:
* is an unsigned time value representing the maximum
* time that an event must be above the tap_threshold threshold
* to qualify as a tap event. The scale factor is 625 us/LSB. A zero
* value will prevent Tap/Double Tap functions from working.
*/
u8 tap_duration;
/*
* tap_latency:
* is an unsigned time value representing the wait time
* from the detection of a tap event to the opening of the time
* window tap_window for a possible second tap event. The scale
* factor is 1.25 ms/LSB. A zero value will disable the Double Tap
* function.
*/
u8 tap_latency;
/*
* tap_window:
* is an unsigned time value representing the amount
* of time after the expiration of tap_latency during which a second
* tap can begin. The scale factor is 1.25 ms/LSB. A zero value will
* disable the Double Tap function.
*/
u8 tap_window;
/*
* act_axis_control:
* X/Y/Z Enable: A '1' enables X, Y, or Z participation in activity
* or inactivity detection. A '0' excludes the selected axis from
* participation. If all of the axes are excluded, the function is
* disabled.
* AC/DC: A '0' = DC coupled operation and a '1' = AC coupled
* operation. In DC coupled operation, the current acceleration is
* compared with activity_threshold and inactivity_threshold directly
* to determine whether activity or inactivity is detected. In AC
* coupled operation for activity detection, the acceleration value
* at the start of activity detection is taken as a reference value.
* New samples of acceleration are then compared to this
* reference value and if the magnitude of the difference exceeds
* activity_threshold the device will trigger an activity interrupt. In
* AC coupled operation for inactivity detection, a reference value
* is used again for comparison and is updated whenever the
* device exceeds the inactivity threshold. Once the reference
* value is selected, the device compares the magnitude of the
* difference between the reference value and the current
* acceleration with inactivity_threshold. If the difference is below
* inactivity_threshold for a total of inactivity_time, the device is
* considered inactive and the inactivity interrupt is triggered.
*/
#define ADXL_ACT_ACDC (1 << 7)
#define ADXL_ACT_X_EN (1 << 6)
#define ADXL_ACT_Y_EN (1 << 5)
#define ADXL_ACT_Z_EN (1 << 4)
#define ADXL_INACT_ACDC (1 << 3)
#define ADXL_INACT_X_EN (1 << 2)
#define ADXL_INACT_Y_EN (1 << 1)
#define ADXL_INACT_Z_EN (1 << 0)
u8 act_axis_control;
/*
* activity_threshold:
* holds the threshold value for activity detection.
* The data format is unsigned. The scale factor is
* 62.5 mg/LSB. A zero value may result in undesirable behavior if
* Activity interrupt is enabled.
*/
u8 activity_threshold;
/*
* inactivity_threshold:
* holds the threshold value for inactivity
* detection. The data format is unsigned. The scale
* factor is 62.5 mg/LSB. A zero value may result in undesirable
* behavior if Inactivity interrupt is enabled.
*/
u8 inactivity_threshold;
/*
* inactivity_time:
* is an unsigned time value representing the
* amount of time that acceleration must be below the value in
* inactivity_threshold for inactivity to be declared. The scale factor
* is 1 second/LSB. Unlike the other interrupt functions, which
* operate on unfiltered data, the inactivity function operates on the
* filtered output data. At least one output sample must be
* generated for the inactivity interrupt to be triggered. This will
* result in the function appearing un-responsive if the
* inactivity_time register is set with a value less than the time
* constant of the Output Data Rate. A zero value will result in an
* interrupt when the output data is below inactivity_threshold.
*/
u8 inactivity_time;
/*
* free_fall_threshold:
* holds the threshold value for Free-Fall detection.
* The data format is unsigned. The root-sum-square(RSS) value
* of all axes is calculated and compared to the value in
* free_fall_threshold to determine if a free fall event may be
* occurring. The scale factor is 62.5 mg/LSB. A zero value may
* result in undesirable behavior if Free-Fall interrupt is
* enabled. Values between 300 and 600 mg (0x05 to 0x09) are
* recommended.
*/
u8 free_fall_threshold;
/*
* free_fall_time:
* is an unsigned time value representing the minimum
* time that the RSS value of all axes must be less than
* free_fall_threshold to generate a Free-Fall interrupt. The
* scale factor is 5 ms/LSB. A zero value may result in
* undesirable behavior if Free-Fall interrupt is enabled.
* Values between 100 to 350 ms (0x14 to 0x46) are recommended.
*/
u8 free_fall_time;
/*
* data_rate:
* Selects device bandwidth and output data rate.
* RATE = 3200 Hz / (2^(15 - x)). Default value is 0x0A, or 100 Hz
* Output Data Rate. An Output Data Rate should be selected that
* is appropriate for the communication protocol and frequency
* selected. Selecting too high of an Output Data Rate with a low
* communication speed will result in samples being discarded.
*/
u8 data_rate;
/*
* data_range:
* FULL_RES: When this bit is set with the device is
* in Full-Resolution Mode, where the output resolution increases
* with RANGE to maintain a 4 mg/LSB scale factor. When this
* bit is cleared the device is in 10-bit Mode and RANGE determine the
* maximum g-Range and scale factor.
*/
#define ADXL_FULL_RES (1 << 3)
#define ADXL_RANGE_PM_2g 0
#define ADXL_RANGE_PM_4g 1
#define ADXL_RANGE_PM_8g 2
#define ADXL_RANGE_PM_16g 3
u8 data_range;
/*
* low_power_mode:
* A '0' = Normal operation and a '1' = Reduced
* power operation with somewhat higher noise.
*/
u8 low_power_mode;
/*
* power_mode:
* LINK: A '1' with both the activity and inactivity functions
* enabled will delay the start of the activity function until
* inactivity is detected. Once activity is detected, inactivity
* detection will begin and prevent the detection of activity. This
* bit serially links the activity and inactivity functions. When '0'
* the inactivity and activity functions are concurrent. Additional
* information can be found in the ADXL34x datasheet's Application
* section under Link Mode.
* AUTO_SLEEP: A '1' sets the ADXL34x to switch to Sleep Mode
* when inactivity (acceleration has been below inactivity_threshold
* for at least inactivity_time) is detected and the LINK bit is set.
* A '0' disables automatic switching to Sleep Mode. See the
* Sleep Bit section of the ADXL34x datasheet for more information.
*/
#define ADXL_LINK (1 << 5)
#define ADXL_AUTO_SLEEP (1 << 4)
u8 power_mode;
/*
* fifo_mode:
* BYPASS The FIFO is bypassed
* FIFO FIFO collects up to 32 values then stops collecting data
* STREAM FIFO holds the last 32 data values. Once full, the FIFO's
* oldest data is lost as it is replaced with newer data
*
* DEFAULT should be ADXL_FIFO_STREAM
*/
#define ADXL_FIFO_BYPASS 0
#define ADXL_FIFO_FIFO 1
#define ADXL_FIFO_STREAM 2
u8 fifo_mode;
/*
* watermark:
* The Watermark feature can be used to reduce the interrupt load
* of the system. The FIFO fills up to the value stored in watermark
* [1..32] and then generates an interrupt.
* A '0' disables the watermark feature.
*/
u8 watermark;
/*
* When acceleration measurements are received from the ADXL34x
* events are sent to the event subsystem. The following settings
* select the event type and event code for new x, y and z axis data
* respectively.
*/
u32 ev_type; /* EV_ABS or EV_REL */
u32 ev_code_x; /* ABS_X,Y,Z or REL_X,Y,Z */
u32 ev_code_y; /* ABS_X,Y,Z or REL_X,Y,Z */
u32 ev_code_z; /* ABS_X,Y,Z or REL_X,Y,Z */
/*
* A valid BTN or KEY Code; use tap_axis_control to disable
* event reporting
*/
u32 ev_code_tap[3]; /* EV_KEY {X-Axis, Y-Axis, Z-Axis} */
/*
* A valid BTN or KEY Code for Free-Fall or Activity enables
* input event reporting. A '0' disables the Free-Fall or
* Activity reporting.
*/
u32 ev_code_ff; /* EV_KEY */
u32 ev_code_act_inactivity; /* EV_KEY */
/*
* Use ADXL34x INT2 pin instead of INT1 pin for interrupt output
*/
u8 use_int2;
/*
* ADXL346 only ORIENTATION SENSING feature
* The orientation function of the ADXL346 reports both 2-D and
* 3-D orientation concurrently.
*/
#define ADXL_EN_ORIENTATION_2D 1
#define ADXL_EN_ORIENTATION_3D 2
#define ADXL_EN_ORIENTATION_2D_3D 3
u8 orientation_enable;
/*
* The width of the deadzone region between two or more
* orientation positions is determined by setting the Deadzone
* value. The deadzone region size can be specified with a
* resolution of 3.6deg. The deadzone angle represents the total
* angle where the orientation is considered invalid.
*/
#define ADXL_DEADZONE_ANGLE_0p0 0 /* !!!0.0 [deg] */
#define ADXL_DEADZONE_ANGLE_3p6 1 /* 3.6 [deg] */
#define ADXL_DEADZONE_ANGLE_7p2 2 /* 7.2 [deg] */
#define ADXL_DEADZONE_ANGLE_10p8 3 /* 10.8 [deg] */
#define ADXL_DEADZONE_ANGLE_14p4 4 /* 14.4 [deg] */
#define ADXL_DEADZONE_ANGLE_18p0 5 /* 18.0 [deg] */
#define ADXL_DEADZONE_ANGLE_21p6 6 /* 21.6 [deg] */
#define ADXL_DEADZONE_ANGLE_25p2 7 /* 25.2 [deg] */
u8 deadzone_angle;
/*
* To eliminate most human motion such as walking or shaking,
* a Divisor value should be selected to effectively limit the
* orientation bandwidth. Set the depth of the filter used to
* low-pass filter the measured acceleration for stable
* orientation sensing
*/
#define ADXL_LP_FILTER_DIVISOR_2 0
#define ADXL_LP_FILTER_DIVISOR_4 1
#define ADXL_LP_FILTER_DIVISOR_8 2
#define ADXL_LP_FILTER_DIVISOR_16 3
#define ADXL_LP_FILTER_DIVISOR_32 4
#define ADXL_LP_FILTER_DIVISOR_64 5
#define ADXL_LP_FILTER_DIVISOR_128 6
#define ADXL_LP_FILTER_DIVISOR_256 7
u8 divisor_length;
u32 ev_codes_orient_2d[4]; /* EV_KEY {+X, -X, +Y, -Y} */
u32 ev_codes_orient_3d[6]; /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
};
#endif
@@ -0,0 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _AS5011_H
#define _AS5011_H
/*
* Copyright (c) 2010, 2011 Fabien Marteau <fabien.marteau@armadeus.com>
*/
struct as5011_platform_data {
unsigned int axis_irq; /* irq number */
unsigned long axis_irqflags;
char xp, xn; /* threshold for x axis */
char yp, yn; /* threshold for y axis */
};
#endif /* _AS5011_H */
@@ -0,0 +1,48 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* VTI CMA3000_Dxx Accelerometer driver
*
* Copyright (C) 2010 Texas Instruments
* Author: Hemanth V <hemanthv@ti.com>
*/
#ifndef _LINUX_CMA3000_H
#define _LINUX_CMA3000_H
#define CMAMODE_DEFAULT 0
#define CMAMODE_MEAS100 1
#define CMAMODE_MEAS400 2
#define CMAMODE_MEAS40 3
#define CMAMODE_MOTDET 4
#define CMAMODE_FF100 5
#define CMAMODE_FF400 6
#define CMAMODE_POFF 7
#define CMARANGE_2G 2000
#define CMARANGE_8G 8000
/**
* struct cma3000_i2c_platform_data - CMA3000 Platform data
* @fuzz_x: Noise on X Axis
* @fuzz_y: Noise on Y Axis
* @fuzz_z: Noise on Z Axis
* @g_range: G range in milli g i.e 2000 or 8000
* @mode: Operating mode
* @mdthr: Motion detect threshold value
* @mdfftmr: Motion detect and free fall time value
* @ffthr: Free fall threshold value
*/
struct cma3000_platform_data {
int fuzz_x;
int fuzz_y;
int fuzz_z;
int g_range;
uint8_t mode;
uint8_t mdthr;
uint8_t mdfftmr;
uint8_t ffthr;
unsigned long irqflags;
};
#endif
@@ -0,0 +1,80 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Elan I2C/SMBus Touchpad device whitelist
*
* Copyright (c) 2013 ELAN Microelectronics Corp.
*
* Author: æ維 (Duson Lin) <dusonlin@emc.com.tw>
* Author: KT Liao <kt.liao@emc.com.tw>
* Version: 1.6.3
*
* Based on cyapa driver:
* copyright (c) 2011-2012 Cypress Semiconductor, Inc.
* copyright (c) 2011-2012 Google, Inc.
*
* Trademarks are the property of their respective owners.
*/
#ifndef __ELAN_I2C_IDS_H
#define __ELAN_I2C_IDS_H
#include <linux/mod_devicetable.h>
static const struct acpi_device_id elan_acpi_id[] = {
{ "ELAN0000", 0 },
{ "ELAN0100", 0 },
{ "ELAN0600", 0 },
{ "ELAN0601", 0 },
{ "ELAN0602", 0 },
{ "ELAN0603", 0 },
{ "ELAN0604", 0 },
{ "ELAN0605", 0 },
{ "ELAN0606", 0 },
{ "ELAN0607", 0 },
{ "ELAN0608", 0 },
{ "ELAN0609", 0 },
{ "ELAN060B", 0 },
{ "ELAN060C", 0 },
{ "ELAN060F", 0 },
{ "ELAN0610", 0 },
{ "ELAN0611", 0 },
{ "ELAN0612", 0 },
{ "ELAN0615", 0 },
{ "ELAN0616", 0 },
{ "ELAN0617", 0 },
{ "ELAN0618", 0 },
{ "ELAN0619", 0 },
{ "ELAN061A", 0 },
/* { "ELAN061B", 0 }, not working on the Lenovo Legion Y7000 */
{ "ELAN061C", 0 },
{ "ELAN061D", 0 },
{ "ELAN061E", 0 },
{ "ELAN061F", 0 },
{ "ELAN0620", 0 },
{ "ELAN0621", 0 },
{ "ELAN0622", 0 },
{ "ELAN0623", 0 },
{ "ELAN0624", 0 },
{ "ELAN0625", 0 },
{ "ELAN0626", 0 },
{ "ELAN0627", 0 },
{ "ELAN0628", 0 },
{ "ELAN0629", 0 },
{ "ELAN062A", 0 },
{ "ELAN062B", 0 },
{ "ELAN062C", 0 },
{ "ELAN062D", 0 },
{ "ELAN062E", 0 }, /* Lenovo V340 Whiskey Lake U */
{ "ELAN062F", 0 }, /* Lenovo V340 Comet Lake U */
{ "ELAN0631", 0 },
{ "ELAN0632", 0 },
{ "ELAN0633", 0 }, /* Lenovo S145 */
{ "ELAN0634", 0 }, /* Lenovo V340 Ice lake */
{ "ELAN0635", 0 }, /* Lenovo V1415-IIL */
{ "ELAN0636", 0 }, /* Lenovo V1415-Dali */
{ "ELAN0637", 0 }, /* Lenovo V1415-IGLR */
{ "ELAN1000", 0 },
{ }
};
#endif /* __ELAN_I2C_IDS_H */
@@ -0,0 +1,48 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2011 Kionix, Inc.
* Written by Chris Hudson <chudson@kionix.com>
*/
#ifndef __KXTJ9_H__
#define __KXTJ9_H__
#define KXTJ9_I2C_ADDR 0x0F
struct kxtj9_platform_data {
unsigned int min_interval; /* minimum poll interval (in milli-seconds) */
unsigned int init_interval; /* initial poll interval (in milli-seconds) */
/*
* By default, x is axis 0, y is axis 1, z is axis 2; these can be
* changed to account for sensor orientation within the host device.
*/
u8 axis_map_x;
u8 axis_map_y;
u8 axis_map_z;
/*
* Each axis can be negated to account for sensor orientation within
* the host device.
*/
bool negate_x;
bool negate_y;
bool negate_z;
/* CTRL_REG1: set resolution, g-range, data ready enable */
/* Output resolution: 8-bit valid or 12-bit valid */
#define RES_8BIT 0
#define RES_12BIT (1 << 6)
u8 res_12bit;
/* Output g-range: +/-2g, 4g, or 8g */
#define KXTJ9_G_2G 0
#define KXTJ9_G_4G (1 << 3)
#define KXTJ9_G_8G (1 << 4)
u8 g_range;
int (*init)(void);
void (*exit)(void);
int (*power_on)(void);
int (*power_off)(void);
};
#endif /* __KXTJ9_H__ */
@@ -0,0 +1,24 @@
/*
* public include for LM8333 keypad driver - same license as driver
* Copyright (C) 2012 Wolfram Sang, Pengutronix <kernel@pengutronix.de>
*/
#ifndef _LM8333_H
#define _LM8333_H
struct lm8333;
struct lm8333_platform_data {
/* Keymap data */
const struct matrix_keymap_data *matrix_data;
/* Active timeout before enter HALT mode in microseconds */
unsigned active_time;
/* Debounce interval in microseconds */
unsigned debounce_time;
};
extern int lm8333_read8(struct lm8333 *lm8333, u8 cmd);
extern int lm8333_write8(struct lm8333 *lm8333, u8 cmd, u8 val);
extern int lm8333_read_block(struct lm8333 *lm8333, u8 cmd, u8 len, u8 *buf);
#endif /* _LM8333_H */
@@ -0,0 +1,45 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _MATRIX_KEYPAD_H
#define _MATRIX_KEYPAD_H
#include <linux/types.h>
struct device;
struct input_dev;
#define MATRIX_MAX_ROWS 32
#define MATRIX_MAX_COLS 32
#define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\
(((col) & (MATRIX_MAX_COLS - 1)) << 16) |\
((val) & 0xffff))
#define KEY_ROW(k) (((k) >> 24) & 0xff)
#define KEY_COL(k) (((k) >> 16) & 0xff)
#define KEY_VAL(k) ((k) & 0xffff)
#define MATRIX_SCAN_CODE(row, col, row_shift) (((row) << (row_shift)) + (col))
/**
* struct matrix_keymap_data - keymap for matrix keyboards
* @keymap: pointer to array of uint32 values encoded with KEY() macro
* representing keymap
* @keymap_size: number of entries (initialized) in this keymap
*
* This structure is supposed to be used by platform code to supply
* keymaps to drivers that implement matrix-like keypads/keyboards.
*/
struct matrix_keymap_data {
const uint32_t *keymap;
unsigned int keymap_size;
};
int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
const char *keymap_name,
unsigned int rows, unsigned int cols,
unsigned short *keymap,
struct input_dev *input_dev);
int matrix_keypad_parse_properties(struct device *dev,
unsigned int *rows, unsigned int *cols);
#endif /* _MATRIX_KEYPAD_H */
@@ -0,0 +1,130 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _INPUT_MT_H
#define _INPUT_MT_H
/*
* Input Multitouch Library
*
* Copyright (c) 2010 Henrik Rydberg
*/
#include <linux/input.h>
#define TRKID_MAX 0xffff
#define INPUT_MT_POINTER 0x0001 /* pointer device, e.g. trackpad */
#define INPUT_MT_DIRECT 0x0002 /* direct device, e.g. touchscreen */
#define INPUT_MT_DROP_UNUSED 0x0004 /* drop contacts not seen in frame */
#define INPUT_MT_TRACK 0x0008 /* use in-kernel tracking */
#define INPUT_MT_SEMI_MT 0x0010 /* semi-mt device, finger count handled manually */
#define INPUT_MT_TOTAL_FORCE 0x0020 /* calculate total force from slots pressure */
/**
* struct input_mt_slot - represents the state of an input MT slot
* @abs: holds current values of ABS_MT axes for this slot
* @frame: last frame at which input_mt_report_slot_state() was called
* @key: optional driver designation of this slot
*/
struct input_mt_slot {
int abs[ABS_MT_LAST - ABS_MT_FIRST + 1];
unsigned int frame;
unsigned int key;
};
/**
* struct input_mt - state of tracked contacts
* @trkid: stores MT tracking ID for the next contact
* @num_slots: number of MT slots the device uses
* @slot: MT slot currently being transmitted
* @flags: input_mt operation flags
* @frame: increases every time input_mt_sync_frame() is called
* @red: reduced cost matrix for in-kernel tracking
* @slots: array of slots holding current values of tracked contacts
*/
struct input_mt {
int trkid;
int num_slots;
int slot;
unsigned int flags;
unsigned int frame;
int *red;
struct input_mt_slot slots[] __counted_by(num_slots);
};
static inline void input_mt_set_value(struct input_mt_slot *slot,
unsigned code, int value)
{
slot->abs[code - ABS_MT_FIRST] = value;
}
static inline int input_mt_get_value(const struct input_mt_slot *slot,
unsigned code)
{
return slot->abs[code - ABS_MT_FIRST];
}
static inline bool input_mt_is_active(const struct input_mt_slot *slot)
{
return input_mt_get_value(slot, ABS_MT_TRACKING_ID) >= 0;
}
static inline bool input_mt_is_used(const struct input_mt *mt,
const struct input_mt_slot *slot)
{
return slot->frame == mt->frame;
}
int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots,
unsigned int flags);
void input_mt_destroy_slots(struct input_dev *dev);
static inline int input_mt_new_trkid(struct input_mt *mt)
{
return mt->trkid++ & TRKID_MAX;
}
static inline void input_mt_slot(struct input_dev *dev, int slot)
{
input_event(dev, EV_ABS, ABS_MT_SLOT, slot);
}
static inline bool input_is_mt_value(int axis)
{
return axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST;
}
static inline bool input_is_mt_axis(int axis)
{
return axis == ABS_MT_SLOT || input_is_mt_value(axis);
}
bool input_mt_report_slot_state(struct input_dev *dev,
unsigned int tool_type, bool active);
static inline void input_mt_report_slot_inactive(struct input_dev *dev)
{
input_mt_report_slot_state(dev, 0, false);
}
void input_mt_report_finger_count(struct input_dev *dev, int count);
void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count);
void input_mt_drop_unused(struct input_dev *dev);
void input_mt_sync_frame(struct input_dev *dev);
/**
* struct input_mt_pos - contact position
* @x: horizontal coordinate
* @y: vertical coordinate
*/
struct input_mt_pos {
s16 x, y;
};
int input_mt_assign_slots(struct input_dev *dev, int *slots,
const struct input_mt_pos *pos, int num_pos,
int dmax);
int input_mt_get_slot_by_key(struct input_dev *dev, int key);
#endif
@@ -0,0 +1,39 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Samsung Keypad platform data definitions
*
* Copyright (C) 2010 Samsung Electronics Co.Ltd
* Author: Joonyoung Shim <jy0922.shim@samsung.com>
*/
#ifndef __SAMSUNG_KEYPAD_H
#define __SAMSUNG_KEYPAD_H
#include <linux/input/matrix_keypad.h>
#define SAMSUNG_MAX_ROWS 8
#define SAMSUNG_MAX_COLS 8
/**
* struct samsung_keypad_platdata - Platform device data for Samsung Keypad.
* @keymap_data: pointer to &matrix_keymap_data.
* @rows: number of keypad row supported.
* @cols: number of keypad col supported.
* @no_autorepeat: disable key autorepeat.
* @wakeup: controls whether the device should be set up as wakeup source.
* @cfg_gpio: configure the GPIO.
*
* Initialisation data specific to either the machine or the platform
* for the device driver to use or call-back when configuring gpio.
*/
struct samsung_keypad_platdata {
const struct matrix_keymap_data *keymap_data;
unsigned int rows;
unsigned int cols;
bool no_autorepeat;
bool wakeup;
void (*cfg_gpio)(unsigned int rows, unsigned int cols);
};
#endif /* __SAMSUNG_KEYPAD_H */
@@ -0,0 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __SH_KEYSC_H__
#define __SH_KEYSC_H__
#define SH_KEYSC_MAXKEYS 64
struct sh_keysc_info {
enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3,
SH_KEYSC_MODE_4, SH_KEYSC_MODE_5, SH_KEYSC_MODE_6 } mode;
int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */
int delay;
int kycr2_delay;
int keycodes[SH_KEYSC_MAXKEYS]; /* KEYIN * KEYOUT */
};
#endif /* __SH_KEYSC_H__ */
@@ -0,0 +1,59 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _SPARSE_KEYMAP_H
#define _SPARSE_KEYMAP_H
/*
* Copyright (c) 2009 Dmitry Torokhov
*/
#define KE_END 0 /* Indicates end of keymap */
#define KE_KEY 1 /* Ordinary key/button */
#define KE_SW 2 /* Switch (predetermined value) */
#define KE_VSW 3 /* Switch (value supplied at runtime) */
#define KE_IGNORE 4 /* Known entry that should be ignored */
#define KE_LAST KE_IGNORE
/**
* struct key_entry - keymap entry for use in sparse keymap
* @type: Type of the key entry (KE_KEY, KE_SW, KE_VSW, KE_END);
* drivers are allowed to extend the list with their own
* private definitions.
* @code: Device-specific data identifying the button/switch
* @keycode: KEY_* code assigned to a key/button
* @sw: struct with code/value used by KE_SW and KE_VSW
* @sw.code: SW_* code assigned to a switch
* @sw.value: Value that should be sent in an input even when KE_SW
* switch is toggled. KE_VSW switches ignore this field and
* expect driver to supply value for the event.
*
* This structure defines an entry in a sparse keymap used by some
* input devices for which traditional table-based approach is not
* suitable.
*/
struct key_entry {
int type; /* See KE_* above */
u32 code;
union {
u16 keycode; /* For KE_KEY */
struct { /* For KE_SW, KE_VSW */
u8 code;
u8 value; /* For KE_SW, ignored by KE_VSW */
} sw;
};
};
struct key_entry *sparse_keymap_entry_from_scancode(struct input_dev *dev,
unsigned int code);
struct key_entry *sparse_keymap_entry_from_keycode(struct input_dev *dev,
unsigned int code);
int sparse_keymap_setup(struct input_dev *dev,
const struct key_entry *keymap,
int (*setup)(struct input_dev *, struct key_entry *));
void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *ke,
unsigned int value, bool autorelease);
bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code,
unsigned int value, bool autorelease);
#endif /* _SPARSE_KEYMAP_H */
@@ -0,0 +1,25 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2023 Javier Carrasco <javier.carrasco@wolfvision.net>
*/
#ifndef _TOUCH_OVERLAY
#define _TOUCH_OVERLAY
#include <linux/types.h>
struct input_dev;
int touch_overlay_map(struct list_head *list, struct input_dev *input);
void touch_overlay_get_touchscreen_abs(struct list_head *list, u16 *x, u16 *y);
bool touch_overlay_mapped_touchscreen(struct list_head *list);
bool touch_overlay_process_contact(struct list_head *list,
struct input_dev *input,
struct input_mt_pos *pos, int slot);
void touch_overlay_sync_frame(struct list_head *list, struct input_dev *input);
#endif
@@ -0,0 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2014 Sebastian Reichel <sre@kernel.org>
*/
#ifndef _TOUCHSCREEN_H
#define _TOUCHSCREEN_H
struct input_dev;
struct input_mt_pos;
struct touchscreen_properties {
unsigned int max_x;
unsigned int max_y;
bool invert_x;
bool invert_y;
bool swap_x_y;
};
void touchscreen_parse_properties(struct input_dev *input, bool multitouch,
struct touchscreen_properties *prop);
void touchscreen_set_mt_pos(struct input_mt_pos *pos,
const struct touchscreen_properties *prop,
unsigned int x, unsigned int y);
void touchscreen_report_pos(struct input_dev *input,
const struct touchscreen_properties *prop,
unsigned int x, unsigned int y,
bool multitouch);
#endif
@@ -0,0 +1,23 @@
/* linux/i2c/tps6507x-ts.h
*
* Functions to access TPS65070 touch screen chip.
*
* Copyright (c) 2009 RidgeRun (todd.fischer@ridgerun.com)
*
*
* For licencing details see kernel-base/COPYING
*/
#ifndef __LINUX_I2C_TPS6507X_TS_H
#define __LINUX_I2C_TPS6507X_TS_H
/* Board specific touch screen initial values */
struct touchscreen_init_data {
int poll_period; /* ms */
__u16 min_pressure; /* min reading to be treated as a touch */
__u16 vendor;
__u16 product;
__u16 version;
};
#endif /* __LINUX_I2C_TPS6507X_TS_H */
@@ -0,0 +1,27 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _VIVALDI_FMAP_H
#define _VIVALDI_FMAP_H
#include <linux/types.h>
#define VIVALDI_MAX_FUNCTION_ROW_KEYS 24
/**
* struct vivaldi_data - Function row map data for ChromeOS Vivaldi keyboards
* @function_row_physmap: An array of scancodes or their equivalent (HID usage
* codes, encoded rows/columns, etc) for the top
* row function keys, in an order from left to right
* @num_function_row_keys: The number of top row keys in a custom keyboard
*
* This structure is supposed to be used by ChromeOS keyboards using
* the Vivaldi keyboard function row design.
*/
struct vivaldi_data {
u32 function_row_physmap[VIVALDI_MAX_FUNCTION_ROW_KEYS];
unsigned int num_function_row_keys;
};
ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data,
char *buf);
#endif /* _VIVALDI_FMAP_H */