Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2537153rwl; Thu, 13 Apr 2023 07:45:09 -0700 (PDT) X-Google-Smtp-Source: AKy350bSFr5XwjPs0D4wobEOQzUiWHRJWyctFztxiLX4zaeV8256RDC0uO1gkAY2DFcZRWImO/Dn X-Received: by 2002:a17:90a:468c:b0:244:ae65:8a8d with SMTP id z12-20020a17090a468c00b00244ae658a8dmr2416686pjf.31.1681397108942; Thu, 13 Apr 2023 07:45:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681397108; cv=none; d=google.com; s=arc-20160816; b=Cza7z1acdXDMamMCwFALLDgEFayRSmfAUfrGKvMNHp8017jsrPbgPloSjxbWVYfKHR 2yvF7eFezbDkszzcmKJfqEHwbXTQrEsgDoiROUMV+S8utcrD/nIk7gY0ICjPR/5hUN/+ 1JQe5Is/5JqOKHYx8mtoA9Hk5wYVRJv1eOCaQEiiLHxMhDLXFUwTPFNXxwIj02Durjq8 20ORO6FOigpvqq3n+HqulKRnybihN0xMr4wjIjoN8Xu2CqlYaTpmhQYsoE4YIBI7B3Kw y6/IRFf9vQx7IdGcMuCciVtYBxkXFpn9E0bbYZk06k6mf+gzsZWb6Yu3FDsh42tVhssi eUVQ== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=EOEz3AcKRLNIsRiC1VQJ7UUhN+DnVClixWyNnz405l8=; b=Ln/66MxkXlqpptrOQ/JITul4MjnB3/TLELUhR/xhKLL7h2LwyvGppaiYt4VFjDqu0e JOWs9+Gsp0uxH84w5zudUPdzNlSr/0zp7CP+Iu9RQW01FIFoiBlIrmSvY0xCPC1AdR3B Iz+T26cdG3U2gO9ibYBtIxUj+XcU8E6Uk6U2LTMlell+LEwZhGCQ1HfeJc2g7MMYH4Zh MSGzqVEQQ3N2FxKKlPoRlANazyc9tLNLnJqoRe1FuAVzAnQKyLGi9PpL3YJMbhX/sYFb K5WFp5y4IosR2MsrKZHPnBfMQf1fH92Mu69CHU7jek/umV3VU5TL/Yvu8MMS8PoBb+1X Z7vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UhBdwZhp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u15-20020a17090a2b8f00b00233866f90e3si4796238pjd.125.2023.04.13.07.44.57; Thu, 13 Apr 2023 07:45:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UhBdwZhp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229878AbjDMOoF (ORCPT + 99 others); Thu, 13 Apr 2023 10:44:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjDMOoB (ORCPT ); Thu, 13 Apr 2023 10:44:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12A785260 for ; Thu, 13 Apr 2023 07:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681397000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EOEz3AcKRLNIsRiC1VQJ7UUhN+DnVClixWyNnz405l8=; b=UhBdwZhp468YMgD5kfHa2YjDY0GzhUe0EjgJwINLb/aVHWAAPqHZTrpVa49HLpZRBUS9Wd n82jplYaGiNNhb3hlnrReIbU0F19yRALHRQwlxF4U/N2YRF1nh+KpPNSfnKNkkzJpXr8Vt CBhXFOAnPfnQ76ArwD85ODqHAz+Thic= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-453-QTNC2kVkMMS4JGdOhRkg3g-1; Thu, 13 Apr 2023 10:43:18 -0400 X-MC-Unique: QTNC2kVkMMS4JGdOhRkg3g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7AFB185A5B1; Thu, 13 Apr 2023 14:43:18 +0000 (UTC) Received: from plouf.local (unknown [10.45.224.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DF5D40B3EDA; Thu, 13 Apr 2023 14:43:17 +0000 (UTC) From: Benjamin Tissoires To: gupt21@gmail.com, jikos@kernel.org, Louis Morhet Cc: linux-i2c@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: Subject: Re: [PATCH 0/2] Fixes for the mcp2221 gpiochip get_* calls Message-Id: <168139699700.841342.7338433386549146014.b4-ty@redhat.com> Date: Thu, 13 Apr 2023 16:43:17 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 04 Apr 2023 14:14:58 +0200, Louis Morhet wrote: > 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. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git (for-6.4/mcp2221), thanks! [1/2] HID: mcp2221: fix report layout for gpio get https://git.kernel.org/hid/hid/c/e36c31f8cac5 [2/2] HID: mcp2221: fix get and get_direction for gpio https://git.kernel.org/hid/hid/c/ca6961d8a851 Cheers, -- Benjamin Tissoires