Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2062536rwl; Sun, 26 Mar 2023 15:07:32 -0700 (PDT) X-Google-Smtp-Source: AKy350asa7PEN22Iw1uMbN2xM6NSO0Jx4AwuCNEkE9m5ufORoqpI55B9ENRsL4LQkQzgmFCoK0MY X-Received: by 2002:a17:90b:1647:b0:236:73d5:82cf with SMTP id il7-20020a17090b164700b0023673d582cfmr10855085pjb.9.1679868452317; Sun, 26 Mar 2023 15:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679868452; cv=none; d=google.com; s=arc-20160816; b=HpE5Wg5w24wzMC0EDCNHf7Ma+b5hRajbZKPD4z7vcTCu1t0RWl3j8pQja8h1h0ezjO pHPhxINqnD7U6QSdgYuiQGEDr8u9d8FKAdUzV503kalEpxXG0b7X58h9x6+C5Ll7El1L Qs8/8kg5cyllQsQdkLnim4etk6GMNk5jihuXMXqP2xlFkRdC73oZfphw0lIsFoT34gbd wtfFgu/Sg0WStcRUwpjunw5R5PxbD0Op+b11rJ8UYAPdZw88YZMJYj7v8lrxkbK8SNvV N8CF9AOX1Mu4xQFsfsfboF4jT7GeHHTIBvh6oRu1sdhufRKeAyY9X1tSOzQhCuymIz6+ +o+g== 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:dkim-signature; bh=DXiSJ7wBXq/4T1LMMz36pZlbBBVWNt83xm/Cv55ylqw=; b=jWIZQLPuqQ+zkMyAFWI1pgnW4caz3UFRo1oW5oX+7k9drsALWUqCeg482zAagF1qs9 ojuP/3HYonHgD0l28cvA/Ze601usBpSYgsPPXkJYxhVRwOzB4YuZ2rY0xTIJ/xkaTifH bmfyerubgdxu7MTixzDrY1eQ5yq1poUtj/U48E3ZgIpwKsvvzu6EI5kY8KvMi/Nhf6a1 6Zm24DD11nNBNUny+Bq4JTr/+2W19IUwLRU9lEoLj3MT/rdhUhmWwiIkmrbegFkaEKNL epqbG0D5vokUwieodKyw+7Q3HyDSNA3OWqK6GXvffB2ObEzIJnCZqmA2tz4JdwJOjlBt VMyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wXyTxdMV; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a17090a5d8c00b0022bb6a9677csi9017986pji.35.2023.03.26.15.07.21; Sun, 26 Mar 2023 15:07:32 -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=@linaro.org header.s=google header.b=wXyTxdMV; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjCZWGO (ORCPT + 99 others); Sun, 26 Mar 2023 18:06:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbjCZWGM (ORCPT ); Sun, 26 Mar 2023 18:06:12 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E39D5B94 for ; Sun, 26 Mar 2023 15:06:11 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id w133so5033868oib.1 for ; Sun, 26 Mar 2023 15:06:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679868370; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DXiSJ7wBXq/4T1LMMz36pZlbBBVWNt83xm/Cv55ylqw=; b=wXyTxdMVTS8KjcfegNn8UAkXSQgoOOYwT3LHMhxwRM7GhGPauzAltWsT4Vn1UJm01E o01qVCbHpO41EJENGv/+36M7Xp+jvaXqQTTdxJki1+kzTQoMiEk8orCG5gPCKYa8cVsD WRsSTHbC+n0XOcxmIV04eRMl4H29VdOE2ucGPwEZT/0hUJuBufDH5JYEGxyUNRLKnoN6 K390zpudbM178CGuOM0Nve9bjBzzMBE0Fo6q+z0jyP4WsDOAD2BIvKQx6jj0dW/IEoWQ L0N69GT2AMHYia3B5mBNYp7xb8RtXwjaqmU5x8wKvFK1/KuwnXhVatOzjgkDmACIUTJ5 wEeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679868370; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DXiSJ7wBXq/4T1LMMz36pZlbBBVWNt83xm/Cv55ylqw=; b=OrFpZV3RodOxbaSMy43ivJtGc+dmnN9t4hlY5RkfYDnjRweHb8VHQfvFTuNBRMlcu2 gWsRBoZK/7iMhmqkqqWrOa08CcfI+b9Pw58PleVcqYRZrRghV1qGWW8hM221jOxqciD4 9TFwnSJgzcyLkHgJARFnTLpThIhUABxB5UUgAHHzgIBAR7IsiRUBB9Sx9JbjARa1rGSt RRcHbbWTNED9sY+DTPByq4F5ZpB+Pcnn4gJwt5YYpKhPyd5FhxDo04TV8gtFMcppzRzP 2E4UE6fDfQnqUeHkwofST+/Bz5g7GSdI8vBTxoRlZO2cJ3KdmggjpizYH+CDerKBcBfz yqLQ== X-Gm-Message-State: AO0yUKWI3OJ86O6eJZGm71ZPku8s5ATL/9K7iedZkZxvYb1TBc4BI2pi +7z9Umjd+C80jsiiT6NJezvl3w== X-Received: by 2002:a54:4d99:0:b0:387:1e85:d1ae with SMTP id y25-20020a544d99000000b003871e85d1aemr4011199oix.18.1679868370301; Sun, 26 Mar 2023 15:06:10 -0700 (PDT) Received: from fedora.attlocal.net (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id o187-20020acaf0c4000000b0038476262f65sm10593744oih.33.2023.03.26.15.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 15:06:09 -0700 (PDT) From: William Breathitt Gray To: Jonathan Cameron , Lars-Peter Clausen Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray Subject: [PATCH v3 0/2] Migrate STX104 to the regmap API Date: Sun, 26 Mar 2023 18:05:56 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Changes in v3: - Add STX104_ prefixes to defines to avoid potential name classes - Rename SAME_CHANNEL() to STX104_SINGLE_CHANNEL() to convey intention better - Utilize u8_encode_bits() to define STX104_SOFTWARE_TRIGGER - Adjust to utilize reg_base members in regmap_config structures - Fix off-by-one errors in aio_data_wr_ranges[], aio_data_rd_ranges[], and aio_data_regmap_config max_register - Inline gpio_config initialization to avoid zeroing it at declaration - Add blank lines between register map init blocks for clarity - Utilize regmap_read_poll_timeout() for ADC conversion status poll Changes in v2: - Relocate struct stx104_iio for the sake of a clearer patch diff - Replace FIELD_PREP() and FIELD_GET() with u8_encode_bits() and u8_get_bits() The regmap API supports IO port accessors so we can take advantage of regmap abstractions rather than handling access to the device registers directly in the driver. A patch to utilize regmap_read_poll_timeout() for polling the ADC conversion status is included as follow-up to make the git history clearer for this change. William Breathitt Gray (2): iio: addac: stx104: Migrate to the regmap API iio: addac: stx104: Use regmap_read_poll_timeout() for conversion poll drivers/iio/addac/Kconfig | 2 + drivers/iio/addac/stx104.c | 434 +++++++++++++++++++++---------------- 2 files changed, 244 insertions(+), 192 deletions(-) base-commit: 46e33707fe95a21aa9896bded0be97285b779509 -- 2.39.2