Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1677938pxb; Thu, 4 Nov 2021 06:40:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycqDHJbdWt53x20Xwf8eNQsoaecGPPOyP9pBKHSeflW6WT+I026XgKEOAGP5JPukM7V5vn X-Received: by 2002:a05:6402:4246:: with SMTP id g6mr33281264edb.112.1636033201196; Thu, 04 Nov 2021 06:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636033201; cv=none; d=google.com; s=arc-20160816; b=DHrMAdNGVL4+uCjiPJn0eUzR1/IDKT6xOYmjiIEw5sgmZgYfWCu+MTvtlbc4uccoB/ ACdXm3yOMZEkyPbrDEHLTvscXiijzh0nGcaxORcm7C9z5gMoFxIVukmka57HKX74MDhO oA/ijxHkLKozRpOzdeOMb414z/bCiWEL+kMhHrfSYUT90VVj6xu7odt7UHi/FU1ydI9E ffls5EcxGpEQGeNDiLkQIHqRL9fIRaaBL6gcmmyumjJZZxx2ZheRg3ZqqMnzFT8NbUVr wKEv0ogHenEJTYmIuqM7thFWp9Uz1DOK1s+B0PrLhdoqWKkfndavRoJq7PSr60Ab3Jzi Hzzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=VI25ygX/XCRW4ZEjh253lp0tPAcjLL0+NMztMcf6J3A=; b=Q4kHRA4po31a9GqfwY+VpDbQkHO0NY1UyRVMrcOdr63ZsnDWyuDDFY9OQBzEIB2AwG KJs5QqATJMMkuk9VUKNGy31oHhSbzphM5Wg4vq32WzQ+oVOsQ2BkwYZae9NOh2RQfSrM HfJddpPQirgEWoQ73qHFJMCTouXfqDvk933/HnE5jB1GESqSny6/bNS6mbFaJ8zagEip nQf37wdyFh07LPtMgdHbJHItJbCCZsWwlIPo9LjcfY2BDERL13Kya72sJw8kqfDkhrgi LugMLTbnjBinyFdQDcBd+neN3Gis92Q9RqLlHHTzRwixIPN4eWQJpw/bn+XzOCYHTicY wTaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si7797751edu.189.2021.11.04.06.39.37; Thu, 04 Nov 2021 06:40:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231447AbhKDNkA (ORCPT + 99 others); Thu, 4 Nov 2021 09:40:00 -0400 Received: from mga12.intel.com ([192.55.52.136]:50270 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231137AbhKDNj6 (ORCPT ); Thu, 4 Nov 2021 09:39:58 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="211755170" X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="211755170" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 06:37:13 -0700 X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="501542000" Received: from eyulyugi-mobl1.ger.corp.intel.com (HELO tkristo-desk.intel.com) ([10.251.215.15]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 06:37:11 -0700 From: Tero Kristo To: jikos@kernel.org, benjamin.tissoires@redhat.com, mika.westerberg@linux.intel.com, tero.kristo@linux.intel.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC 0/8] HID: add support for USI style pens Date: Thu, 4 Nov 2021 15:36:53 +0200 Message-Id: <20211104133701.1733551-1-tero.kristo@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series is an RFC for USI (Universal Stylus Interface) style pen support. This is based on documentation from USB org describing the HID usage tables for digitizers (page 0x0D) and experimentation with actual USI capable controllers. This series introduces the USI support with a new HID driver, which applies the controller specific quirks. The most problematic part of the USI support is handling of the pen parameters (color, line width, line style), which are not immediately available from the controller from pen down event, but must be cached and queried separately from the controller. In addition to that, when a get-feature report is sent to the controller, there is a delay before the proper value is reported out; it is not part of the feature report coming back immediately. Most of the code in the driver is to handle this (otherwise we could just use hid-generic.) This also boils down to the reason why this series is an RFC, I would like to receive some feedback which option to pick for programming of the new values for the programmable pen parameters; whether to parse the input events so userspace can directly write the new values to the input event file handle, or whether to use IOCTL. Patches #7 / #8 are sort of optional choices towards this, but are there to show that both approaches can be done. Direct write to evdev causes some confusion on the driver level though, thus patch #7 is there to avoid some of that introducing new input events for writing the parameters. IOCTL might be the cleanest approach and I am slightly leaning towards that myself (see patch #8, this would need to be squashed and cleaned up a bit though but would effectively get rid of some code from patch #6 and completely rid patch #7.) The driver has been tested with chromebooks that contain either Goodix or Elan manufactured USI capable touchscreen controllers in them. Any feedback appreciated! -Tero