i2c: stub: Add support for banked register ranges
authorJean Delvare <jdelvare@suse.de>
Thu, 10 Jul 2014 10:56:59 +0000 (12:56 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 17 Jul 2014 17:56:15 +0000 (19:56 +0200)
commit2408c17fce9236d929b15a975cbd8129de089d62
tree1c2c69fbba6554fe59d8dbd947aa378892990f7a
parent1dff59831b2b78122a883f44269be6597b378afa
i2c: stub: Add support for banked register ranges

Some chips implement banked register ranges. This allows implementing
more registers than the limited 8-bit address space originally allows.
In order to access a register on these chips, you must first select
the proper bank. Add support for this mechanism to the i2c-stub driver
so that such chips can be emulated. All the bank settings are passed
as module parameters.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Documentation/i2c/i2c-stub
drivers/i2c/i2c-stub.c