From patchwork Sat Jan 16 18:16:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 8049541 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0B0B6BEEE5 for ; Sat, 16 Jan 2016 18:16:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E395920306 for ; Sat, 16 Jan 2016 18:16:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F188920304 for ; Sat, 16 Jan 2016 18:16:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbcAPSQj (ORCPT ); Sat, 16 Jan 2016 13:16:39 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:33721 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752076AbcAPSQi (ORCPT ); Sat, 16 Jan 2016 13:16:38 -0500 Received: by mail-pa0-f42.google.com with SMTP id cy9so411353560pac.0 for ; Sat, 16 Jan 2016 10:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=lBoeDlKYZJ/bGIcrfBu+L91IA5TWhXiowKIyBykTs38=; b=r3k9efnW4B+rOpFEeK8MTP4zZWlm9RLkXENofkjxI96jhlnGqrEhv0xj40zWKwXsMN N3rXTwXiZUfTGH8b+FO34PvcEISbUqeTA1oURD1LMJSPWKT5akSZf9Gk9JlxWu0sPoUt IoBemAF72+YQfGjZJpFnKvUeASZHfolLLRRFghRD5IGT1tsjU9MYDhp+YF06J+J9FBpA E2YbGF6q1HqhVcmsv6svBOj8UPdJl/SDR/Qe92100aRE0zBqfg0zZRvOdOI+45BEy2qF WDPluCKAR4a2GZ4eSyr2f0nSadHSVUZa/dXRF6CIzZng5hQ4kU1ZKHLcU4HhOJ5twhEP BbiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=lBoeDlKYZJ/bGIcrfBu+L91IA5TWhXiowKIyBykTs38=; b=NYbLSVp+USzeEQiWe0IYeJj7b+oLZ5xaPi+Ypm1fC94kO7McBjYe/C4yEC+uE4S6m2 Ao7FcZFvKMbAuPUEf9rpBwLc46KoXAs/QDIueT7m0U286LgDhUtujYYcwS24XiBr6KPL SAAHoANh0iPi4LI8RHkecYSLowBJTVAwHyMUTTyGPQWMAdV+fCGx8cYDQzXedKnSfHB+ vb+lczaoXYZ89w9HKy+VSqV0fhdmiF0j//OXZhDZyfFZ2uMin1FUmg9xP1e0KlamnFBK +DkU291CxY0UxDpm0gv3ehM3/+VzFL2rfiXo9kQduC6v7pXaw+lpOfb8vfKVTN5vcJRW jrWw== X-Gm-Message-State: ALoCoQlm0oMB75dmnyNPKKBPO2+IvHWqMHoMSh5IIP7QwnnrSqvCEsZEtb3eSS6YSLkWhw0wubtThJyHR1Gmw2lrohH/mYHUzA== X-Received: by 10.66.237.66 with SMTP id va2mr24283797pac.87.1452968198436; Sat, 16 Jan 2016 10:16:38 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1301:fd2d:4b4b:b2ad:cc39]) by smtp.gmail.com with ESMTPSA id fi16sm23356912pac.12.2016.01.16.10.16.37 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 16 Jan 2016 10:16:37 -0800 (PST) Date: Sat, 16 Jan 2016 10:16:35 -0800 From: Dmitry Torokhov To: Lauri Kasanen Cc: Thomas Hellstrom , linux-input@vger.kernel.org Subject: Re: MOUSE_PS2_VMMOUSE and input/mice Message-ID: <20160116181635.GA9203@dtor-ws> References: <20160115123928.d06e1fed.cand@gmx.com> <5698D343.3000606@vmware.com> <20160115132312.654ad5aa.cand@gmx.com> <56991418.1070701@vmware.com> <20160115175040.GA5664@dtor-ws> <569938E7.3090509@vmware.com> <20160116173945.cb1f14b9.cand@gmx.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160116173945.cb1f14b9.cand@gmx.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, Jan 16, 2016 at 05:39:45PM +0200, Lauri Kasanen wrote: > Hi, > > Here's the /proc/bus/input/devices output. Also attaching the kernel > config in case it'd be useful. > ... > > I: Bus=0011 Vendor=0002 Product=0013 Version=0006 > N: Name="VirtualPS/2 VMware VMMouse" > P: Phys=isa0060/serio1/input1 > S: Sysfs=/devices/platform/i8042/serio1/input/input4 > U: Uniq= > H: Handlers=event2 > B: PROP=0 > B: EV=b > B: KEY=70000 0 0 0 0 0 0 0 0 > So mousedev indeed did not bind to the absolute portion of the device. Please try the patch below. diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c index e272f06..a3f0f5a 100644 --- a/drivers/input/mouse/vmmouse.c +++ b/drivers/input/mouse/vmmouse.c @@ -458,8 +458,6 @@ int vmmouse_init(struct psmouse *psmouse) priv->abs_dev = abs_dev; psmouse->private = priv; - input_set_capability(rel_dev, EV_REL, REL_WHEEL); - /* Set up and register absolute device */ snprintf(priv->phys, sizeof(priv->phys), "%s/input1", psmouse->ps2dev.serio->phys); @@ -475,10 +473,6 @@ int vmmouse_init(struct psmouse *psmouse) abs_dev->id.version = psmouse->model; abs_dev->dev.parent = &psmouse->ps2dev.serio->dev; - error = input_register_device(priv->abs_dev); - if (error) - goto init_fail; - /* Set absolute device capabilities */ input_set_capability(abs_dev, EV_KEY, BTN_LEFT); input_set_capability(abs_dev, EV_KEY, BTN_RIGHT); @@ -488,6 +482,13 @@ int vmmouse_init(struct psmouse *psmouse) input_set_abs_params(abs_dev, ABS_X, 0, VMMOUSE_MAX_X, 0, 0); input_set_abs_params(abs_dev, ABS_Y, 0, VMMOUSE_MAX_Y, 0, 0); + error = input_register_device(priv->abs_dev); + if (error) + goto init_fail; + + /* Add wheel capability to the relative device */ + input_set_capability(rel_dev, EV_REL, REL_WHEEL); + psmouse->protocol_handler = vmmouse_process_byte; psmouse->disconnect = vmmouse_disconnect; psmouse->reconnect = vmmouse_reconnect;