Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH] Series-to: LKML <linux-kernel@vger.kernel.org>
From: Benjamin Tissoires @ 2023-04-03 16:47 UTC (permalink / raw)
  To: Torsha Banerjee
  Cc: u-boot, Jing, Sean, Jora Jacobi, Harry Cutts, Torsha Banerjee,
	Jiri Kosina, linux-input, linux-kernel
In-Reply-To: <20230331224536.1685149-1-torsha@google.com>

Hi Torsha,

Well, your commit title is just wrong, it should not start by
"Series-to: LKML ", which seems very much like a badly configured client
;)

On Mar 31 2023, Torsha Banerjee wrote:
> From: Jora Jacobi <jora@google.com>

This is much better than v1: we got the from and a matching S-o-B :)

So thanks for that.

> 
> Restore missing cursor for digitizer devices
> 
> A previously committed patch to remove cursors for HID Digitizer-Pen
> devices also removed the cursors for some tablets which have incorrect HID
> descriptors. These devices should enumerate with Usage ID "Digitizer"
> instead of Usage ID "Pen".
> 
> Patch which introduced the issue: commit 8473a93d1ba5
> ("HID: input: Set INPUT_PROP_-property for HID_UP_DIGITIZERS")
> 
> Changes-
> Add HID quirk HID_QUIRK_DEVICE_IS_DIGITIZER
> Quirk will force INPUT_PROP_POINTER for HID Digitizers
> Apply quirk to Huion tablets
> Apply quirk to UGEE/XP-Pen tablets based on device ID
> 
> Tested with Huion H640P and H430P. Connected the digitizer to the
> Chromebook and confirmed with a drawing program that the cursor appears and
> moves when the digitizer's stylus is hovering over the surface of the
> digitizer.

Would you mind re-testing the issue against the branch for-6.4/core of
hid.git[0]

