Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347040
b: refs/heads/master
c: 673ab87
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Dec 18, 2012
1 parent 03eec42 commit 68eb24d
Show file tree
Hide file tree
Showing 194 changed files with 3,198 additions and 1,816 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3cf23841b4b76eb94d3f8d0fb3627690e4431413
refs/heads/master: 673ab8783b596cda5b616b317b1a1b47480c66fd
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
* GPIO driven matrix keypad device tree bindings

GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.
The matrix keypad supports multiple row and column lines, a key can be
placed at each intersection of a unique row and a unique column. The matrix
keypad can sense a key-press and key-release by means of GPIO lines and
report the event using GPIO interrupts to the cpu.

Required Properties:
- compatible: Should be "gpio-matrix-keypad"
- row-gpios: List of gpios used as row lines. The gpio specifier
for this property depends on the gpio controller to
which these row lines are connected.
- col-gpios: List of gpios used as column lines. The gpio specifier
for this property depends on the gpio controller to
which these column lines are connected.
- linux,keymap: The definition can be found at
bindings/input/matrix-keymap.txt

Optional Properties:
- linux,no-autorepeat: do no enable autorepeat feature.
- linux,wakeup: use any event on keypad as wakeup event.
- debounce-delay-ms: debounce interval in milliseconds
- col-scan-delay-us: delay, measured in microseconds, that is needed
before we can scan keypad after activating column gpio

Example:
matrix-keypad {
compatible = "gpio-matrix-keypad";
debounce-delay-ms = <5>;
col-scan-delay-us = <2>;

row-gpios = <&gpio2 25 0
&gpio2 26 0
&gpio2 27 0>;

col-gpios = <&gpio2 21 0
&gpio2 22 0>;

linux,keymap = <0x0000008B
0x0100009E
0x02000069
0x0001006A
0x0101001C
0x0201006C>;
};
7 changes: 7 additions & 0 deletions trunk/Documentation/devicetree/bindings/input/pwm-beeper.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* PWM beeper device tree bindings

Registers a PWM device as beeper.

Required properties:
- compatible: should be "pwm-beeper"
- pwms: phandle to the physical PWM device
39 changes: 39 additions & 0 deletions trunk/Documentation/devicetree/bindings/input/stmpe-keypad.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
* STMPE Keypad

Required properties:
- compatible : "st,stmpe-keypad"
- linux,keymap : See ./matrix-keymap.txt

Optional properties:
- debounce-interval : Debouncing interval time in milliseconds
- st,scan-count : Scanning cycles elapsed before key data is updated
- st,no-autorepeat : If specified device will not autorepeat

Example:

