linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* regmap for i2c pages
@ 2017-06-02  6:37 Tim Harvey
  2017-06-02 16:54 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Harvey @ 2017-06-02  6:37 UTC (permalink / raw)
  To: linux-kernel, linux-media, Mark Brown

I'm working on a driver for an i2c based media controller device that
uses pages. By that I mean there are several pages of 8bit registers
and a page-select register that holds the current page. Multiple
accesses to the same page can occur without writing to this page
register but if you want to access another page you need to update it.

I believe this is a very common i2c register mechanism but I'm not
clear what the best way to use i2c regmap for this is. I'm reading
that regmap 'handles register pages' but I'm not clear if that's the
same thing I'm looking for. If so, are there any examples of this? I
see several i2c drivers that reference pages but it looks to me that
each page is a different i2c slave address which is something
different.

Regards,

Tim

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: regmap for i2c pages
  2017-06-02  6:37 regmap for i2c pages Tim Harvey
@ 2017-06-02 16:54 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2017-06-02 16:54 UTC (permalink / raw)
  To: Tim Harvey; +Cc: linux-kernel, linux-media

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

On Thu, Jun 01, 2017 at 11:37:43PM -0700, Tim Harvey wrote:

> I believe this is a very common i2c register mechanism but I'm not
> clear what the best way to use i2c regmap for this is. I'm reading
> that regmap 'handles register pages' but I'm not clear if that's the
> same thing I'm looking for. If so, are there any examples of this? I
> see several i2c drivers that reference pages but it looks to me that
> each page is a different i2c slave address which is something
> different.

You're looking for regmap_range (search for window in regmap.h).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-02 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02  6:37 regmap for i2c pages Tim Harvey
2017-06-02 16:54 ` Mark Brown

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).