From patchwork Wed Jun 21 06:26:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Stark X-Patchwork-Id: 13286704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEF4AEB64D7 for ; Wed, 21 Jun 2023 06:27:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjFUG1i (ORCPT ); Wed, 21 Jun 2023 02:27:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbjFUG1h (ORCPT ); Wed, 21 Jun 2023 02:27:37 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A29F1A3; Tue, 20 Jun 2023 23:27:32 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id CCFDA5FD5E; Wed, 21 Jun 2023 09:27:29 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1687328849; bh=N2HRZnWuvFjvEElOdblUUvxZovm+tssABjlPdSEQ1WM=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=hN0tzJhH2qasFeA6SfHCf7pXBx6CYdMSBhCmy3P2KWknggaeJYEhHsLStd1QZ6uls YlY7D3nEDd/VBXC4oaqaC4hN6ZtxqT870i0f2l47VtClnpoM2O+oliKdQAH9kfDZ+I AHuNX+my6yiqGCW+fcztAMD3crBuEVtHciXbn0FLtRxVLqa/KJPtHPmwSuEGJ1lVQ5 2q3raK2F5PpUC7gP9mY4RR9YSCMKsO8UxBfIbPDOXbw2gz8rcGjpiA4wQFw+gXLj+5 JpypYdP8j2Ie/V3Jc6InZDvPPD0+E7XMOfilMQmTya6/6hOA5efRk6EEs+bNWysrqM m32OameZJ3d3w== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 21 Jun 2023 09:27:27 +0300 (MSK) From: George Stark To: , , , , , , , , CC: , , , , , George Stark Subject: [PATCH v1 0/3] meson saradc: add iio channels to read channel 7 mux inputs Date: Wed, 21 Jun 2023 09:26:07 +0300 Message-ID: <20230621062715.455652-1-gnstark@sberdevices.ru> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/20 23:30:00 #21539802 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: George Stark In meson saradc channel7 is connected to muxer which allows to measure inner sources like Vdd, GND, several Vdd dividers. This patch series adds independent iio channel (with label) for every chan7 mux input. Mux switch is handled transparent for clients. This functionality can help debug\test\calibrate adc. This code is relevant for all supported amlogic soc families This patch series was created after discussion [1], [2] [1] https://lore.kernel.org/lkml/20230524000111.14370-1-gnstark@sberdevices.ru/ [2] https://lore.kernel.org/lkml/20230527214854.126517-1-gnstark@sberdevices.ru/ George Stark (3): meson saradc: code refactoring meson saradc: add channel labels meson saradc: support reading from channel7 mux inputs drivers/iio/adc/meson_saradc.c | 165 +++++++++++++++++++++++---------- 1 file changed, 115 insertions(+), 50 deletions(-)