IIRC UCLogic tablets where having an issue after Commit f7d8e387d9ae
("HID: uclogic: Switch to Digitizer usage for styluses") and it was
manually fixed in 3405a4beaaa8 ("HID: uclogic: Add HID_QUIRK_HIDINPUT_FORCE
quirk")

One proposed solution was to use a0f5276716c8 ("HID: Recognize "Digitizer"
as a valid input application"), and given that it was slightly broader,
I was initially reluctant to take it.

Given that Huion tablets tend to use hid-uclogic, I hope that it's
already fixed, and we don't even need to do more work to have your problem
resolved.

Cheers,
Benjamin


[0] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.4/core

> 
> Signed-off-by: Jora Jacobi <jora@google.com>
> Reviewed-by: Harry Cutts <hcutts@chromium.org>
> Signed-off-by: Torsha Banerjee <torsha@google.com>
> ---
> 
>  drivers/hid/hid-input.c  | 3 ++-
>  drivers/hid/hid-quirks.c | 9 +++++++++
>  include/linux/hid.h      | 1 +
>  3 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 7fc967964dd8..f0c67baddc8d 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -927,7 +927,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
>  		break;
>  
>  	case HID_UP_DIGITIZER:
> -		if ((field->application & 0xff) == 0x01) /* Digitizer */
> +		if (((field->application & 0xff) == 0x01) ||
> +			(device->quirks & HID_QUIRK_DEVICE_IS_DIGITIZER)) /* Digitizer */
>  			__set_bit(INPUT_PROP_POINTER, input->propbit);
>  		else if ((field->application & 0xff) == 0x02) /* Pen */
>  			__set_bit(INPUT_PROP_DIRECT, input->propbit);
> diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
> index 66e64350f138..094fe4c4f3b3 100644
> --- a/drivers/hid/hid-quirks.c
> +++ b/drivers/hid/hid-quirks.c
> @@ -102,6 +102,8 @@ static const struct hid_device_id hid_quirks[] = {
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0941), HID_QUIRK_ALWAYS_POLL },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641), HID_QUIRK_ALWAYS_POLL },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_1f4a), HID_QUIRK_ALWAYS_POLL },
> +	{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_HS64), HID_QUIRK_DEVICE_IS_DIGITIZER },
> +	{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET), HID_QUIRK_DEVICE_IS_DIGITIZER },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6680), HID_QUIRK_MULTI_INPUT },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI), HID_QUIRK_MULTI_INPUT },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X), HID_QUIRK_MULTI_INPUT },
> @@ -1298,6 +1300,13 @@ unsigned long hid_lookup_quirk(const struct hid_device *hdev)
>  		quirks = hid_gets_squirk(hdev);
>  	mutex_unlock(&dquirks_lock);
>  
> +	/*
> +	 * UGEE/XP-Pen HID Pen devices which have 0x0-0x9 as the low nibble
> +	 * of the device ID are actually digitizers, not HID Pen devices
> +	 */
> +	if (hdev->vendor == USB_VENDOR_ID_UGEE && (hdev->product & 0x0F) <= 0x09)
> +		quirks |= HID_QUIRK_DEVICE_IS_DIGITIZER;
> +
>  	return quirks;
>  }
>  EXPORT_SYMBOL_GPL(hid_lookup_quirk);
> diff --git a/include/linux/hid.h b/include/linux/hid.h
> index 1ea8c7a3570b..1653359002b3 100644
> --- a/include/linux/hid.h
> +++ b/include/linux/hid.h
> @@ -354,6 +354,7 @@ struct hid_item {
>  #define HID_QUIRK_INPUT_PER_APP			BIT(11)
>  #define HID_QUIRK_X_INVERT			BIT(12)
>  #define HID_QUIRK_Y_INVERT			BIT(13)
> +#define HID_QUIRK_DEVICE_IS_DIGITIZER           BIT(14)
>  #define HID_QUIRK_SKIP_OUTPUT_REPORTS		BIT(16)
>  #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID		BIT(17)
>  #define HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP	BIT(18)
> -- 
> 2.40.0.348.gf938b09366-goog
> 


^ permalink raw reply

* [dtor-input:next] BUILD SUCCESS 0df28e7166e803028c380c59dda530ffada0503c
From: kernel test robot @ 2023-04-03 16:48 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input

tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
branch HEAD: 0df28e7166e803028c380c59dda530ffada0503c  Input: edt-ft5x06 - calculate points data length only once

elapsed time: 722m

configs tested: 187
configs skipped: 12

The following configs have been built successfully.
More configs may be tested in the coming days.

tested configs:
alpha                            allyesconfig   gcc  
alpha        buildonly-randconfig-r002-20230402   gcc  
alpha        buildonly-randconfig-r005-20230402   gcc  
alpha                               defconfig   gcc  
alpha                randconfig-r002-20230403   gcc  
alpha                randconfig-r003-20230402   gcc  
alpha                randconfig-r012-20230402   gcc  
alpha                randconfig-r025-20230402   gcc  
alpha                randconfig-r025-20230403   gcc  
alpha                randconfig-r032-20230402   gcc  
alpha                randconfig-r032-20230403   gcc  
arc                              allyesconfig   gcc  
arc          buildonly-randconfig-r001-20230402   gcc  
arc          buildonly-randconfig-r006-20230402   gcc  
arc                                 defconfig   gcc  
arc                  randconfig-r004-20230403   gcc  
arc                  randconfig-r011-20230402   gcc  
arc                  randconfig-r015-20230403   gcc  
arc                  randconfig-r016-20230403   gcc  
arc                  randconfig-r033-20230402   gcc  
arc                  randconfig-r043-20230402   gcc  
arc                  randconfig-r043-20230403   gcc  
arm                              allmodconfig   gcc  
arm                              allyesconfig   gcc  
arm          buildonly-randconfig-r003-20230403   clang
arm                                 defconfig   gcc  
arm                  randconfig-r002-20230402   clang
arm                  randconfig-r005-20230403   gcc  
arm                  randconfig-r011-20230403   clang
arm                  randconfig-r033-20230403   gcc  
arm                  randconfig-r036-20230403   gcc  
arm                  randconfig-r046-20230402   gcc  
arm                  randconfig-r046-20230403   clang
arm64                            allyesconfig   gcc  
arm64        buildonly-randconfig-r002-20230403   clang
arm64        buildonly-randconfig-r004-20230402   gcc  
arm64                               defconfig   gcc  
arm64                randconfig-r013-20230402   clang
arm64                randconfig-r014-20230403   gcc  
arm64                randconfig-r021-20230403   gcc  
arm64                randconfig-r022-20230403   gcc  
arm64                randconfig-r023-20230402   clang
arm64                randconfig-r026-20230403   gcc  
csky         buildonly-randconfig-r003-20230402   gcc  
csky                                defconfig   gcc  
csky                 randconfig-r006-20230403   gcc  
csky                 randconfig-r015-20230403   gcc  
csky                 randconfig-r035-20230403   gcc  
hexagon      buildonly-randconfig-r004-20230403   clang
hexagon              randconfig-r023-20230402   clang
hexagon              randconfig-r025-20230402   clang
hexagon              randconfig-r026-20230402   clang
hexagon              randconfig-r032-20230402   clang
hexagon              randconfig-r041-20230402   clang
hexagon              randconfig-r041-20230403   clang
hexagon              randconfig-r045-20230402   clang
hexagon              randconfig-r045-20230403   clang
i386                             allyesconfig   gcc  
i386         buildonly-randconfig-r005-20230403   clang
i386                              debian-10.3   gcc  
i386                                defconfig   gcc  
i386                 randconfig-a001-20230403   clang
i386                 randconfig-a002-20230403   clang
i386                 randconfig-a003-20230403   clang
i386                 randconfig-a004-20230403   clang
i386                 randconfig-a005-20230403   clang
i386                 randconfig-a006-20230403   clang
i386                 randconfig-a011-20230403   gcc  
i386                 randconfig-a012-20230403   gcc  
i386                 randconfig-a013-20230403   gcc  
i386                 randconfig-a014-20230403   gcc  
i386                 randconfig-a015-20230403   gcc  
i386                 randconfig-a016-20230403   gcc  
i386                 randconfig-r003-20230403   clang
i386                 randconfig-r032-20230403   clang
ia64                             allmodconfig   gcc  
ia64                                defconfig   gcc  
ia64                 randconfig-r004-20230402   gcc  
ia64                 randconfig-r005-20230402   gcc  
ia64                 randconfig-r023-20230403   gcc  
ia64                 randconfig-r024-20230403   gcc  
ia64                 randconfig-r031-20230402   gcc  
loongarch                        allmodconfig   gcc  
loongarch                         allnoconfig   gcc  
loongarch    buildonly-randconfig-r001-20230402   gcc  
loongarch                           defconfig   gcc  
loongarch            randconfig-r001-20230403   gcc  
loongarch            randconfig-r014-20230402   gcc  
loongarch            randconfig-r015-20230402   gcc  
loongarch            randconfig-r024-20230403   gcc  
loongarch            randconfig-r031-20230403   gcc  
loongarch            randconfig-r033-20230403   gcc  
loongarch            randconfig-r034-20230402   gcc  
m68k                             allmodconfig   gcc  
m68k         buildonly-randconfig-r002-20230403   gcc  
m68k                                defconfig   gcc  
m68k                 randconfig-r003-20230402   gcc  
m68k                 randconfig-r003-20230403   gcc  
m68k                 randconfig-r033-20230402   gcc  
microblaze   buildonly-randconfig-r002-20230402   gcc  
microblaze           randconfig-r004-20230403   gcc  
microblaze           randconfig-r021-20230402   gcc  
microblaze           randconfig-r035-20230402   gcc  
mips                             allmodconfig   gcc  
mips                             allyesconfig   gcc  
mips                 randconfig-r012-20230403   clang
mips                 randconfig-r036-20230402   clang
mips                 randconfig-r036-20230403   gcc  
nios2                               defconfig   gcc  
nios2                randconfig-r011-20230402   gcc  
nios2                randconfig-r013-20230403   gcc  
openrisc     buildonly-randconfig-r004-20230402   gcc  
openrisc             randconfig-r001-20230402   gcc  
openrisc             randconfig-r001-20230403   gcc  
openrisc             randconfig-r014-20230403   gcc  
openrisc             randconfig-r034-20230402   gcc  
parisc       buildonly-randconfig-r003-20230403   gcc  
parisc                              defconfig   gcc  
parisc               randconfig-r031-20230402   gcc  
parisc64                            defconfig   gcc  
powerpc                          allmodconfig   gcc  
powerpc                           allnoconfig   gcc  
powerpc      buildonly-randconfig-r006-20230403   gcc  
powerpc              randconfig-r001-20230402   gcc  
powerpc              randconfig-r002-20230402   gcc  
powerpc              randconfig-r006-20230403   clang
riscv                            allmodconfig   gcc  
riscv                             allnoconfig   gcc  
riscv        buildonly-randconfig-r001-20230403   gcc  
riscv        buildonly-randconfig-r004-20230403   gcc  
riscv        buildonly-randconfig-r006-20230402   clang
riscv                               defconfig   gcc  
riscv                randconfig-r005-20230402   gcc  
riscv                randconfig-r022-20230402   clang
riscv                randconfig-r022-20230403   gcc  
riscv                randconfig-r024-20230402   clang
riscv                randconfig-r026-20230403   gcc  
riscv                randconfig-r036-20230402   gcc  
riscv                randconfig-r042-20230402   clang
riscv                randconfig-r042-20230403   gcc  
riscv                          rv32_defconfig   gcc  
s390                             allmodconfig   gcc  
s390                             allyesconfig   gcc  
s390                                defconfig   gcc  
s390                 randconfig-r006-20230402   gcc  
s390                 randconfig-r011-20230403   gcc  
s390                 randconfig-r013-20230403   gcc  
s390                 randconfig-r025-20230403   gcc  
s390                 randconfig-r034-20230403   clang
s390                 randconfig-r035-20230403   clang
s390                 randconfig-r044-20230402   clang
s390                 randconfig-r044-20230403   gcc  
sh                               allmodconfig   gcc  
sh                   randconfig-r022-20230402   gcc  
sparc        buildonly-randconfig-r005-20230403   gcc  
sparc                               defconfig   gcc  
sparc                randconfig-r016-20230403   gcc  
sparc                randconfig-r021-20230403   gcc  
sparc                randconfig-r024-20230402   gcc  
sparc64      buildonly-randconfig-r003-20230402   gcc  
sparc64              randconfig-r015-20230402   gcc  
sparc64              randconfig-r031-20230403   gcc  
um                             i386_defconfig   gcc  
um                           x86_64_defconfig   gcc  
x86_64                            allnoconfig   gcc  
x86_64                           allyesconfig   gcc  
x86_64                              defconfig   gcc  
x86_64                                  kexec   gcc  
x86_64               randconfig-a001-20230403   clang
x86_64               randconfig-a002-20230403   clang
x86_64               randconfig-a003-20230403   clang
x86_64               randconfig-a004-20230403   clang
x86_64               randconfig-a005-20230403   clang
x86_64               randconfig-a006-20230403   clang
x86_64               randconfig-a011-20230403   gcc  
x86_64               randconfig-a012-20230403   gcc  
x86_64               randconfig-a013-20230403   gcc  
x86_64               randconfig-a014-20230403   gcc  
x86_64               randconfig-a015-20230403   gcc  
x86_64               randconfig-a016-20230403   gcc  
x86_64               randconfig-r005-20230403   clang
x86_64               randconfig-r012-20230403   gcc  
x86_64               randconfig-r034-20230403   clang
x86_64                               rhel-8.3   gcc  
xtensa       buildonly-randconfig-r005-20230402   gcc  
xtensa               randconfig-r004-20230402   gcc  
xtensa               randconfig-r016-20230402   gcc  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply

* Re: [PATCH 00/11] selftests: hid: import the tests from hid-tools
From: Peter Hutterer @ 2023-04-04  1:37 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Jiri Kosina, Shuah Khan, linux-input, linux-kselftest,
	linux-kernel, Candle Sun, Jose Torreguitar, Roderick Colenbrander,
	Silvan Jegen, Kai-Heng Feng, наб,
	Blaž Hrastnik, Jason Gerecke, Nicolas Saenz Julienne
In-Reply-To: <20230403162024.sespaq5iwbjan4xl@mail.corp.redhat.com>

On Mon, Apr 03, 2023 at 06:20:24PM +0200, Benjamin Tissoires wrote:
> On Feb 17 2023, Benjamin Tissoires wrote:
> > I have been running hid-tools for a while, but it was in its own
> > separate repository for multiple reasons. And the past few weeks
> > I finally managed to make the kernel tests in that repo in a
> > state where we can merge them in the kernel tree directly:
> > 
> > - the tests run in ~2 to 3 minutes
> > - the tests are way more reliable than previously
> > - the tests are mostly self-contained now (to the exception
> >   of the Sony ones)
> > 
> > To be able to run the tests we need to use the latest release
> > of hid-tools, as this project still keeps the HID parsing logic
> > and is capable of generating the HID events.
> > 
> > The series also ensures we can run the tests with vmtest.sh,
> > allowing for a quick development and test in the tree itself.
> > 
> > This should allow us to require tests to be added to a series
> > when we see fit and keep them alive properly instead of having
> > to deal with 2 repositories.
> > 
> > In Cc are all of the people who participated in the elaboration
> > of those tests, so please send back a signed-off-by for each
> > commit you are part of.
> > 
> > This series applies on top of the for-6.3/hid-bpf branch, which
> > is the one that added the tools/testing/selftests/hid directory.
> > Given that this is unlikely this series will make the cut for
> > 6.3, we might just consider this series to be based on top of
> > the future 6.3-rc1.
> > 
> > Cheers,
> > Benjamin
> > 
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > ---
> 
> Jiri, do you mind if I push that code in the hid tree with the following
> changes:
> - Peter privately gave me his signed-off-by

Apologies, this fell off my list after the initial ack in a meeting with
Benjamin. This time publicly:
  Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
for the relevant commits.

Cheers,
  Peter


> - I included changes from https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/143
>   to fix the failing sony tests in v6.3
> 
> I am not a big fan of sending a v2 because the ML are not happy with the
> amount of changes...
> 
> Cheers,
> Benjamin
> 
> > Benjamin Tissoires (11):
> >       selftests: hid: make vmtest rely on make
> >       selftests: hid: import hid-tools hid-core tests
> >       selftests: hid: import hid-tools hid-gamepad tests
> >       selftests: hid: import hid-tools hid-keyboards tests
> >       selftests: hid: import hid-tools hid-mouse tests
> >       selftests: hid: import hid-tools hid-multitouch and hid-tablets tests
> >       selftests: hid: import hid-tools wacom tests
> >       selftests: hid: import hid-tools hid-apple tests
> >       selftests: hid: import hid-tools hid-ite tests
> >       selftests: hid: import hid-tools hid-sony and hid-playstation tests
> >       selftests: hid: import hid-tools usb-crash tests
> > 
> >  tools/testing/selftests/hid/Makefile               |   12 +
> >  tools/testing/selftests/hid/config                 |   11 +
> >  tools/testing/selftests/hid/hid-apple.sh           |    7 +
> >  tools/testing/selftests/hid/hid-core.sh            |    7 +
> >  tools/testing/selftests/hid/hid-gamepad.sh         |    7 +
> >  tools/testing/selftests/hid/hid-ite.sh             |    7 +
> >  tools/testing/selftests/hid/hid-keyboard.sh        |    7 +
> >  tools/testing/selftests/hid/hid-mouse.sh           |    7 +
> >  tools/testing/selftests/hid/hid-multitouch.sh      |    7 +
> >  tools/testing/selftests/hid/hid-sony.sh            |    7 +
> >  tools/testing/selftests/hid/hid-tablet.sh          |    7 +
> >  tools/testing/selftests/hid/hid-usb_crash.sh       |    7 +
> >  tools/testing/selftests/hid/hid-wacom.sh           |    7 +
> >  tools/testing/selftests/hid/run-hid-tools-tests.sh |   28 +
> >  tools/testing/selftests/hid/settings               |    3 +
> >  tools/testing/selftests/hid/tests/__init__.py      |    2 +
> >  tools/testing/selftests/hid/tests/base.py          |  345 ++++
> >  tools/testing/selftests/hid/tests/conftest.py      |   81 +
> >  .../selftests/hid/tests/descriptors_wacom.py       | 1360 +++++++++++++
> >  .../selftests/hid/tests/test_apple_keyboard.py     |  440 +++++
> >  tools/testing/selftests/hid/tests/test_gamepad.py  |  209 ++
> >  tools/testing/selftests/hid/tests/test_hid_core.py |  154 ++
> >  .../selftests/hid/tests/test_ite_keyboard.py       |  166 ++
> >  tools/testing/selftests/hid/tests/test_keyboard.py |  485 +++++
> >  tools/testing/selftests/hid/tests/test_mouse.py    |  977 +++++++++
> >  .../testing/selftests/hid/tests/test_multitouch.py | 2088 ++++++++++++++++++++
> >  tools/testing/selftests/hid/tests/test_sony.py     |  282 +++
> >  tools/testing/selftests/hid/tests/test_tablet.py   |  872 ++++++++
> >  .../testing/selftests/hid/tests/test_usb_crash.py  |  103 +
> >  .../selftests/hid/tests/test_wacom_generic.py      |  844 ++++++++
> >  tools/testing/selftests/hid/vmtest.sh              |   25 +-
> >  31 files changed, 8554 insertions(+), 10 deletions(-)
> > ---
> > base-commit: 2f7f4efb9411770b4ad99eb314d6418e980248b4
> > change-id: 20230217-import-hid-tools-tests-dc0cd4f3c8a8
> > 
> > Best regards,
> > -- 
> > Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > 
> 

^ permalink raw reply

* [PATCH] HID: apple: Set the tilde quirk flag on the Geyser 3
From: Alex Henrie @ 2023-04-04  2:48 UTC (permalink / raw)
  To: linux-input, jkosina; +Cc: Alex Henrie

I was finally able to obtain a MacBook1,1 to test and I've now confirmed
that it has the tilde key quirk as well:

Product    Model  Year  System      CPU    Shape  Labels     Country  Quirky
============================================================================
05ac:0218  A1181  2006  MacBook1,1  T2500  ISO    British    13       Yes

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
It's probably too late to squash this into my previous patch, but you
can if you want.
---
 drivers/hid/hid-apple.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 5c145775482b..e2c73a78b597 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -875,7 +875,8 @@ static const struct hid_device_id apple_devices[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO),
-		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
+		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
+			APPLE_ISO_TILDE_QUIRK },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
 			APPLE_RDESC_JIS },
