From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228AbcEWNEY (ORCPT ); Mon, 23 May 2016 09:04:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:41234 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753594AbcEWNEW (ORCPT ); Mon, 23 May 2016 09:04:22 -0400 Message-ID: <1464008447.12181.58.camel@suse.com> Subject: Re: [PATCH v3] input: tablet: add Pegasus Notetaker tablet driver From: Oliver Neukum To: Martin Kepplinger Cc: dmitry.torokhov@gmail.com, kernel-testers@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Date: Mon, 23 May 2016 15:00:47 +0200 In-Reply-To: <5742FB0F.5070508@posteo.de> References: <1464003592-24043-1-git-send-email-martink@posteo.de> <1464006414.12181.53.camel@suse.com> <5742FB0F.5070508@posteo.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-05-23 at 14:43 +0200, Martin Kepplinger wrote: > Am 2016-05-23 um 14:26 schrieb Oliver Neukum: > > On Mon, 2016-05-23 at 13:39 +0200, Martin Kepplinger wrote: > > > >> It's *really* fun to use as an input tablet though! So let's support this > >> for everybody. > > > > Hi, > > > > I am afraid there are a few issues. > > Thanks for having a look, comments below. > > > > > 1. Why the kernel thread? > > I provide switching to the xy tablet mode by pressing a button during > runtime. So usb_control_msg() is called from the thread, not the > interrupt routine. > > We don't get in the way of any user app. If we leave that functionality > out, users may have to un- and replug in the device after using > userspace apps that transfer data or the like. The functionality is OK, but the implementation, though creative, is buggy. a - multiple devices will fail b - you have a race condition that will fail to wake the thread if it is still running when the button is pressed again Kernel threads are wasteful. Using the normal system work queue might be much easier > > 2. This driver has questionable power management. > > I think I do it how others do it. Suspend/resume works. Anything > specific required here? Runtime PM is missing. Regards Oliver