diff options
author | venu byravarasu <vbyravarasu@nvidia.com> | 2011-12-14 16:39:58 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-21 12:06:22 +0530 |
commit | 344518620f0a8308be971486d1daafa39dd41b5b (patch) | |
tree | 058e811b3c2a8fb575c52cb39a5363223bc16433 | |
parent | 5deba1d3911c7e25ba1d97a80d3ca6c70f73e9db (diff) |
mfd: ricoh583: update API prototype
With this commit below changes to ricoh583 MFD are done:
1. Updating cache copy of int enable register.
2. Changing the prototypes for bulk read & write APIs.
3. Updating rtc platform data structure.
bug 902137
Change-Id: I616d86628addaaa04f3faec035120bd6f9569603
Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com>
Reviewed-on: http://git-master/r/70010
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
-rw-r--r-- | drivers/mfd/ricoh583.c | 6 | ||||
-rw-r--r-- | include/linux/mfd/ricoh583.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mfd/ricoh583.c b/drivers/mfd/ricoh583.c index 97070517e5e9..a29053ebaf86 100644 --- a/drivers/mfd/ricoh583.c +++ b/drivers/mfd/ricoh583.c @@ -309,7 +309,7 @@ int ricoh583_write(struct device *dev, u8 reg, uint8_t val) } EXPORT_SYMBOL_GPL(ricoh583_write); -int ricoh583_bulk_writes(struct device *dev, u8 reg, int len, uint8_t *val) +int ricoh583_bulk_writes(struct device *dev, u8 reg, u8 len, uint8_t *val) { struct ricoh583 *ricoh583 = dev_get_drvdata(dev); int ret = 0; @@ -328,7 +328,7 @@ int ricoh583_read(struct device *dev, u8 reg, uint8_t *val) } EXPORT_SYMBOL_GPL(ricoh583_read); -int ricoh583_bulk_reads(struct device *dev, u8 reg, int len, uint8_t *val) +int ricoh583_bulk_reads(struct device *dev, u8 reg, u8 len, uint8_t *val) { return __ricoh583_bulk_reads(to_i2c_client(dev), reg, len, val); } @@ -750,7 +750,7 @@ static void ricoh583_irq_sync_unlock(struct irq_data *irq_data) if (ricoh583->intc_inten_reg != ricoh583->intc_inten_cache) { if (!WARN_ON(__ricoh583_write(ricoh583->client, RICOH583_INTC_INTEN, ricoh583->intc_inten_reg))) - ricoh583->intc_inten_reg = ricoh583->intc_inten_cache; + ricoh583->intc_inten_cache = ricoh583->intc_inten_reg; } mutex_unlock(&ricoh583->irq_lock); diff --git a/include/linux/mfd/ricoh583.h b/include/linux/mfd/ricoh583.h index 086cbff5eefb..4e38cded0fa5 100644 --- a/include/linux/mfd/ricoh583.h +++ b/include/linux/mfd/ricoh583.h @@ -23,6 +23,7 @@ #ifndef __LINUX_MFD_RICOH583_H #define __LINUX_MFD_RICOH583_H +#include <linux/rtc.h> /* RICOH583 IRQ definitions */ enum { RICOH583_IRQ_ONKEY, @@ -123,6 +124,7 @@ struct ricoh583_subdev_info { struct ricoh583_rtc_platform_data { int irq; + struct rtc_time time; }; struct ricoh583_gpio_init_data { @@ -144,10 +146,10 @@ struct ricoh583_platform_data { }; extern int ricoh583_read(struct device *dev, uint8_t reg, uint8_t *val); -extern int ricoh583_bulk_read(struct device *dev, u8 reg, u8 count, +extern int ricoh583_bulk_reads(struct device *dev, u8 reg, u8 count, uint8_t *val); extern int ricoh583_write(struct device *dev, u8 reg, uint8_t val); -extern int ricoh583_bulk_write(struct device *dev, u8 reg, u8 count, +extern int ricoh583_bulk_writes(struct device *dev, u8 reg, u8 count, uint8_t *val); extern int ricoh583_set_bits(struct device *dev, u8 reg, uint8_t bit_mask); extern int ricoh583_clr_bits(struct device *dev, u8 reg, uint8_t bit_mask); |