lkml.org 
[lkml]   [2012]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectLinux 3.4-rc2 register mapping and paging on I2C device.
From
Hello Mark,

I need to implement a I2C MFD driver that requires register page
switching. It is not supported by regmap currently and requires
additional effort to make it clean. What is the best (most clean) way
of implementing a driver with register page switching?

I have come up with few alternatives:
1. Write the driver without regmap, with separate I2C routines.
2. After a call to devm_regmap_init_i2c(), exchange regmap.bus.read,
regmap.bus.write and regmap.bus.gather_write with specific handlers
(supporting register page switching). Those handlers would call
original I2C bus handlers indirectly, by passing altered registers.
3. Update regmap API to enable support for register page switching.

Let me know what you think,

many thanks,

Krystian


\
 
 \ /
  Last update: 2012-04-30 19:41    [W:0.140 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site