drivers/i2c: Pass in i2c_generic_config into i2c_generic_fill_ssdt

Remove any assumptions required for the drivers using i2c_generic to
have drivers_i2c_generic_config structure at the start of the driver
config. Instead pass in a pointer to drivers_i2c_generic_config from
the calling driver.

Change-Id: I51dc4cad1c1f246b51891abf7115a7120e87b098
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17857
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Furquan Shaikh
2016-12-13 21:50:32 -08:00
committed by Duncan Laurie
parent e34c16f915
commit fdc1b2e6b4
4 changed files with 13 additions and 9 deletions

View File

@ -57,11 +57,13 @@ struct drivers_i2c_generic_config {
* properties. Callback can be provided to fill in any
* device-specific information in SSDT.
*
* Drivers calling into this function to generate should place
* drivers_i2c_generic_config structure at the beginning of their device config
* structure.
* Parameters:
* dev: Device requesting i2c generic information to be filled
* callback: Callback to fill in device-specific information
* config: Pointer to drivers_i2c_generic_config structure
*/
void i2c_generic_fill_ssdt(struct device *dev,
void (*callback)(struct device *dev));
void (*callback)(struct device *dev),
struct drivers_i2c_generic_config *config);
#endif /* __I2C_GENERIC_CHIP_H__ */