-- 
2.40.0


^ permalink raw reply related

* Re: [PATCH V2] dt-bindings: input: pwm-beeper: convert to dt schema
From: Krzysztof Kozlowski @ 2023-04-04  5:59 UTC (permalink / raw)
  To: Peng Fan (OSS), dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt,
	s.hauer
  Cc: linux-input, devicetree, linux-kernel, Peng Fan
In-Reply-To: <20230403090640.3237060-1-peng.fan@oss.nxp.com>

On 03/04/2023 11:06, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Convert the binding doc to dt schema, and also fixed the
> example from fixed-regulator to regulator-fixed.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> V2:
>  License update
>  Don't need to show providers
>  Make example complete
>  Decrease beeper hz

Why?

>  Misc update
> 
>  .../devicetree/bindings/input/pwm-beeper.txt  | 24 -----------
>  .../devicetree/bindings/input/pwm-beeper.yaml | 42 +++++++++++++++++++
>  2 files changed, 42 insertions(+), 24 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/input/pwm-beeper.txt
>  create mode 100644 Documentation/devicetree/bindings/input/pwm-beeper.yaml
> 
> diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.txt b/Documentation/devicetree/bindings/input/pwm-beeper.txt
> deleted file mode 100644
> index 8fc0e48c20db..000000000000
> --- a/Documentation/devicetree/bindings/input/pwm-beeper.txt
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -* PWM beeper device tree bindings
> -
> -Registers a PWM device as beeper.
> -
> -Required properties:
> -- compatible: should be "pwm-beeper"
> -- pwms: phandle to the physical PWM device
> -
> -Optional properties:
> -- amp-supply: phandle to a regulator that acts as an amplifier for the beeper
> -- beeper-hz:  bell frequency in Hz
> -
> -Example:
> -
> -beeper_amp: amplifier {
> -	compatible = "fixed-regulator";
> -	gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
> -};
> -
> -beeper {
> -	compatible = "pwm-beeper";
> -	pwms = <&pwm0>;
> -	amp-supply = <&beeper_amp>;
> -};
> diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.yaml b/Documentation/devicetree/bindings/input/pwm-beeper.yaml
> new file mode 100644
> index 000000000000..a3797f338f46
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/pwm-beeper.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/pwm-beeper.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: PWM beeper
> +
> +maintainers:
> +  - Sascha Hauer <s.hauer@pengutronix.de>
> +
> +properties:
> +  compatible:
> +    const: pwm-beeper
> +
> +  pwms:
> +    description: Phandle to the physical PWM device

Drop description.

> +    maxItems: 1
> +
> +  amp-supply:
> +    description: Phandle to a regulator that acts as an amplifier for the beeper

Drop "Phandle to a regulator that acts as "

> +
> +  beeper-hz:
> +    description: bell frequency in Hz
> +    minimum: 1
> +    maximum: 4

default is 1000, so how constraints can be lower than default? Also -
missing default.

Best regards,
Krzysztof


^ permalink raw reply

* RE: [PATCH V2] dt-bindings: input: pwm-beeper: convert to dt schema
From: Peng Fan @ 2023-04-04  6:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Peng Fan (OSS), dmitry.torokhov@gmail.com,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	s.hauer@pengutronix.de
  Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <9dc60868-b3f2-e30f-f4fe-d2fbd551d948@linaro.org>

