Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4674304rwb; Wed, 17 Aug 2022 04:22:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR4jQQgwBewstByZ/9gPxPplFWDjn+HUOKRNeK1NX1nAndCEFFt0ECsLV70y0rtu+cUyfcrf X-Received: by 2002:aa7:c3d1:0:b0:43c:c713:fac8 with SMTP id l17-20020aa7c3d1000000b0043cc713fac8mr22913158edr.371.1660735328005; Wed, 17 Aug 2022 04:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660735327; cv=none; d=google.com; s=arc-20160816; b=kVMxp5Hb+dSy2Gb/91iWPcMn88aqr2BtQHQlE0x7FGeG9S/RktLXVOFSdU+uIUqzkO Po+bdZOUEdOw1frQCHWgHSYVq8Dqs+2v+2OtZp6gbdO/0Epi95+3R0krB0JTIfgwXPTZ 76nCi4h6C/+fUzKraPTI/x7bf0L4WfYLD8GBqTYp7SF6zSDCzuyTiJf7RWvQ35IqMTiS pawEzp1xZA7uxhoKIPxwvunPQ/CUjNkHlr34CCZZHIW2Dr82GggEfGRyw0kOjMGMgfVQ HfxtEs63avQjEx/V+Uo/e4w8snPVsvR3B2zkWLxbBfLoBYCPvHxoKg+mwW5lUsiTTGXU 777Q== 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=v8rzkERyNnrBEUOZlDTXhxtihWVgwT8e0z4pCPe+tmc=; b=UHdX2g3gBHNFswcw24YFC6fUuUGIr1ZBUQtaNQf7DaNMbo6MuFJa1kCcmEUuJPS3JK 2T/Y7T/+j8o6aHoDSY3IRiR6kF09Eezhs5yXY9CjQbdEluwm72PFewdsnIUH6hywjUiA bsGbQEV1vYndETSlmTM3uWlXenGJq7tIZnVYnwQfqq9ds1FvznrHIPFwLATFElJP5LXK SUom/QO+fU1jXlMgv9+KRgGixfSSY3BppBnAnTXMkz3E15Wo/F1KOkHd5rr1hptmq1mz 6JRKxpWt5gB4TU1RxWcIQwNJAPB4zK9psmuX1HNSO2xLxRwNEh9IiuDo7kq+e0awC3Ig czgQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu8-20020a170907a08800b006feb18c72bfsi11957343ejc.126.2022.08.17.04.21.42; Wed, 17 Aug 2022 04:22:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239028AbiHQK5W (ORCPT + 99 others); Wed, 17 Aug 2022 06:57:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238358AbiHQK5U (ORCPT ); Wed, 17 Aug 2022 06:57:20 -0400 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [IPv6:2001:4b98:dc4:8::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD9C863F10; Wed, 17 Aug 2022 03:57:18 -0700 (PDT) Received: (Authenticated sender: contact@artur-rojek.eu) by mail.gandi.net (Postfix) with ESMTPSA id 64194200002; Wed, 17 Aug 2022 10:57:15 +0000 (UTC) From: Artur Rojek To: Paul Cercueil , Jonathan Cameron , Dmitry Torokhov , Chris Morgan Cc: linux-mips@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Artur Rojek Subject: [PATCH 0/4] iio/adc-joystick: buffer data parsing fixes Date: Wed, 17 Aug 2022 12:56:39 +0200 Message-Id: <20220817105643.95710-1-contact@artur-rojek.eu> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi all, this patch set fixes the way channel data is being parsed in the adc-joystick driver. To achieve that, it also introduces helpers in the IIO subsystem. As a side effect of those changes, a bug in ingenic-adc has been exposed, which this patch set promptly rectifies. Tested on GCW Zero (by me) and on Anbernic RG350 (by Paul). Chris: As you have originally reported the issue, would you be able to test the above changes on your setup (Odroid Go Advance, was it)? Artur Rojek (4): iio/adc: ingenic: fix channel offsets in buffer iio: add iio_channel_cb_get_iio_buffer helper iio: add helper function for reading channel offset in buffer input: joystick: Fix buffer data parsing drivers/iio/adc/ingenic-adc.c | 7 +++--- drivers/iio/buffer/industrialio-buffer-cb.c | 7 ++++++ drivers/iio/industrialio-buffer.c | 28 +++++++++++++++++++++ drivers/input/joystick/adc-joystick.c | 26 ++++++++++++------- include/linux/iio/buffer.h | 4 +++ include/linux/iio/consumer.h | 12 +++++++++ 6 files changed, 71 insertions(+), 13 deletions(-) -- 2.37.2