stmpe_keypad {
compatible = "st,stmpe-keypad";

debounce-interval = <64>;
st,scan-count = <8>;
st,no-autorepeat;

linux,keymap = <0x205006b
0x4010074
0x3050072
0x1030004
0x502006a
0x500000a
0x5008b
0x706001c
0x405000b
0x6070003
0x3040067
0x303006c
0x60400e7
0x602009e
0x4020073
0x5050002
0x4030069
0x3020008>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Required properties:
- compatible: "ti,tca8418"
- reg: the I2C address
- interrupts: IRQ line number, should trigger on falling edge
- keypad,num-rows: The number of rows
- keypad,num-columns: The number of columns
- linux,keymap: Keys definitions, see keypad-matrix.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
* MELFAS MMS114 touchscreen controller

Required properties:
- compatible: must be "melfas,mms114"
- reg: I2C address of the chip
- interrupts: interrupt to which the chip is connected
- x-size: horizontal resolution of touchscreen
- y-size: vertical resolution of touchscreen

Optional properties:
- contact-threshold:
- moving-threshold:
- x-invert: invert X axis
- y-invert: invert Y axis

Example:

i2c@00000000 {
/* ... */

touchscreen@48 {
compatible = "melfas,mms114";
reg = <0x48>;
interrupts = <39 0>;
x-size = <720>;
y-size = <1280>;
contact-threshold = <10>;
moving-threshold = <10>;
x-invert;
y-invert;
};

/* ... */
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
STMPE Touchscreen
----------------

Required properties:
- compatible: "st,stmpe-ts"

Optional properties:
- st,sample-time: ADC converstion time in number of clock. (0 -> 36 clocks, 1 ->
44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 4 -> 80 clocks, 5 -> 96 clocks, 6
-> 144 clocks), recommended is 4.
- st,mod-12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC)
- st,ref-sel: ADC reference source (0 -> internal reference, 1 -> external
reference)
- st,adc-freq: ADC Clock speed (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz)
- st,ave-ctrl: Sample average control (0 -> 1 sample, 1 -> 2 samples, 2 -> 4
samples, 3 -> 8 samples)
- st,touch-det-delay: Touch detect interrupt delay (0 -> 10 us, 1 -> 50 us, 2 ->
100 us, 3 -> 500 us, 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms) recommended
is 3
- st,settling: Panel driver settling time (0 -> 10 us, 1 -> 100 us, 2 -> 500 us, 3
-> 1 ms, 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms) recommended is 2
- st,fraction-z: Length of the fractional part in z (fraction-z ([0..7]) = Count of
the fractional part) recommended is 7
- st,i-drive: current limit value of the touchscreen drivers (0 -> 20 mA typical 35
mA max, 1 -> 50 mA typical 80 mA max)

Node name must be stmpe_touchscreen and should be child node of stmpe node to
which it belongs.

Example:

stmpe_touchscreen {
compatible = "st,stmpe-ts";
st,sample-time = <4>;
st,mod-12b = <1>;
st,ref-sel = <0>;
st,adc-freq = <1>;
st,ave-ctrl = <1>;
st,touch-det-delay = <2>;
st,settling = <2>;
st,fraction-z = <7>;
st,i-drive = <1>;
};
14 changes: 1 addition & 13 deletions trunk/arch/arm/mach-omap1/board-nokia770.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,6 @@ static void __init mipid_dev_init(void)
omapfb_set_lcd_config(&nokia770_lcd_config);
}

static void __init ads7846_dev_init(void)
{
if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0)
printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
}

static int ads7846_get_pendown_state(void)
{
return !gpio_get_value(ADS7846_PENDOWN_GPIO);
}

static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = {
.x_max = 0x0fff,
.y_max = 0x0fff,
Expand All @@ -131,7 +120,7 @@ static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata =
.debounce_max = 10,
.debounce_tol = 3,
.debounce_rep = 1,
.get_pendown_state = ads7846_get_pendown_state,
.gpio_pendown = ADS7846_PENDOWN_GPIO,
};

