linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: Marek Vasut <marek.vasut@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"H. Nikolaus Schaller" <hns@goldelico.com>,
	linux-gpio@vger.kernel.org
Subject: Re: register access issues in pca953x gpio driver
Date: Fri, 27 Mar 2020 14:46:57 +0100	[thread overview]
Message-ID: <20200327134657.5yes5wh6c4u3nu54@pengutronix.de> (raw)
In-Reply-To: <20200327130321.GA4437@sirena.org.uk>

Hello Mark,

On Fri, Mar 27, 2020 at 01:03:21PM +0000, Mark Brown wrote:
> On Fri, Mar 27, 2020 at 08:49:22AM +0100, Uwe Kleine-König wrote:
> 
> > @broonie: I don't know regmap good enough to instantly know the right
> > magic to do this. Can you give a rough overview what would be needed?
> 
> If you want to dynamically change if the register is autoincrementing
> you're going to have to add stuff to regmap for that, it understands
> devices that autoincrement and devices that don't autoincrement but
> there's currently nothing for transitioning between the two.

I'm not entirely sure, but I think they all support autoincrementing but
some need the flag set and others don't. I imagine that this should be
modeled as register range [0-0x7f] (as AI = 0x80) and the accessor
callbacks have to set AI or not depending on the chip.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

  reply	other threads:[~2020-03-27 13:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27  7:49 register access issues in pca953x gpio driver Uwe Kleine-König
2020-03-27 10:26 ` Andy Shevchenko
2020-03-27 13:49   ` Uwe Kleine-König
2020-03-27 13:03 ` Mark Brown
2020-03-27 13:46   ` Uwe Kleine-König [this message]
2020-03-27 13:58     ` Mark Brown
2020-03-27 17:22 ` [PATCH v1 0/2] gpio: pca953x: fix handling of automatic address incrementing Uwe Kleine-König
2020-03-27 17:22   ` [PATCH v1 1/2] [RFC] " Uwe Kleine-König
2020-03-27 17:22   ` [PATCH v1 2/2] [RFC] gpio: pca953x: drop unused parameters of pca953x_recalc_addr() Uwe Kleine-König
2020-03-27 22:06     ` H. Nikolaus Schaller
2020-03-28  9:27       ` Uwe Kleine-König
2020-03-28 19:41         ` Andy Shevchenko
2020-03-30 14:07           ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200327134657.5yes5wh6c4u3nu54@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=hns@goldelico.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).