> Subject: Re: [PATCH V2] dt-bindings: input: pwm-beeper: convert to dt
> schema
> 
> On 03/04/2023 11:06, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Convert the binding doc to dt schema, and also fixed the example from
> > fixed-regulator to regulator-fixed.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > V2:
> >  License update
> >  Don't need to show providers
> >  Make example complete
> >  Decrease beeper hz
> 
> Why?
> 
> >  Misc update
> >
> >  .../devicetree/bindings/input/pwm-beeper.txt  | 24 -----------
> > .../devicetree/bindings/input/pwm-beeper.yaml | 42
> +++++++++++++++++++
> >  2 files changed, 42 insertions(+), 24 deletions(-)  delete mode
> > 100644 Documentation/devicetree/bindings/input/pwm-beeper.txt
> >  create mode 100644
> > Documentation/devicetree/bindings/input/pwm-beeper.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.txt
> > b/Documentation/devicetree/bindings/input/pwm-beeper.txt
> > deleted file mode 100644
> > index 8fc0e48c20db..000000000000
> > --- a/Documentation/devicetree/bindings/input/pwm-beeper.txt
> > +++ /dev/null
> > @@ -1,24 +0,0 @@
> > -* PWM beeper device tree bindings
> > -
> > -Registers a PWM device as beeper.
> > -
> > -Required properties:
> > -- compatible: should be "pwm-beeper"
> > -- pwms: phandle to the physical PWM device
> > -
> > -Optional properties:
> > -- amp-supply: phandle to a regulator that acts as an amplifier for
> > the beeper
> > -- beeper-hz:  bell frequency in Hz
> > -
> > -Example:
> > -
> > -beeper_amp: amplifier {
> > -	compatible = "fixed-regulator";
> > -	gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
> > -};
> > -
> > -beeper {
> > -	compatible = "pwm-beeper";
> > -	pwms = <&pwm0>;
> > -	amp-supply = <&beeper_amp>;
> > -};
> > diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.yaml
> > b/Documentation/devicetree/bindings/input/pwm-beeper.yaml
> > new file mode 100644
> > index 000000000000..a3797f338f46
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/input/pwm-beeper.yaml
> > @@ -0,0 +1,42 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id:
> >
> +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi
> > +cetree.org%2Fschemas%2Finput%2Fpwm-
> beeper.yaml%23&data=05%7C01%7Cpeng
> >
> +.fan%40nxp.com%7Cd0db787eb4ca45afdacb08db34d1ba6b%7C686ea1d3
> bc2b4c6fa
> >
> +92cd99c5c301635%7C0%7C0%7C638161847599379017%7CUnknown%7CT
> WFpbGZsb3d8
> >
> +eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> 3D%7C
> >
> +3000%7C%7C%7C&sdata=FUaIpDqrTVLbQYOrqcXjK3cIwbntbdz7zq86mWr8
> yDA%3D&re
> > +served=0
> > +$schema:
> >
> +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi
> > +cetree.org%2Fmeta-
> schemas%2Fcore.yaml%23&data=05%7C01%7Cpeng.fan%40nx
> >
> +p.com%7Cd0db787eb4ca45afdacb08db34d1ba6b%7C686ea1d3bc2b4c6fa9
> 2cd99c5c
> >
> +301635%7C0%7C0%7C638161847599535229%7CUnknown%7CTWFpbGZsb
> 3d8eyJWIjoiM
> >
> +C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C300
> 0%7C%7
> >
> +C%7C&sdata=OhqZ1z81rsRTjnHINrfR4yGh7%2FiuwGU9CuS8xPJ6NFw%3D&
> reserved=
> > +0
> > +
> > +title: PWM beeper
> > +
> > +maintainers:
> > +  - Sascha Hauer <s.hauer@pengutronix.de>
> > +
> > +properties:
> > +  compatible:
> > +    const: pwm-beeper
> > +
> > +  pwms:
> > +    description: Phandle to the physical PWM device
> 
> Drop description.
> 
> > +    maxItems: 1
> > +
> > +  amp-supply:
> > +    description: Phandle to a regulator that acts as an amplifier for
> > + the beeper
> 
> Drop "Phandle to a regulator that acts as "
> 
> > +
> > +  beeper-hz:
> > +    description: bell frequency in Hz
> > +    minimum: 1
> > +    maximum: 4
> 
> default is 1000, so how constraints can be lower than default? Also - missing
> default.
[Peng Fan] 
I am not sure what maximum value should be set. Previously I set 256, Rob
questioned it.

Regards,
Peng.
> 
> Best regards,
> Krzysztof


^ permalink raw reply

* [PATCH] Input: Check sanity of pipe in pegasus_probe()
From: Soumya Negi @ 2023-04-04  7:41 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Soumya Negi, linux-input, linux-kernel

Fix WARNING in pegasus_open/usb_submit_urb
Syzbot bug: https://syzkaller.appspot.com/bug?id=bbc107584dcf3262253ce93183e51f3612aaeb13

Warning raised because pegasus_driver submits transfer request for
bogus URB(pipe type does not match endpoint type). Add sanity check at
probe time for pipe value extracted from endpoint descriptor. Probe
will fail if sanity check fails.

Reported-and-tested-by: syzbot+04ee0cb4caccaed12d78@syzkaller.appspotmail.com
Signed-off-by: Soumya Negi <soumya.negi97@gmail.com>
---
 drivers/input/tablet/pegasus_notetaker.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/input/tablet/pegasus_notetaker.c b/drivers/input/tablet/pegasus_notetaker.c
index d836d3dcc6a2..a68da2988f9c 100644
--- a/drivers/input/tablet/pegasus_notetaker.c
+++ b/drivers/input/tablet/pegasus_notetaker.c
@@ -296,6 +296,12 @@ static int pegasus_probe(struct usb_interface *intf,
 	pegasus->intf = intf;
 
 	pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
+	/* Sanity check that pipe's type matches endpoint's type */
+	if (usb_pipe_type_check(dev, pipe)) {
+		error = -EINVAL;
+		goto err_free_mem;
+	}
+
 	pegasus->data_len = usb_maxpacket(dev, pipe);
 
 	pegasus->data = usb_alloc_coherent(dev, pegasus->data_len, GFP_KERNEL,
-- 
2.17.1


^ permalink raw reply related

* Re: [PATCH V2] dt-bindings: input: pwm-beeper: convert to dt schema
From: Krzysztof Kozlowski @ 2023-04-04  8:17 UTC (permalink / raw)
  To: Peng Fan, Peng Fan (OSS), dmitry.torokhov@gmail.com,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	s.hauer@pengutronix.de
  Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <DU0PR04MB9417000982CDDF5B75E309F488939@DU0PR04MB9417.eurprd04.prod.outlook.com>

On 04/04/2023 08:44, Peng Fan wrote:


>>
>>> +
>>> +  beeper-hz:
>>> +    description: bell frequency in Hz
>>> +    minimum: 1
>>> +    maximum: 4
>>
>> default is 1000, so how constraints can be lower than default? Also - missing
>> default.
> [Peng Fan] 
> I am not sure what maximum value should be set. Previously I set 256, Rob
> questioned it.

Yep, because 256 is power of 2, so really does not look correct. It is
still lower than default, right?

Best regards,
Krzysztof


^ permalink raw reply

* [PATCH 2/2] HID: mcp2221: fix get and get_direction for gpio
From: Louis Morhet @ 2023-04-04 12:15 UTC (permalink / raw)
  To: gupt21, jikos, benjamin.tissoires; +Cc: linux-i2c, linux-input, linux-kernel
In-Reply-To: <cover.1680602387.git.lmorhet@kalrayinc.com>

The mcp2221_raw_event retrieves the value and direction of gpio on the
same command, by setting the value on mcp->status and the direction on
mcp->gpio_dir; and the offset at which they are read is based on
mcp->gp_idx, set by the gpiochip callbacks.

However, the individual gpiochip calls set the index to look for
directly on the field they want to track. This create a "double offset"
in the final read in the response report.

Align the behaviour of mcp2221_raw_event and
mcp_gpio_get/mcp_gpio_get_direction by putting gp_idx on those calls to
the base offset of the gpio status struct.

Signed-off-by: Louis Morhet <lmorhet@kalrayinc.com>
---
 drivers/hid/hid-mcp2221.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index fa20ed4d395a..72883e0ce757 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -594,7 +594,7 @@ static int mcp_gpio_get(struct gpio_chip *gc,
 
 	mcp->txbuf[0] = MCP2221_GPIO_GET;
 
-	mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset].value);
+	mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset]);
 
 	mutex_lock(&mcp->lock);
 	ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
@@ -675,7 +675,7 @@ static int mcp_gpio_get_direction(struct gpio_chip *gc,
 
 	mcp->txbuf[0] = MCP2221_GPIO_GET;
 
-	mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset].direction);
+	mcp->gp_idx = offsetof(struct mcp_get_gpio, gpio[offset]);
 
 	mutex_lock(&mcp->lock);
 	ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
-- 
2.17.1






^ permalink raw reply related

* [PATCH 1/2] HID: mcp2221: fix report layout for gpio get
From: Louis Morhet @ 2023-04-04 12:15 UTC (permalink / raw)
  To: gupt21, jikos, benjamin.tissoires; +Cc: linux-i2c, linux-input, linux-kernel
In-Reply-To: <cover.1680602387.git.lmorhet@kalrayinc.com>

The documentation of the component (section 3.1.12 GET GPIO VALUES)
describes the hid report structure with two fields per gpio:
its value, followed by its direction.

However, the driver describes it with a wrong order:
direction followed by value.

Fix the structure representing the report answered by the chip to the
GET GPIO VALUES command.

Fixes commit 567b8e9fed8a ("HID: mcp2221: Fix GPIO output handling")

Signed-off-by: Louis Morhet <lmorhet@kalrayinc.com>
---
 drivers/hid/hid-mcp2221.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index f74a977cf8f8..fa20ed4d395a 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -79,8 +79,8 @@ struct mcp_get_gpio {
 	u8 cmd;
 	u8 dummy;
 	struct {
-		u8 direction;
 		u8 value;
+		u8 direction;
 	} gpio[MCP_NGPIO];
 } __packed;
 
-- 
2.17.1






^ permalink raw reply related

* [PATCH 0/2] Fixes for the mcp2221 gpiochip get_* calls
From: Louis Morhet @ 2023-04-04 12:14 UTC (permalink / raw)
  To: gupt21, jikos, benjamin.tissoires; +Cc: linux-i2c, linux-input, linux-kernel

The mcp2221 HID driver exposes a gpiochip device.
While gpioset seemed to work fine, gpioget always returned 1 on all 4
GPIOs of the component (0x01 for input in the field "direction",
according to the documentation).

This patch series addresses this issue by fixing the order of the fields
in the driver's representation of the chip answer, and adding
consistency to the way the callbacks prepare their command and the way
the hid event handler gets these fields.
The set callbacks use a similar mechanism, but work for now because
setting a direction/value only requires gpio-specific positioning in the
command preparation, and not in the raw_event handler.

The core of this issue being a discrepancy in the way the command and
the answer fetch their fields of interest, I would also like to ask if
we should uniformize a bit the way this driver handles gpio, and how.
I thought about several possible implementations for that:
Use mcp->gp_idx as the base offset of the gpio for set too, and modify
the raw_event handler to fetch all relevant data based on that; or set
the buffers in the mcp structure as unions of the various commands
handled and use gp_idx simply as the gpio index to access relevant data
directly from the structured representation everywhere; or go back to ye
old defines to ensure portability...