static struct spi_board_info nokia770_spi_board_info[] __initdata = {
Expand Down Expand Up @@ -241,7 +230,6 @@ static void __init omap_nokia770_init(void)
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
hwa742_dev_init();
ads7846_dev_init();
mipid_dev_init();
omap1_usb_init(&nokia770_usb_config);
nokia770_mmc_init();
Expand Down
71 changes: 1 addition & 70 deletions trunk/arch/arm/mach-ux500/board-mop500-stuib.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ static struct i2c_board_info __initdata mop500_i2c0_devices_stuib[] = {
* BU21013 ROHM touchscreen interface on the STUIBs
*/

/* tracks number of bu21013 devices being enabled */
static int bu21013_devices;

#define TOUCH_GPIO_PIN 84

#define TOUCH_XMAX 384
Expand All @@ -88,73 +85,8 @@ static int bu21013_devices;
#define PRCMU_CLOCK_OCR 0x1CC
#define TSC_EXT_CLOCK_9_6MHZ 0x840000

/**
* bu21013_gpio_board_init : configures the touch panel.
* @reset_pin: reset pin number
* This function can be used to configures
* the voltage and reset the touch panel controller.
*/
static int bu21013_gpio_board_init(int reset_pin)
{
int retval = 0;

bu21013_devices++;
if (bu21013_devices == 1) {
retval = gpio_request(reset_pin, "touchp_reset");
if (retval) {
printk(KERN_ERR "Unable to request gpio reset_pin");
return retval;
}
retval = gpio_direction_output(reset_pin, 1);
if (retval < 0) {
printk(KERN_ERR "%s: gpio direction failed\n",
__func__);
return retval;
}
}

return retval;
}

/**
* bu21013_gpio_board_exit : deconfigures the touch panel controller
* @reset_pin: reset pin number
* This function can be used to deconfigures the chip selection
* for touch panel controller.
*/
static int bu21013_gpio_board_exit(int reset_pin)
{
int retval = 0;

if (bu21013_devices == 1) {
retval = gpio_direction_output(reset_pin, 0);
if (retval < 0) {
printk(KERN_ERR "%s: gpio direction failed\n",
__func__);
return retval;
}
gpio_set_value(reset_pin, 0);
}
bu21013_devices--;

return retval;
}

/**
* bu21013_read_pin_val : get the interrupt pin value
* This function can be used to get the interrupt pin value for touch panel
* controller.
*/
static int bu21013_read_pin_val(void)
{
return gpio_get_value(TOUCH_GPIO_PIN);
}

static struct bu21013_platform_device tsc_plat_device = {
.cs_en = bu21013_gpio_board_init,
.cs_dis = bu21013_gpio_board_exit,
.irq_read_val = bu21013_read_pin_val,
.irq = NOMADIK_GPIO_TO_IRQ(TOUCH_GPIO_PIN),
.touch_pin = TOUCH_GPIO_PIN,
.touch_x_max = TOUCH_XMAX,
.touch_y_max = TOUCH_YMAX,
.ext_clk = false,
Expand All @@ -171,7 +103,6 @@ static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = {
I2C_BOARD_INFO("bu21013_tp", 0x5D),
.platform_data = &tsc_plat_device,
},

};

void __init mop500_stuib_init(void)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/tile/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,6 @@ do { \

#endif /* CONFIG_COMPAT */

#define CORE_DUMP_USE_REGSET

#endif /* _ASM_TILE_ELF_H */
3 changes: 1 addition & 2 deletions trunk/arch/tile/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ typedef unsigned long pt_reg_t;
#include <uapi/asm/ptrace.h>

#define PTRACE_O_MASK_TILE (PTRACE_O_TRACEMIGRATE)
#define PT_TRACE_MIGRATE 0x00080000
#define PT_TRACE_MASK_TILE (PT_TRACE_MIGRATE)
#define PT_TRACE_MIGRATE PT_EVENT_FLAG(PTRACE_EVENT_MIGRATE)

/* Flag bits in pt_regs.flags */
#define PT_FLAGS_DISABLE_IRQ 1 /* on return to kernel, disable irqs */
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/tile/include/uapi/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ struct pt_regs {
#define PTRACE_SETFPREGS 15

/* Support TILE-specific ptrace options, with events starting at 16. */
#define PTRACE_O_TRACEMIGRATE 0x00010000
#define PTRACE_EVENT_MIGRATE 16
#define PTRACE_O_TRACEMIGRATE (1 << PTRACE_EVENT_MIGRATE)

/*
* Flag bits in pt_regs.flags that are part of the ptrace API.
* We start our numbering higher up to avoid confusion with the
* non-ABI kernel-internal values that use the low 16 bits.
*/
#define PT_FLAGS_COMPAT 0x10000 /* process is an -m32 compat process */

#endif /* _UAPI_ASM_TILE_PTRACE_H */
4 changes: 2 additions & 2 deletions trunk/arch/tile/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static void __devinit fixup_read_and_payload_sizes(void)
u16 new_values;

/* Scan for the smallest maximum payload size. */
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
for_each_pci_dev(dev) {
u32 devcap;
int max_payload;

Expand All @@ -260,7 +260,7 @@ static void __devinit fixup_read_and_payload_sizes(void)

/* Now, set the max_payload_size for all devices to that value. */
new_values = (max_read_size << 12) | (smallest_max_payload << 5);
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
for_each_pci_dev(dev)
pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL,
PCI_EXP_DEVCTL_PAYLOAD | PCI_EXP_DEVCTL_READRQ,
new_values);
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/tile/kernel/pci_gx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
}

/* Called for each device after PCI setup is done. */
static void __init
pcibios_fixup_final(struct pci_dev *pdev)
static void pcibios_fixup_final(struct pci_dev *pdev)
{
set_dma_ops(&pdev->dev, gx_pci_dma_map_ops);
set_dma_offset(&pdev->dev, TILE_PCI_MEM_MAP_BASE_OFFSET);
Expand Down
Loading

0 comments on commit 68eb24d

Please sign in to comment.