aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/maxim/max77686/max77686.h
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2013-04-05 16:11:12 -0700
committerRonald G. Minnich <rminnich@gmail.com>2013-04-10 00:01:02 +0200
commitb959fbb87adb274b442bc6ab812e5a2ce92ca220 (patch)
tree9d055eb9126f50e5c72ab8bdcbe6c8efa4bceb51 /src/drivers/maxim/max77686/max77686.h
parentcfb73607be05e57237592c5c94a98589aba04833 (diff)
exynos5: Re-factor I2C code
This re-factors the Exynos5 I2C code to be simpler and use the new API, and updates users accordingly. - i2c_read() and i2c_write() functions updated to take bus number as an argument. - Get rid of the EEPROM_ADDR_OVERFLOW stuff in i2c_read() and i2c_write(). If a chip needs special handling we should take care of it elsewhere, not in every low-level i2c driver. - All the confusing bus config functions eliminated. No more i2c_set_early_config() or i2c_set_bus() or i2c_get_bus(). All this is handled automatically when the caller does a transaction and specifies the desired bus number. - i2c_probe() eliminated. We're not a command-line utility. - Let the compiler place static variables automatically. We don't need any of this fancy manual data placement. - Remove dead code while we're at it. This stuff was ported early on and much of it was left commented out in case we needed it. Some also includes nested macros which caused gcc to complain. - Clean up #includes (no more common.h, woohoo!), replace debug() with printk(). Change-Id: I8e1f974ea4c6c7db9f33b77bbc4fb16008ed0d2a Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/3044 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/drivers/maxim/max77686/max77686.h')
-rw-r--r--src/drivers/maxim/max77686/max77686.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/drivers/maxim/max77686/max77686.h b/src/drivers/maxim/max77686/max77686.h
index ee53e27a81..cebd2d9a1c 100644
--- a/src/drivers/maxim/max77686/max77686.h
+++ b/src/drivers/maxim/max77686/max77686.h
@@ -105,13 +105,16 @@ enum {
/**
* This function enables the 32KHz coprocessor clock.
*
+ * @param bus i2c bus
+ *
* Return 0 if ok, else -1
*/
-int max77686_enable_32khz_cp(void);
+int max77686_enable_32khz_cp(unsigned int bus);
/**
* Set the required voltage level of pmic
*
+ * @param bus i2c bus
* @param reg register number of buck/ldo to be set
* @param volt voltage level to be set
* @param enable enable or disable bit
@@ -120,14 +123,16 @@ int max77686_enable_32khz_cp(void);
*
* @return Return 0 if ok, else -1
*/
-int max77686_volsetting(enum max77686_regnum reg, unsigned int volt,
- int enable, int volt_units);
+int max77686_volsetting(unsigned int bus, enum max77686_regnum reg,
+ unsigned int volt, int enable, int volt_units);
/**
* Disable charging of the RTC backup battery
*
+ * @param bus i2c bus
+ *
* @return Return 0 if ok, else -1
*/
-int max77686_disable_backup_batt(void);
+int max77686_disable_backup_batt(unsigned int bus);
#endif /* __MAX77686_PMIC_H_ */