Louis Morhet (2):
  HID: mcp2221: fix report layout for gpio get
  HID: mcp2221: fix get and get_direction for gpio

 drivers/hid/hid-mcp2221.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1






^ permalink raw reply

* Re: [PATCH V2] dt-bindings: input: pwm-beeper: convert to dt schema
From: Rob Herring @ 2023-04-04 13:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Peng Fan
  Cc: Peng Fan (OSS), dmitry.torokhov@gmail.com,
	krzysztof.kozlowski+dt@linaro.org, s.hauer@pengutronix.de,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <9422ab57-8512-0177-76fa-76347626f941@linaro.org>

On Tue, Apr 04, 2023 at 10:17:45AM +0200, Krzysztof Kozlowski wrote:
> On 04/04/2023 08:44, Peng Fan wrote:
> 
> 
> >>
> >>> +
> >>> +  beeper-hz:
> >>> +    description: bell frequency in Hz
> >>> +    minimum: 1
> >>> +    maximum: 4
> >>
> >> default is 1000, so how constraints can be lower than default? Also - missing
> >> default.
> > [Peng Fan] 
> > I am not sure what maximum value should be set. Previously I set 256, Rob
> > questioned it.
> 
> Yep, because 256 is power of 2, so really does not look correct. It is
> still lower than default, right?

It's Hertz and an audible (to humans) range! At most that's 60 - 
10000Hz. I imagine any beeper h/w is capable of much narrower range than 
that, but don't know what's typical. 

Rob

^ permalink raw reply

* [syzbot] Monthly input report
From: syzbot @ 2023-04-04 14:19 UTC (permalink / raw)
  To: linux-input, linux-kernel, syzkaller-bugs

Hello input maintainers/developers,

This is a 30-day syzbot report for the input subsystem.
All related reports/information can be found at:
https://syzkaller.appspot.com/upstream/s/input

During the period, 0 new issues were detected and 0 were fixed.
In total, 14 issues are still open and 42 have been fixed so far.

Some of the still happening issues:

Crashes Repro Title
2162    Yes   WARNING in input_mt_init_slots
              https://syzkaller.appspot.com/bug?extid=0122fa359a69694395d5
93      Yes   WARNING in cm109_urb_irq_callback/usb_submit_urb
              https://syzkaller.appspot.com/bug?extid=2d6d691af5ab4b7e66df
67      Yes   general protection fault in hidraw_release
              https://syzkaller.appspot.com/bug?extid=953a33deaf38c66a915e
49      Yes   inconsistent lock state in find_vmap_area
              https://syzkaller.appspot.com/bug?extid=8d19062486784d15dda9
32      Yes   WARNING in bcm5974_start_traffic/usb_submit_urb
              https://syzkaller.appspot.com/bug?extid=348331f63b034f89b622

---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

^ permalink raw reply

* Re: [PATCH] dt-bindings: input: Drop unneeded quotes
From: Rob Herring @ 2023-04-04 17:07 UTC (permalink / raw)
  To: Dmitry Torokhov, Krzysztof Kozlowski, Benson Leung, Guenter Roeck,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Mattijs Korpershoek, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: linux-input, devicetree, linux-kernel, chrome-platform,
	linux-arm-kernel, linux-mediatek
In-Reply-To: <20230320234718.2930154-1-robh@kernel.org>

On Mon, Mar 20, 2023 at 06:47:18PM -0500, Rob Herring wrote:
> Cleanup bindings dropping unneeded quotes. Once all these are fixed,
> checking for this can be enabled in yamllint.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/input/adc-joystick.yaml     | 4 ++--
>  .../devicetree/bindings/input/google,cros-ec-keyb.yaml        | 2 +-
>  Documentation/devicetree/bindings/input/imx-keypad.yaml       | 2 +-
>  Documentation/devicetree/bindings/input/matrix-keymap.yaml    | 2 +-
>  .../devicetree/bindings/input/mediatek,mt6779-keypad.yaml     | 2 +-
>  .../devicetree/bindings/input/microchip,cap11xx.yaml          | 4 ++--
>  Documentation/devicetree/bindings/input/pwm-vibrator.yaml     | 4 ++--
>  Documentation/devicetree/bindings/input/regulator-haptic.yaml | 4 ++--
>  .../bindings/input/touchscreen/elan,elants_i2c.yaml           | 4 ++--
>  9 files changed, 14 insertions(+), 14 deletions(-)

Applied, thanks.


^ permalink raw reply

* Re: [PATCH 00/11] selftests: hid: import the tests from hid-tools
From: Roderick Colenbrander @ 2023-04-04 23:22 UTC (permalink / raw)
  To: Peter Hutterer
  Cc: Benjamin Tissoires, Jiri Kosina, Shuah Khan, linux-input,
	linux-kselftest, linux-kernel, Candle Sun, Jose Torreguitar,
	Roderick Colenbrander, Silvan Jegen, Kai-Heng Feng,
	наб, Blaž Hrastnik, Jason Gerecke,
	Nicolas Saenz Julienne
In-Reply-To: <20230404013731.GA38303@quokka>

Hi Benjamin,

I like the direction of bundling the tests with the kernel and should
make it easier in case there are driver changes breaking tests as
well.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>

Thanks,
Roderick Colenbrander

On Mon, Apr 3, 2023 at 6:54 PM Peter Hutterer <peter.hutterer@who-t.net> wrote:
>
> On Mon, Apr 03, 2023 at 06:20:24PM +0200, Benjamin Tissoires wrote:
> > On Feb 17 2023, Benjamin Tissoires wrote:
> > > I have been running hid-tools for a while, but it was in its own
> > > separate repository for multiple reasons. And the past few weeks
> > > I finally managed to make the kernel tests in that repo in a
> > > state where we can merge them in the kernel tree directly:
> > >
> > > - the tests run in ~2 to 3 minutes
> > > - the tests are way more reliable than previously
> > > - the tests are mostly self-contained now (to the exception
> > >   of the Sony ones)
> > >
> > > To be able to run the tests we need to use the latest release
> > > of hid-tools, as this project still keeps the HID parsing logic
> > > and is capable of generating the HID events.
> > >
> > > The series also ensures we can run the tests with vmtest.sh,
> > > allowing for a quick development and test in the tree itself.
> > >
> > > This should allow us to require tests to be added to a series
> > > when we see fit and keep them alive properly instead of having
> > > to deal with 2 repositories.
> > >
> > > In Cc are all of the people who participated in the elaboration
> > > of those tests, so please send back a signed-off-by for each
> > > commit you are part of.
> > >
> > > This series applies on top of the for-6.3/hid-bpf branch, which
> > > is the one that added the tools/testing/selftests/hid directory.
> > > Given that this is unlikely this series will make the cut for
> > > 6.3, we might just consider this series to be based on top of
> > > the future 6.3-rc1.
> > >
> > > Cheers,
> > > Benjamin
> > >
> > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > > ---
> >
> > Jiri, do you mind if I push that code in the hid tree with the following
> > changes:
> > - Peter privately gave me his signed-off-by
>
> Apologies, this fell off my list after the initial ack in a meeting with
> Benjamin. This time publicly:
>   Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
> for the relevant commits.
>
> Cheers,
>   Peter
>
>
> > - I included changes from https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/143
> >   to fix the failing sony tests in v6.3
> >
> > I am not a big fan of sending a v2 because the ML are not happy with the
> > amount of changes...
> >
> > Cheers,
> > Benjamin
> >
> > > Benjamin Tissoires (11):
> > >       selftests: hid: make vmtest rely on make
> > >       selftests: hid: import hid-tools hid-core tests
> > >       selftests: hid: import hid-tools hid-gamepad tests
> > >       selftests: hid: import hid-tools hid-keyboards tests
> > >       selftests: hid: import hid-tools hid-mouse tests
> > >       selftests: hid: import hid-tools hid-multitouch and hid-tablets tests
> > >       selftests: hid: import hid-tools wacom tests
> > >       selftests: hid: import hid-tools hid-apple tests
> > >       selftests: hid: import hid-tools hid-ite tests
> > >       selftests: hid: import hid-tools hid-sony and hid-playstation tests
> > >       selftests: hid: import hid-tools usb-crash tests
> > >
> > >  tools/testing/selftests/hid/Makefile               |   12 +
> > >  tools/testing/selftests/hid/config                 |   11 +
> > >  tools/testing/selftests/hid/hid-apple.sh           |    7 +
> > >  tools/testing/selftests/hid/hid-core.sh            |    7 +
> > >  tools/testing/selftests/hid/hid-gamepad.sh         |    7 +
> > >  tools/testing/selftests/hid/hid-ite.sh             |    7 +
> > >  tools/testing/selftests/hid/hid-keyboard.sh        |    7 +
> > >  tools/testing/selftests/hid/hid-mouse.sh           |    7 +
> > >  tools/testing/selftests/hid/hid-multitouch.sh      |    7 +
> > >  tools/testing/selftests/hid/hid-sony.sh            |    7 +
> > >  tools/testing/selftests/hid/hid-tablet.sh          |    7 +
> > >  tools/testing/selftests/hid/hid-usb_crash.sh       |    7 +
> > >  tools/testing/selftests/hid/hid-wacom.sh           |    7 +
> > >  tools/testing/selftests/hid/run-hid-tools-tests.sh |   28 +
> > >  tools/testing/selftests/hid/settings               |    3 +
> > >  tools/testing/selftests/hid/tests/__init__.py      |    2 +
> > >  tools/testing/selftests/hid/tests/base.py          |  345 ++++
> > >  tools/testing/selftests/hid/tests/conftest.py      |   81 +
> > >  .../selftests/hid/tests/descriptors_wacom.py       | 1360 +++++++++++++
> > >  .../selftests/hid/tests/test_apple_keyboard.py     |  440 +++++
> > >  tools/testing/selftests/hid/tests/test_gamepad.py  |  209 ++
> > >  tools/testing/selftests/hid/tests/test_hid_core.py |  154 ++
> > >  .../selftests/hid/tests/test_ite_keyboard.py       |  166 ++
> > >  tools/testing/selftests/hid/tests/test_keyboard.py |  485 +++++
> > >  tools/testing/selftests/hid/tests/test_mouse.py    |  977 +++++++++
> > >  .../testing/selftests/hid/tests/test_multitouch.py | 2088 ++++++++++++++++++++
> > >  tools/testing/selftests/hid/tests/test_sony.py     |  282 +++
> > >  tools/testing/selftests/hid/tests/test_tablet.py   |  872 ++++++++
> > >  .../testing/selftests/hid/tests/test_usb_crash.py  |  103 +
> > >  .../selftests/hid/tests/test_wacom_generic.py      |  844 ++++++++
> > >  tools/testing/selftests/hid/vmtest.sh              |   25 +-
> > >  31 files changed, 8554 insertions(+), 10 deletions(-)
> > > ---
> > > base-commit: 2f7f4efb9411770b4ad99eb314d6418e980248b4
> > > change-id: 20230217-import-hid-tools-tests-dc0cd4f3c8a8
> > >
> > > Best regards,
> > > --
> > > Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > >
> >

