From mboxrd@z Thu Jan 1 00:00:00 1970 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 A2C79C433EF for ; Thu, 16 Jun 2022 13:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376688AbiFPN1h (ORCPT ); Thu, 16 Jun 2022 09:27:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231148AbiFPN1g (ORCPT ); Thu, 16 Jun 2022 09:27:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2449DEDA; Thu, 16 Jun 2022 06:27:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 751D6B8241A; Thu, 16 Jun 2022 13:27:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 307CFC34114; Thu, 16 Jun 2022 13:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655386049; bh=g8aX8KHRrajIVWtUv/m2vLhGkwcpEqPjNJB44iCRIjw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XxH5XNn/GflcHJla2KSo8uqZAf5OIfjaVv2jJ81t+sEJ2bwC0DGZeSN40U/RB6hSx vs4gJb8uOeiCtY/hvUN17LUZy60c9f5PdxLvgq0LLQAqrYIApMUg1LgZkcjihqUQRE BL+k8V/w6HyKYKMMH9Q6ucWZ1Q5wjFibGNgoTRg26gDwO1WkB3qKBEEriijAz/ejck lsRxqiEUOhv5kJsMIWUvFs3ocax5QDO1zYXoIoJx2SEXD/lT3yghkgly+uLN5sz8Jj aMpV6rhFqgrdSGzuYOhrh6SLCqCaYaJUvEUxppJ2SM+wEX9aG82VwIbvjeqX6k64Av Hm2+1nW78k6sg== Date: Thu, 16 Jun 2022 14:27:24 +0100 From: Mark Brown To: Andy Shevchenko Cc: William Breathitt Gray , Jonathan Cameron , Lars-Peter Clausen , linux-iio , Linux Kernel Mailing List Subject: Re: [PATCH 1/2] iio: adc: stx104: Implement and utilize register structures Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="80ui2G9wDKtNFotX" Content-Disposition: inline In-Reply-To: X-Cookie: Pass with care. Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org --80ui2G9wDKtNFotX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 15, 2022 at 02:43:27PM +0200, Andy Shevchenko wrote: > On Wed, Jun 15, 2022 at 2:19 PM William Breathitt Gray > > On Wed, Jun 15, 2022 at 02:00:26PM +0200, Andy Shevchenko wrote: > > > I just realized that this driver is for the old PC104 (like?) hardware > > > that most likely uses IO ports, I don't remember if we have support > > > for IO ports in regmap (MMIO -- yes for sure). > > Hmm, I don't see IO ports mentioned in include/linux/regmap.h, so I > > don't think the regmap API directly supports it (maybe someone familiar > > with regmap knows). Although we do get a virtual mapping cookie via > > ioport_map() in this driver, I don't know if we can pass that to the > > regmap functions and have it actually work. > The problem is with accessors which are inconsistent in regmap MMIO > implementation. I think it should be converted to use > ioreadXX()/iowriteXX() in all cases (currently only BE cases use > them). Another variant is to provide read*_be() / write*_be() for all > architectures, replace corresponding ops in regmap MMIO and introduce > regmap IO with inX()/outX. The former seems to me the best option, > while the latter is cleaner. I don't know what driver this is, but yes someone would have to add ioport support to use them with regmap. --80ui2G9wDKtNFotX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmKrL7wACgkQJNaLcl1U h9CDMgf8D77XkxBr9XTpl8qt4wypS4p9F2jlJkZr83OC6+eHrQL1zY/cs7b3txF8 KBF1fO+KIvNEwqTO2m7vCG5ubYIdAx/54UWswMnN4bfxHu8wyC7QHnj3CkYzECrV N1APoKVJ2HehY6ZufGcddB4YIyZmafkMThtiotn65A7EmvQuqR0ejBkpVVYhkA0Z CWnOnSthGI0J6khqb2OmcS2YpJZReMDCi9vhDJ8Bw7VHbZMLCl/sa9OEu5FGyOFD 3VUkKBQdUh0nDRP02qBoRlnrBmlGAS+uDuuo7zDMcmkAAW9JHxFtKPOjLbZ4y52R kpM1RcjkyWFAAj2kw6MC0pi7NFx6ZQ== =Osmx -----END PGP SIGNATURE----- --80ui2G9wDKtNFotX--