Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp990381rwl; Fri, 24 Mar 2023 05:00:56 -0700 (PDT) X-Google-Smtp-Source: AKy350YTRPvl1HrlbuXsAR4VqXSn7FFRx2dgS2nERqDvSSCva1rS/HjRKyk5QM6U8KuGr9rb2NEP X-Received: by 2002:a17:906:b28c:b0:931:baf:259 with SMTP id q12-20020a170906b28c00b009310baf0259mr2860018ejz.63.1679659255829; Fri, 24 Mar 2023 05:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679659255; cv=none; d=google.com; s=arc-20160816; b=jTPX9bDC2pGdeVortvtMiiht/rW/b8fxmPtph0BphTd1oeOu7YBhUcBfB7QcCKRKPI M4s6OCow20JSgMuoaODJneRMh/iUiRCOYnZFcd4mCy/VdeivydrIVTMUooUuGGeJfqIU tGzU5lMTWo6DCl13U/I06uLATnMNfweQMVch1i1ipLYoFHD7VeIw1kqUzgrufl4mJq7o y5bdICY8saG0gjwfZft0T3n1LqRTvR8lpqq2II60q5afW4K3gTmlYjHs9yx9OqztrFtd ivPDQS/fVq8d2zhleuE3CwJFjM/l2okX4JW0Lpt2/cMeWyccIblNfL01X8Dpyc9W34J7 7r4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nHkKobjAceAWcV50gWKiQwkvQxBy5F9PvAjxg9YaDu4=; b=i86INZ8+611FtKjvSNpSKTn24V9nLNcXtgc0ljSiAoOOD42mHCM41qU+ux436FyGoS UC9VTNkxFD3p/IqRrvdVfrLM9XGY2sRxev1MT331bOB/DEMAMIMEweae602wFqsLFztx ozzhJaLSM9VwMgzp3gCioKRF73AeMreU32ZOoo/E2STQH0vE2FjqnKLF7+YlcOqwLZa7 3dGA9PJwdu5ZWS4Z728QLDym2S0b1+amMHS6uoTOVaQGTgXCpjVyHr6zknha4Koc4m4T Ka0yIx2Kli+rKPUs5/EEk1EI2KuiJyid0xuvE7F6N0gHWCjoAgt8Afc2QFixl+KgG2o8 v9NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JZK3T1sK; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca23-20020aa7cd77000000b004cdc92cc419si20334129edb.11.2023.03.24.05.00.28; Fri, 24 Mar 2023 05:00:55 -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=@intel.com header.s=Intel header.b=JZK3T1sK; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231707AbjCXLsz (ORCPT + 99 others); Fri, 24 Mar 2023 07:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230021AbjCXLss (ORCPT ); Fri, 24 Mar 2023 07:48:48 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A800272D; Fri, 24 Mar 2023 04:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679658527; x=1711194527; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Agnq49hm9Z5LVKQlvI7cyxmsUfGXQDYTkHF95rmm7IM=; b=JZK3T1sKvALC1YRoxEz4qHWky/81ET0/VfG5x3QmPafbLfNw1Zu5/2vG TJe37ODdjOfapjQ3NiMb78NpvyHaaittCr/Wz47j/4oyoVHCRq7CIVOuv F1EvyZGq2YYpqi8TA7mYM99+iKhL4Vho3CP+1RxWogl+g9QVJ1DIPJKpx u8lslCtsDxlUkAIAMPM5GIxxa8ARdqzjBASinmZQo5p3f2OZX9EtYOdIP +eAD/vuEpa/j/d6AySyoRn5p/e5bVsPl4I9AQcYGC0pvMdzYc8oLlp2am 5pq64gdUSVWp4KsIIJJTUMSTMsF1end2vB9NgQKHy5nx9a/TyyLCoxSTz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="320152546" X-IronPort-AV: E=Sophos;i="5.98,287,1673942400"; d="scan'208";a="320152546" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2023 04:48:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="793411392" X-IronPort-AV: E=Sophos;i="5.98,287,1673942400"; d="scan'208";a="793411392" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP; 24 Mar 2023 04:48:45 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pffuV-007t0P-2b; Fri, 24 Mar 2023 13:48:43 +0200 Date: Fri, 24 Mar 2023 13:48:43 +0200 From: Andy Shevchenko To: William Breathitt Gray Cc: linux-iio@vger.kernel.org, Johannes Berg , Jonathan Cameron , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] counter: 104-quad-8: Refactor to buffer states for CMR, IOR, and IDR Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 On Thu, Mar 23, 2023 at 05:25:28PM -0400, William Breathitt Gray wrote: > The 104-quad-8 driver buffers the device configuration states > separately, however each device has only three control registers: CMR, > IOR, and IDR. Refactoring to buffer the states of these control > registers rather than each configuration separately results in succinct > code that more closely matches what is happening on the device. ... > +static void quad8_control_register_update(struct quad8 *const priv, u8 *const buf, > + const size_t channel, const u8 val, const u8 field) > +{ > + u8p_replace_bits(&buf[channel], val, field); > + iowrite8(buf[channel], &priv->reg->channel[channel].control); > +} How did you compile this? Due to nature of *_replace_bits() this may only be a macro. That's what LKP is telling about I think. -- With Best Regards, Andy Shevchenko