^ permalink raw reply

* [PATCH] USB: core: Fix docs warning caused by wireless_status feature
From: Bastien Nocera @ 2023-04-05  9:11 UTC (permalink / raw)
  To: linux-usb, linux-input
  Cc: Greg Kroah-Hartman, Alan Stern, Benjamin Tissoires,
	Filipe Laíns, Nestor Lopez Casado, Stephen Rothwell

Fix wrongly named 'dev' parameter in doc block, should have been iface:
drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status'
drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'

And fix missing struct member doc in kernel API, and reorder to
match struct:
include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 0a4db185f078 ("USB: core: Add API to change the wireless_status")
---
 drivers/usb/core/message.c | 2 +-
 include/linux/usb.h        | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 7930dca84616..7c7f88ca4f62 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1926,7 +1926,7 @@ static void __usb_wireless_status_intf(struct work_struct *ws)
 
 /**
  * usb_set_wireless_status - sets the wireless_status struct member
- * @dev: the device to modify
+ * @iface: the interface to modify
  * @status: the new wireless status
  *
  * Set the wireless_status struct member to the new value, and emit
diff --git a/include/linux/usb.h b/include/linux/usb.h
index a48eeec62a66..56f4758f3c31 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -203,14 +203,16 @@ enum usb_wireless_status {
  *	following a reset or suspend operation it doesn't support.
  * @authorized: This allows to (de)authorize individual interfaces instead
  *	a whole device in contrast to the device authorization.
+ * @wireless_status: if the USB device uses a receiver/emitter combo, whether
+ *	the emitter is connected.
+ * @wireless_status_work: Used for scheduling wireless status changes
+ * 	from atomic context.
  * @dev: driver model's view of this device
  * @usb_dev: if an interface is bound to the USB major, this will point
  *	to the sysfs representation for that device.
  * @reset_ws: Used for scheduling resets from atomic context.
  * @resetting_device: USB core reset the device, so use alt setting 0 as
  *	current; needs bandwidth alloc after reset.
- * @wireless_status: if the USB device uses a receiver/emitter combo, whether
- *	the emitter is connected.
  *
  * USB device drivers attach to interfaces on a physical device.  Each
  * interface encapsulates a single high level function, such as feeding
-- 
2.40.0


^ permalink raw reply related

* [PATCH v2] USB: core: Fix docs warning caused by wireless_status feature
From: Bastien Nocera @ 2023-04-05  9:27 UTC (permalink / raw)
  To: linux-usb, linux-input
  Cc: Greg Kroah-Hartman, Alan Stern, Benjamin Tissoires,
	Filipe Laíns, Nestor Lopez Casado, Stephen Rothwell

Fix wrongly named 'dev' parameter in doc block, should have been iface:
drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status'
drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'

And fix missing struct member doc in kernel API, and reorder to
match struct:
include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/linux-next/20230405114807.5a57bf46@canb.auug.org.au/T/#t
Fixes: 0a4db185f078 ("USB: core: Add API to change the wireless_status")
Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
Added missing link and sob, thanks to bentiss for the quick review

 drivers/usb/core/message.c | 2 +-
 include/linux/usb.h        | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 7930dca84616..7c7f88ca4f62 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1926,7 +1926,7 @@ static void __usb_wireless_status_intf(struct work_struct *ws)
 
 /**
  * usb_set_wireless_status - sets the wireless_status struct member
- * @dev: the device to modify
+ * @iface: the interface to modify
  * @status: the new wireless status
  *
  * Set the wireless_status struct member to the new value, and emit
diff --git a/include/linux/usb.h b/include/linux/usb.h
index a48eeec62a66..56f4758f3c31 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -203,14 +203,16 @@ enum usb_wireless_status {
  *	following a reset or suspend operation it doesn't support.
  * @authorized: This allows to (de)authorize individual interfaces instead
  *	a whole device in contrast to the device authorization.
+ * @wireless_status: if the USB device uses a receiver/emitter combo, whether
+ *	the emitter is connected.
+ * @wireless_status_work: Used for scheduling wireless status changes
+ * 	from atomic context.
  * @dev: driver model's view of this device
  * @usb_dev: if an interface is bound to the USB major, this will point
  *	to the sysfs representation for that device.
  * @reset_ws: Used for scheduling resets from atomic context.
  * @resetting_device: USB core reset the device, so use alt setting 0 as
  *	current; needs bandwidth alloc after reset.
- * @wireless_status: if the USB device uses a receiver/emitter combo, whether
- *	the emitter is connected.
  *
  * USB device drivers attach to interfaces on a physical device.  Each
  * interface encapsulates a single high level function, such as feeding
-- 
2.40.0


^ permalink raw reply related

* [GIT PULL] intel-gpio for 6.4-2
From: Andy Shevchenko @ 2023-04-05 12:53 UTC (permalink / raw)
  To: Linux GPIO, linux-arm-kernel, linux-input
  Cc: Linus Walleij, Bartosz Golaszewski, Andy Shevchenko,
	Arnd Bergmann, Dmitry Torokhov

Hi Linux GPIO  maintainers et al.,

Here is the second PR for GPIO subsystem that contains some treewide fixes
against previous PR along with Intel GPIO related stuff. It has been in the
Linux Next for a few weeks without no additional problems being reported.
Please, pull this for v6.4 cycle.

This can be treated as immutable tag, in case anyone wants to go with it
separately.

Thanks,

With Best Regards,
Andy Shevchenko

The following changes since commit 380c7ba3923c6e471aff0f951a6cf42e8dec2c79:

  gpiolib: Clean up headers (2023-03-06 12:33:02 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git tags/intel-gpio-v6.4-2

for you to fetch changes up to 782eea0c89f7d071d6b56ecfa1b8b0c81164b9be:

  gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xNU (2023-03-23 16:22:18 +0200)

----------------------------------------------------------------
intel-gpio for v6.4-2

* Fixed suspend issue on Clevo NL5xNU
* Split a new Intel Tangier (library) driver for current and new platforms
* Introduced a new driver for Intel Elkhart Lake PSE GPIO (see also above)
* Contained a few fixes for the previous of_gpio.h cleanup
* Miscellaneous cleanups here and there

The following is an automated git shortlog grouped by driver:

elkhartlake:
 -  Introduce Intel Elkhart Lake PSE GPIO

gpiolib:
 -  acpi: Add a ignore wakeup quirk for Clevo NL5xNU
 -  acpi: Move ACPI device NULL check to acpi_get_driver_gpio_data()
 -  acpi: use the fwnode in acpi_gpiochip_find()

ich:
 -  Use devm_gpiochip_add_data() to simplify remove path

merrifield:
 -  Utilise temporary variable for struct device
 -  Use dev_err_probe()
 -  Adapt to Intel Tangier GPIO driver

mips:
 -  ar7: include linux/gpio/driver.h

mm-lantiq:
 -  Fix typo in the newly added header filename

powerpc/40x:
 -  Add missing select OF_GPIO_MM_GPIOCHIP

sh:
 -  mach-x3proto: Add missing #include <linux/gpio/driver.h>

tangier:
 -  Introduce Intel Tangier GPIO driver

----------------------------------------------------------------
Andrew Davis (1):
      gpio: ich: Use devm_gpiochip_add_data() to simplify remove path

Andy Shevchenko (5):
      gpio: merrifield: Use dev_err_probe()
      gpio: merrifield: Utilise temporary variable for struct device
      powerpc/40x: Add missing select OF_GPIO_MM_GPIOCHIP
      gpio: mm-lantiq: Fix typo in the newly added header filename
      gpiolib: acpi: Move ACPI device NULL check to acpi_get_driver_gpio_data()

Arnd Bergmann (1):
      mips: ar7: include linux/gpio/driver.h

Benjamin Tissoires (1):
      gpiolib: acpi: use the fwnode in acpi_gpiochip_find()

Geert Uytterhoeven (1):
      sh: mach-x3proto: Add missing #include <linux/gpio/driver.h>

Pandith N (3):
      gpio: tangier: Introduce Intel Tangier GPIO driver
      gpio: merrifield: Adapt to Intel Tangier GPIO driver
      gpio: elkhartlake: Introduce Intel Elkhart Lake PSE GPIO

Werner Sembach (1):
      gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xNU

 MAINTAINERS                         |   2 +
 arch/mips/ar7/gpio.c                |   2 +-
 arch/powerpc/platforms/40x/Kconfig  |   1 +
 arch/sh/boards/mach-x3proto/setup.c |   2 +-
 drivers/gpio/Kconfig                |  24 +-
 drivers/gpio/Makefile               |   2 +
 drivers/gpio/gpio-elkhartlake.c     |  90 ++++++
 drivers/gpio/gpio-ich.c             |  10 +-
 drivers/gpio/gpio-merrifield.c      | 453 +++---------------------------
 drivers/gpio/gpio-mm-lantiq.c       |   2 +-
 drivers/gpio/gpio-tangier.c         | 536 ++++++++++++++++++++++++++++++++++++
 drivers/gpio/gpio-tangier.h         | 117 ++++++++
 drivers/gpio/gpiolib-acpi.c         |  26 +-
 13 files changed, 825 insertions(+), 442 deletions(-)
 create mode 100644 drivers/gpio/gpio-elkhartlake.c
 create mode 100644 drivers/gpio/gpio-tangier.c
 create mode 100644 drivers/gpio/gpio-tangier.h

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply

* Re: [PATCH] USB: core: Fix docs warning caused by wireless_status feature
From: Greg Kroah-Hartman @ 2023-04-05 17:11 UTC (permalink / raw)
  To: Bastien Nocera
  Cc: linux-usb, linux-input, Alan Stern, Benjamin Tissoires,
	Filipe Laíns, Nestor Lopez Casado, Stephen Rothwell
In-Reply-To: <20230405091157.35056-1-hadess@hadess.net>

On Wed, Apr 05, 2023 at 11:11:57AM +0200, Bastien Nocera wrote:
> Fix wrongly named 'dev' parameter in doc block, should have been iface:
> drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status'
> drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'
> 
> And fix missing struct member doc in kernel API, and reorder to
> match struct:
> include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Fixes: 0a4db185f078 ("USB: core: Add API to change the wireless_status")
> ---
>  drivers/usb/core/message.c | 2 +-
>  include/linux/usb.h        | 6 ++++--
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/process/submitting-patches.rst and resend
  it after adding that line.  Note, the line needs to be in the body of
  the email, before the patch, not at the bottom of the patch or in the
  email signature.


If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply

* Re: [PATCH v2] USB: core: Fix docs warning caused by wireless_status feature
From: Greg Kroah-Hartman @ 2023-04-05 17:13 UTC (permalink / raw)
  To: Bastien Nocera
  Cc: linux-usb, linux-input, Alan Stern, Benjamin Tissoires,
	Filipe Laíns, Nestor Lopez Casado, Stephen Rothwell
In-Reply-To: <20230405092754.36579-1-hadess@hadess.net>

On Wed, Apr 05, 2023 at 11:27:54AM +0200, Bastien Nocera wrote:
> Fix wrongly named 'dev' parameter in doc block, should have been iface:
> drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status'
> drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'
> 
> And fix missing struct member doc in kernel API, and reorder to
> match struct:
> include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Link: https://lore.kernel.org/linux-next/20230405114807.5a57bf46@canb.auug.org.au/T/#t
> Fixes: 0a4db185f078 ("USB: core: Add API to change the wireless_status")

I do not see that git commit id anywhere, where is it from?  What tree?

Ah, input tree, not much I can do there...

thanks,

greg k-h

^ permalink raw reply

* Re: [PATCH v2] USB: core: Fix docs warning caused by wireless_status feature
From: Bastien Nocera @ 2023-04-05 18:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-usb, linux-input, Alan Stern, Benjamin Tissoires,
	Filipe Laíns, Nestor Lopez Casado, Stephen Rothwell
In-Reply-To: <2023040554-obscurity-latter-b12b@gregkh>

On Wed, 2023-04-05 at 19:13 +0200, Greg Kroah-Hartman wrote:
> On Wed, Apr 05, 2023 at 11:27:54AM +0200, Bastien Nocera wrote:
> > Fix wrongly named 'dev' parameter in doc block, should have been
> > iface:
> > drivers/usb/core/message.c:1939: warning: Function parameter or
> > member 'iface' not described in 'usb_set_wireless_status'
> > drivers/usb/core/message.c:1939: warning: Excess function parameter
> > 'dev' description in 'usb_set_wireless_status'
> > 
> > And fix missing struct member doc in kernel API, and reorder to
> > match struct:
> > include/linux/usb.h:270: warning: Function parameter or member
> > 'wireless_status_work' not described in 'usb_interface'
> > 
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Link:
> > https://lore.kernel.org/linux-next/20230405114807.5a57bf46@canb.auug.org.au/T/#t
> > Fixes: 0a4db185f078 ("USB: core: Add API to change the
> > wireless_status")
> 
> I do not see that git commit id anywhere, where is it from?  What
> tree?
> 
> Ah, input tree, not much I can do there...

Yes, it's from the hid tree.

Benjamin is waiting on either Alan or yourself ack'ing the changes
before pushing it through the hid tree, to avoid stepping on somebody
else's toes.

The patch seems to fix the warnings in my local tests, let me know if
you have any comments about the wording.

Cheers

^ permalink raw reply

* Re: [PATCH v2] USB: core: Fix docs warning caused by wireless_status feature
From: Greg Kroah-Hartman @ 2023-04-05 18:06 UTC (permalink / raw)
  To: Bastien Nocera
  Cc: linux-usb, linux-input, Alan Stern, Benjamin Tissoires,
	Filipe Laíns, Nestor Lopez Casado, Stephen Rothwell
In-Reply-To: <8ee84f3383fb074f031b88c4f030757667635d96.camel@hadess.net>

On Wed, Apr 05, 2023 at 08:03:16PM +0200, Bastien Nocera wrote:
> On Wed, 2023-04-05 at 19:13 +0200, Greg Kroah-Hartman wrote:
> > On Wed, Apr 05, 2023 at 11:27:54AM +0200, Bastien Nocera wrote:
> > > Fix wrongly named 'dev' parameter in doc block, should have been
> > > iface:
> > > drivers/usb/core/message.c:1939: warning: Function parameter or
> > > member 'iface' not described in 'usb_set_wireless_status'
> > > drivers/usb/core/message.c:1939: warning: Excess function parameter
> > > 'dev' description in 'usb_set_wireless_status'
> > > 
> > > And fix missing struct member doc in kernel API, and reorder to
> > > match struct:
> > > include/linux/usb.h:270: warning: Function parameter or member
> > > 'wireless_status_work' not described in 'usb_interface'
> > > 
> > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Link:
> > > https://lore.kernel.org/linux-next/20230405114807.5a57bf46@canb.auug.org.au/T/#t
> > > Fixes: 0a4db185f078 ("USB: core: Add API to change the
> > > wireless_status")
> > 
> > I do not see that git commit id anywhere, where is it from?  What
> > tree?
> > 
> > Ah, input tree, not much I can do there...
> 
> Yes, it's from the hid tree.
> 
> Benjamin is waiting on either Alan or yourself ack'ing the changes
> before pushing it through the hid tree, to avoid stepping on somebody
> else's toes.
> 
> The patch seems to fix the warnings in my local tests, let me know if
> you have any comments about the wording.

Nope:

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply

* Re: [PATCH v3 0/2] platform/x86: Add driver for Yoga Tablet mode switch
From: André Apitzsch @ 2023-04-05 18:27 UTC (permalink / raw)
  To: Andrew Kallmeyer, platform-driver-x86
  Cc: Gergo Koteles, Ike Panhc, linux-input, Hans de Goede, Armin Wolf,
	Barnabás Pőcze
In-Reply-To: <20230329014559.44494-1-kallmeyeras@gmail.com>

Am Dienstag, dem 28.03.2023 um 18:45 -0700 schrieb Andrew Kallmeyer:
> This driver maps the Lenovo Yoga tablet mode switch to a SW_TABLET_MODE input
> device. This will make the tablet status available to desktop environments.
> 
> This patch series is the result of the discussion at
> https://lore.kernel.org/r/CAG4kvq9US=-NjyXFMzJYu2zCJryJWtOc7FGZbrewpgCDjdAkbg@mail.gmail.com/
> 
> I decided to follow-up on the patch Gergo wrote and respond to the review
> comments to get it merged and available for everyone.
> 
> Gergo and I have tested this on the Yoga 7 14ARB7, and the Yoga 7 14AIL7
> respectively. Additionally, according to reports at
> https://github.com/lukas-w/yoga-usage-mode, which uses the same WMI devices,
> this driver should work with:
> Yoga C940, Ideapad flex 14API, Yoga 9 14IAP7, Yoga 7 14ARB7, etc.
> 
> v1: https://lore.kernel.org/r/20230310041726.217447-1-kallmeyeras@gmail.com/
> v2: https://lore.kernel.org/r/20230323025200.5462-1-kallmeyeras@gmail.com/
> The diff since v2 is as follows:
> 
> [..]
> 
> Andrew Kallmeyer (1):
>   platform/x86: Move ideapad ACPI helpers to a new header
> 
> Gergo Koteles (1):
>   platform/x86: Add driver for Yoga Tablet Mode switch
> 
>  drivers/platform/x86/Kconfig          |  10 ++
>  drivers/platform/x86/Makefile         |   1 +
>  drivers/platform/x86/ideapad-laptop.c | 135 +------------------
>  drivers/platform/x86/ideapad-laptop.h | 152 +++++++++++++++++++++
>  drivers/platform/x86/lenovo-ymc.c     | 185 ++++++++++++++++++++++++++
>  5 files changed, 349 insertions(+), 134 deletions(-)
>  create mode 100644 drivers/platform/x86/ideapad-laptop.h
>  create mode 100644 drivers/platform/x86/lenovo-ymc.c
> 

Hi Andrew,

it seems my last tested-by got lost, when preparing the this patch
version or was ignored because of the amount of code changes.

Anyway, tested again on Lenovo ThinkBook 14s Yoga ITL.

Tested-by: André Apitzsch <git@apitzsch.eu>

Best regards,
André

^ permalink raw reply

* Re: [PATCH 2/2] Input: xpad - fix PowerA EnWired Controller guide button
From: Vicki Pfau @ 2023-04-06  2:40 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Benjamin Tissoires, linux-input, Pavel Rojtberg
In-Reply-To: <ZCilF4RM5LY85aHP@google.com>



On 4/1/23 14:41, Dmitry Torokhov wrote:
> On Wed, Mar 29, 2023 at 07:47:52PM -0700, Vicki Pfau wrote:
>> This commit explicitly disables the audio interface the same way the official
>> driver does. This is needed for some controllers, such as the PowerA Enhanced
>> Wired Controller for Series X|S (0x20d6:0x200e) to report the guide button.
>>
>> Signed-off-by: Vicki Pfau <vi@endrift.com>
>> ---
>>  drivers/input/joystick/xpad.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
>> index 698224e1948f..c31fc4e9b310 100644
>> --- a/drivers/input/joystick/xpad.c
>> +++ b/drivers/input/joystick/xpad.c
>> @@ -1396,6 +1396,14 @@ static int xpad_start_xbox_one(struct usb_xpad *xpad)
>>  	unsigned long flags;
>>  	int retval;
>>  
>> +	/* Explicitly disable the audio interface. This is needed for some
>> +	 * controllers, such as the PowerA Enhanced Wired Controller
>> +	 * for Series X|S (0x20d6:0x200e) to report the guide button */
>> +	retval = usb_set_interface(xpad->udev, GIP_WIRED_INTF_AUDIO, 0);
>> +	if (retval)
>> +		dev_warn(&xpad->dev->dev,
>> +			 "unable to disable audio interface: %d\n", retval);
> 
> I would prefer if we first validated that the interface is in fact
> present. Can we do something like:
> 
> 	if (usb_ifnum_to_if(xpad->udev, GIP_WIRED_INTF_AUDIO)) {
> 		error = usb_set_interface(xpad->udev, GIP_WIRED_INTF_AUDIO, 0);
> 		if (error)
> 			...
> 	}
> 

