Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751270AbdFBGhs (ORCPT ); Fri, 2 Jun 2017 02:37:48 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:35606 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbdFBGhp (ORCPT ); Fri, 2 Jun 2017 02:37:45 -0400 MIME-Version: 1.0 From: Tim Harvey Date: Thu, 1 Jun 2017 23:37:43 -0700 Message-ID: Subject: regmap for i2c pages To: "linux-kernel@vger.kernel.org" , linux-media , Mark Brown Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 770 Lines: 17 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