aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-01-04 13:30:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-01-04 13:30:11 -0500
commit6ed1914982e9cd46e37a6a6aa9e1fd1de6a50bf7 (patch)
tree2f4b687e57cc63e764daa732f7f2130ba395645c /drivers/input
parent256601421f04b43913bf144dcc1d11ba88720987 (diff)
parente324ce61ef483dd26d03502d35666ad48a2e1b33 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input update from Dmitry Torokhov: "Updates for the input subsystem. Just a couple of driver fixes this time." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: gpio_keys - defer probing if GPIO probing is deferred Input: gpio_keys_polled - defer probing if GPIO probing is deferred Input: sentelic - only report position of first finger as ST coordinates
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/gpio_keys.c13
-rw-r--r--drivers/input/keyboard/gpio_keys_polled.c13
-rw-r--r--drivers/input/mouse/sentelic.c2
3 files changed, 25 insertions, 3 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index d327f5a2bb0e..b29ca651a395 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -602,6 +602,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
602 602
603 i = 0; 603 i = 0;
604 for_each_child_of_node(node, pp) { 604 for_each_child_of_node(node, pp) {
605 int gpio;
605 enum of_gpio_flags flags; 606 enum of_gpio_flags flags;
606 607
607 if (!of_find_property(pp, "gpios", NULL)) { 608 if (!of_find_property(pp, "gpios", NULL)) {
@@ -610,9 +611,19 @@ gpio_keys_get_devtree_pdata(struct device *dev)
610 continue; 611 continue;
611 } 612 }
612 613
614 gpio = of_get_gpio_flags(pp, 0, &flags);
615 if (gpio < 0) {
616 error = gpio;
617 if (error != -EPROBE_DEFER)
618 dev_err(dev,
619 "Failed to get gpio flags, error: %d\n",
620 error);
621 goto err_free_pdata;
622 }
623
613 button = &pdata->buttons[i++]; 624 button = &pdata->buttons[i++];
614 625
615 button->gpio = of_get_gpio_flags(pp, 0, &flags); 626 button->gpio = gpio;
616 button->active_low = flags & OF_GPIO_ACTIVE_LOW; 627 button->active_low = flags & OF_GPIO_ACTIVE_LOW;
617 628
618 if (of_property_read_u32(pp, "linux,code", &button->code)) { 629 if (of_property_read_u32(pp, "linux,code", &button->code)) {
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index f686fd970553..21147164874d 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -135,6 +135,7 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
135 135
136 i = 0; 136 i = 0;
137 for_each_child_of_node(node, pp) { 137 for_each_child_of_node(node, pp) {
138 int gpio;
138 enum of_gpio_flags flags; 139 enum of_gpio_flags flags;
139 140
140 if (!of_find_property(pp, "gpios", NULL)) { 141 if (!of_find_property(pp, "gpios", NULL)) {
@@ -143,9 +144,19 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
143 continue; 144 continue;
144 } 145 }
145 146
147 gpio = of_get_gpio_flags(pp, 0, &flags);
148 if (gpio < 0) {
149 error = gpio;
150 if (error != -EPROBE_DEFER)
151 dev_err(dev,
152 "Failed to get gpio flags, error: %d\n",
153 error);
154 goto err_free_pdata;
155 }
156
146 button = &pdata->buttons[i++]; 157 button = &pdata->buttons[i++];
147 158
148 button->gpio = of_get_gpio_flags(pp, 0, &flags); 159 button->gpio = gpio;
149 button->active_low = flags & OF_GPIO_ACTIVE_LOW; 160 button->active_low = flags & OF_GPIO_ACTIVE_LOW;
150 161
151 if (of_property_read_u32(pp, "linux,code", &button->code)) { 162 if (of_property_read_u32(pp, "linux,code", &button->code)) {
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c
index e582922bacf7..cc7e0d4a8f93 100644
--- a/drivers/input/mouse/sentelic.c
+++ b/drivers/input/mouse/sentelic.c
@@ -791,7 +791,7 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)
791 fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y); 791 fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y);
792 fsp_set_slot(dev, 1, false, 0, 0); 792 fsp_set_slot(dev, 1, false, 0, 0);
793 } 793 }
794 if (fgrs > 0) { 794 if (fgrs == 1 || (fgrs == 2 && !(packet[0] & FSP_PB0_MFMC_FGR2))) {
795 input_report_abs(dev, ABS_X, abs_x); 795 input_report_abs(dev, ABS_X, abs_x);
796 input_report_abs(dev, ABS_Y, abs_y); 796 input_report_abs(dev, ABS_Y, abs_y);
797 } 797 }