Yup, that makes sense. Wasn't sure what the cleanest way to do that was, though I'm unconvinced that the first party driver would work without this interface. It can't hurt to add the check.

Should I resubmit both patches in the series, or just this one?

>> +
>>  	spin_lock_irqsave(&xpad->odata_lock, flags);
>>  
>>  	/*
>> -- 
>> 2.40.0
>>
> 
> Thanks.
> 

Thanks,
Vicki

^ permalink raw reply

* Re: [GIT PULL] intel-gpio for 6.4-2
From: Bartosz Golaszewski @ 2023-04-06  8:40 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux GPIO, linux-arm-kernel, linux-input, Linus Walleij,
	Arnd Bergmann, Dmitry Torokhov
In-Reply-To: <ZC1vWkY52ggGxem8@black.fi.intel.com>

On Wed, Apr 5, 2023 at 2:53 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Hi Linux GPIO  maintainers et al.,
>
> Here is the second PR for GPIO subsystem that contains some treewide fixes
> against previous PR along with Intel GPIO related stuff. It has been in the
> Linux Next for a few weeks without no additional problems being reported.
> Please, pull this for v6.4 cycle.
>
> This can be treated as immutable tag, in case anyone wants to go with it
> separately.
>
> Thanks,
>
> With Best Regards,
> Andy Shevchenko
>
> The following changes since commit 380c7ba3923c6e471aff0f951a6cf42e8dec2c79:
>
>   gpiolib: Clean up headers (2023-03-06 12:33:02 +0200)
>
> are available in the Git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git tags/intel-gpio-v6.4-2
>
> for you to fetch changes up to 782eea0c89f7d071d6b56ecfa1b8b0c81164b9be:
>
>   gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xNU (2023-03-23 16:22:18 +0200)
>
> ----------------------------------------------------------------
> intel-gpio for v6.4-2
>
> * Fixed suspend issue on Clevo NL5xNU
> * Split a new Intel Tangier (library) driver for current and new platforms
> * Introduced a new driver for Intel Elkhart Lake PSE GPIO (see also above)
> * Contained a few fixes for the previous of_gpio.h cleanup
> * Miscellaneous cleanups here and there
>
> The following is an automated git shortlog grouped by driver:
>
> elkhartlake:
>  -  Introduce Intel Elkhart Lake PSE GPIO
>
> gpiolib:
>  -  acpi: Add a ignore wakeup quirk for Clevo NL5xNU
>  -  acpi: Move ACPI device NULL check to acpi_get_driver_gpio_data()
>  -  acpi: use the fwnode in acpi_gpiochip_find()
>
> ich:
>  -  Use devm_gpiochip_add_data() to simplify remove path
>
> merrifield:
>  -  Utilise temporary variable for struct device
>  -  Use dev_err_probe()
>  -  Adapt to Intel Tangier GPIO driver
>
> mips:
>  -  ar7: include linux/gpio/driver.h
>
> mm-lantiq:
>  -  Fix typo in the newly added header filename
>
> powerpc/40x:
>  -  Add missing select OF_GPIO_MM_GPIOCHIP
>
> sh:
>  -  mach-x3proto: Add missing #include <linux/gpio/driver.h>
>
> tangier:
>  -  Introduce Intel Tangier GPIO driver
>
> ----------------------------------------------------------------
> Andrew Davis (1):
>       gpio: ich: Use devm_gpiochip_add_data() to simplify remove path
>
> Andy Shevchenko (5):
>       gpio: merrifield: Use dev_err_probe()
>       gpio: merrifield: Utilise temporary variable for struct device
>       powerpc/40x: Add missing select OF_GPIO_MM_GPIOCHIP
>       gpio: mm-lantiq: Fix typo in the newly added header filename
>       gpiolib: acpi: Move ACPI device NULL check to acpi_get_driver_gpio_data()
>
> Arnd Bergmann (1):
>       mips: ar7: include linux/gpio/driver.h
>
> Benjamin Tissoires (1):
>       gpiolib: acpi: use the fwnode in acpi_gpiochip_find()
>
> Geert Uytterhoeven (1):
>       sh: mach-x3proto: Add missing #include <linux/gpio/driver.h>
>
> Pandith N (3):
>       gpio: tangier: Introduce Intel Tangier GPIO driver
>       gpio: merrifield: Adapt to Intel Tangier GPIO driver
>       gpio: elkhartlake: Introduce Intel Elkhart Lake PSE GPIO
>
> Werner Sembach (1):
>       gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xNU
>
>  MAINTAINERS                         |   2 +
>  arch/mips/ar7/gpio.c                |   2 +-
>  arch/powerpc/platforms/40x/Kconfig  |   1 +
>  arch/sh/boards/mach-x3proto/setup.c |   2 +-
>  drivers/gpio/Kconfig                |  24 +-
>  drivers/gpio/Makefile               |   2 +
>  drivers/gpio/gpio-elkhartlake.c     |  90 ++++++
>  drivers/gpio/gpio-ich.c             |  10 +-
>  drivers/gpio/gpio-merrifield.c      | 453 +++---------------------------
>  drivers/gpio/gpio-mm-lantiq.c       |   2 +-
>  drivers/gpio/gpio-tangier.c         | 536 ++++++++++++++++++++++++++++++++++++
>  drivers/gpio/gpio-tangier.h         | 117 ++++++++
>  drivers/gpio/gpiolib-acpi.c         |  26 +-
>  13 files changed, 825 insertions(+), 442 deletions(-)
>  create mode 100644 drivers/gpio/gpio-elkhartlake.c
>  create mode 100644 drivers/gpio/gpio-tangier.c
>  create mode 100644 drivers/gpio/gpio-tangier.h
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Pulled, thanks!

Bart

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox