History

Input: gpio_tilt - delete driver

This driver was merged in 2011 as a tool for detecting the orientation of a screen. The device driver assumes board file setup using the platform data from <linux/input/gpio_tilt.h>. But no boards in the kernel tree defines this platform data. As I am faced with refactoring drivers to use GPIO descriptors and pass decriptor tables from boards, or use the device tree device drivers like these creates a serious problem: I cannot fix them and cannot test them, not even compile-test them with a system actually using it (no in-tree boardfile). I suggest to delete this driver and rewrite it using device tree if it is still in use on actively maintained systems. I can also offer to rewrite it out of the blue using device tree if someone promise to test it and help me iterate it.

Linus Walleij committed 8 years ago

Commit 3c8a23c1 parent b3495ce6 files · +0 −407Browse files

Showing the changes to include/linux/input (1 of 6 files). Show all

Unified · Split

include/linux/input/gpio_tilt.h+0−74
@@ -1,74 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _INPUT_GPIO_TILT_H
3#define _INPUT_GPIO_TILT_H
4
5/**
6 * struct gpio_tilt_axis - Axis used by the tilt switch
7 * @axis: Constant describing the axis, e.g. ABS_X
8 * @min: minimum value for abs_param
9 * @max: maximum value for abs_param
10 * @fuzz: fuzz value for abs_param
11 * @flat: flat value for abs_param
12 */
13struct gpio_tilt_axis {
14 int axis;
15 int min;
16 int max;
17 int fuzz;
18 int flat;
19};
20
21/**
22 * struct gpio_tilt_state - state description
23 * @gpios: bitfield of gpio target-states for the value
24 * @axes: array containing the axes settings for the gpio state
25 * The array indizes must correspond to the axes defined
26 * in platform_data
27 *
28 * This structure describes a supported axis settings
29 * and the necessary gpio-state which represent it.
30 *
31 * The n-th bit in the bitfield describes the state of the n-th GPIO
32 * from the gpios-array defined in gpio_regulator_config below.
33 */
34struct gpio_tilt_state {
35 int gpios;
36 int *axes;
37};
38
39/**
40 * struct gpio_tilt_platform_data
41 * @gpios: Array containing the gpios determining the tilt state
42 * @nr_gpios: Number of gpios
43 * @axes: Array of gpio_tilt_axis descriptions
44 * @nr_axes: Number of axes
45 * @states: Array of gpio_tilt_state entries describing
46 * the gpio state for specific tilts
47 * @nr_states: Number of states available
48 * @debounce_interval: debounce ticks interval in msecs
49 * @poll_interval: polling interval in msecs - for polling driver only
50 * @enable: callback to enable the tilt switch
51 * @disable: callback to disable the tilt switch
52 *
53 * This structure contains gpio-tilt-switch configuration
54 * information that must be passed by platform code to the
55 * gpio-tilt input driver.
56 */
57struct gpio_tilt_platform_data {
58 struct gpio *gpios;
59 int nr_gpios;
60
61 struct gpio_tilt_axis *axes;
62 int nr_axes;
63
64 struct gpio_tilt_state *states;
65 int nr_states;
66
67 int debounce_interval;
68
69 unsigned int poll_interval;
70 int (*enable)(struct device *dev);
71 void (*disable)(struct device *dev);
72};
73
74#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t