Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
5e7fe820
Commit
5e7fe820
authored
Nov 24, 2012
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-linus' into next
Bring in changes to ads7846 to avoid mereg conflicts.
parents
037db524
0a0d6285
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
19 deletions
+34
-19
arch/arm/mach-omap2/common-board-devices.c
arch/arm/mach-omap2/common-board-devices.c
+20
-14
drivers/input/input-mt.c
drivers/input/input-mt.c
+4
-0
drivers/input/mousedev.c
drivers/input/mousedev.c
+2
-2
drivers/input/touchscreen/ads7846.c
drivers/input/touchscreen/ads7846.c
+5
-1
include/linux/spi/ads7846.h
include/linux/spi/ads7846.h
+3
-2
No files found.
arch/arm/mach-omap2/common-board-devices.c
View file @
5e7fe820
...
@@ -64,6 +64,13 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
...
@@ -64,6 +64,13 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct
spi_board_info
*
spi_bi
=
&
ads7846_spi_board_info
;
struct
spi_board_info
*
spi_bi
=
&
ads7846_spi_board_info
;
int
err
;
int
err
;
/*
* If a board defines get_pendown_state() function, request the pendown
* GPIO and set the GPIO debounce time.
* If a board does not define the get_pendown_state() function, then
* the ads7846 driver will setup the pendown GPIO itself.
*/
if
(
board_pdata
&&
board_pdata
->
get_pendown_state
)
{
err
=
gpio_request_one
(
gpio_pendown
,
GPIOF_IN
,
"TSPenDown"
);
err
=
gpio_request_one
(
gpio_pendown
,
GPIOF_IN
,
"TSPenDown"
);
if
(
err
)
{
if
(
err
)
{
pr_err
(
"Couldn't obtain gpio for TSPenDown: %d
\n
"
,
err
);
pr_err
(
"Couldn't obtain gpio for TSPenDown: %d
\n
"
,
err
);
...
@@ -73,21 +80,20 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
...
@@ -73,21 +80,20 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
if
(
gpio_debounce
)
if
(
gpio_debounce
)
gpio_set_debounce
(
gpio_pendown
,
gpio_debounce
);
gpio_set_debounce
(
gpio_pendown
,
gpio_debounce
);
gpio_export
(
gpio_pendown
,
0
);
}
spi_bi
->
bus_num
=
bus_num
;
spi_bi
->
bus_num
=
bus_num
;
spi_bi
->
irq
=
gpio_to_irq
(
gpio_pendown
);
spi_bi
->
irq
=
gpio_to_irq
(
gpio_pendown
);
ads7846_config
.
gpio_pendown
=
gpio_pendown
;
if
(
board_pdata
)
{
if
(
board_pdata
)
{
board_pdata
->
gpio_pendown
=
gpio_pendown
;
board_pdata
->
gpio_pendown
=
gpio_pendown
;
board_pdata
->
gpio_pendown_debounce
=
gpio_debounce
;
spi_bi
->
platform_data
=
board_pdata
;
spi_bi
->
platform_data
=
board_pdata
;
if
(
board_pdata
->
get_pendown_state
)
gpio_export
(
gpio_pendown
,
0
);
}
else
{
ads7846_config
.
gpio_pendown
=
gpio_pendown
;
}
}
if
(
!
board_pdata
||
(
board_pdata
&&
!
board_pdata
->
get_pendown_state
))
gpio_free
(
gpio_pendown
);
spi_register_board_info
(
&
ads7846_spi_board_info
,
1
);
spi_register_board_info
(
&
ads7846_spi_board_info
,
1
);
}
}
#else
#else
...
...
drivers/input/input-mt.c
View file @
5e7fe820
...
@@ -26,10 +26,14 @@ static void copy_abs(struct input_dev *dev, unsigned int dst, unsigned int src)
...
@@ -26,10 +26,14 @@ static void copy_abs(struct input_dev *dev, unsigned int dst, unsigned int src)
* input_mt_init_slots() - initialize MT input slots
* input_mt_init_slots() - initialize MT input slots
* @dev: input device supporting MT events and finger tracking
* @dev: input device supporting MT events and finger tracking
* @num_slots: number of slots used by the device
* @num_slots: number of slots used by the device
* @flags: mt tasks to handle in core
*
*
* This function allocates all necessary memory for MT slot handling
* This function allocates all necessary memory for MT slot handling
* in the input device, prepares the ABS_MT_SLOT and
* in the input device, prepares the ABS_MT_SLOT and
* ABS_MT_TRACKING_ID events for use and sets up appropriate buffers.
* ABS_MT_TRACKING_ID events for use and sets up appropriate buffers.
* Depending on the flags set, it also performs pointer emulation and
* frame synchronization.
*
* May be called repeatedly. Returns -EINVAL if attempting to
* May be called repeatedly. Returns -EINVAL if attempting to
* reinitialize with a different number of slots.
* reinitialize with a different number of slots.
*/
*/
...
...
drivers/input/mousedev.c
View file @
5e7fe820
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define MOUSEDEV_MINOR_BASE 32
#define MOUSEDEV_MINOR_BASE 32
#define MOUSEDEV_MINORS 3
2
#define MOUSEDEV_MINORS 3
1
#define MOUSEDEV_MIX
31
#define MOUSEDEV_MIX
63
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/slab.h>
...
...
drivers/input/touchscreen/ads7846.c
View file @
5e7fe820
...
@@ -955,7 +955,8 @@ static int ads7846_resume(struct device *dev)
...
@@ -955,7 +955,8 @@ static int ads7846_resume(struct device *dev)
static
SIMPLE_DEV_PM_OPS
(
ads7846_pm
,
ads7846_suspend
,
ads7846_resume
);
static
SIMPLE_DEV_PM_OPS
(
ads7846_pm
,
ads7846_suspend
,
ads7846_resume
);
static
int
__devinit
ads7846_setup_pendown
(
struct
spi_device
*
spi
,
struct
ads7846
*
ts
)
static
int
__devinit
ads7846_setup_pendown
(
struct
spi_device
*
spi
,
struct
ads7846
*
ts
)
{
{
struct
ads7846_platform_data
*
pdata
=
spi
->
dev
.
platform_data
;
struct
ads7846_platform_data
*
pdata
=
spi
->
dev
.
platform_data
;
int
err
;
int
err
;
...
@@ -981,6 +982,9 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784
...
@@ -981,6 +982,9 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784
ts
->
gpio_pendown
=
pdata
->
gpio_pendown
;
ts
->
gpio_pendown
=
pdata
->
gpio_pendown
;
if
(
pdata
->
gpio_pendown_debounce
)
gpio_set_debounce
(
pdata
->
gpio_pendown
,
pdata
->
gpio_pendown_debounce
);
}
else
{
}
else
{
dev_err
(
&
spi
->
dev
,
"no get_pendown_state nor gpio_pendown?
\n
"
);
dev_err
(
&
spi
->
dev
,
"no get_pendown_state nor gpio_pendown?
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
...
...
include/linux/spi/ads7846.h
View file @
5e7fe820
...
@@ -46,8 +46,9 @@ struct ads7846_platform_data {
...
@@ -46,8 +46,9 @@ struct ads7846_platform_data {
u16
debounce_rep
;
/* additional consecutive good readings
u16
debounce_rep
;
/* additional consecutive good readings
* required after the first two */
* required after the first two */
int
gpio_pendown
;
/* the GPIO used to decide the pendown
int
gpio_pendown
;
/* the GPIO used to decide the pendown
* state if get_pendown_state == NULL
* state if get_pendown_state == NULL */
*/
int
gpio_pendown_debounce
;
/* platform specific debounce time for
* the gpio_pendown */
int
(
*
get_pendown_state
)(
void
);
int
(
*
get_pendown_state
)(
void
);
int
(
*
filter_init
)
(
const
struct
ads7846_platform_data
*
pdata
,
int
(
*
filter_init
)
(
const
struct
ads7846_platform_data
*
pdata
,
void
**
filter_data
);
void
**
filter_data
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment