Linux 3.4-rc2 register mapping and paging on I2C device.

From: dd diasemi
Date: Mon Apr 30 2012 - 13:31:36 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/