diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-13 18:37:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-13 18:37:28 -0700 |
commit | 91d85ea6786107aa2837bef3e957165ad7c8b823 (patch) | |
tree | c6100fd49a1c3d961998c3c89e706de4ceafb97e /drivers/hwmon/pmbus/lm25066.c | |
parent | 17987783e51555da22890feb715a0c84d4ed36aa (diff) | |
parent | 66a89b2164e2d30661edbd1953eacf0594d8203a (diff) |
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
hwmon: (ibmaem) add missing kfree
hwmon: (pmbus/lm25066) Ignore byte writes to non-zero pages
hwmon: (pmbus) Virtualize pmbus_write_byte
Diffstat (limited to 'drivers/hwmon/pmbus/lm25066.c')
-rw-r--r-- | drivers/hwmon/pmbus/lm25066.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c index d4bc114572d..ac254fba551 100644 --- a/drivers/hwmon/pmbus/lm25066.c +++ b/drivers/hwmon/pmbus/lm25066.c @@ -161,6 +161,17 @@ static int lm25066_write_word_data(struct i2c_client *client, int page, int reg, return ret; } +static int lm25066_write_byte(struct i2c_client *client, int page, u8 value) +{ + if (page > 1) + return -EINVAL; + + if (page == 0) + return pmbus_write_byte(client, 0, value); + + return 0; +} + static int lm25066_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -204,6 +215,7 @@ static int lm25066_probe(struct i2c_client *client, info->read_word_data = lm25066_read_word_data; info->write_word_data = lm25066_write_word_data; + info->write_byte = lm25066_write_byte; switch (id->driver_data) { case lm25066: |