diff options
Diffstat (limited to 'src/drivers/i2c')
-rw-r--r-- | src/drivers/i2c/adm1026/adm1026.c | 6 | ||||
-rw-r--r-- | src/drivers/i2c/adm1027/adm1027.c | 6 | ||||
-rw-r--r-- | src/drivers/i2c/adt7463/adt7463.c | 4 | ||||
-rw-r--r-- | src/drivers/i2c/at24rf08c/at24rf08c.c | 6 | ||||
-rw-r--r-- | src/drivers/i2c/at24rf08c/lenovo_serials.c | 14 | ||||
-rw-r--r-- | src/drivers/i2c/i2cmux/i2cmux.c | 4 | ||||
-rw-r--r-- | src/drivers/i2c/i2cmux2/i2cmux2.c | 4 | ||||
-rw-r--r-- | src/drivers/i2c/lm63/lm63.c | 4 | ||||
-rw-r--r-- | src/drivers/i2c/rtd2132/rtd2132.c | 24 | ||||
-rw-r--r-- | src/drivers/i2c/w83793/w83793.c | 18 | ||||
-rw-r--r-- | src/drivers/i2c/w83795/w83795.c | 6 |
11 files changed, 48 insertions, 48 deletions
diff --git a/src/drivers/i2c/adm1026/adm1026.c b/src/drivers/i2c/adm1026/adm1026.c index ab85eb56a6..e8baea1c40 100644 --- a/src/drivers/i2c/adm1026/adm1026.c +++ b/src/drivers/i2c/adm1026/adm1026.c @@ -19,7 +19,7 @@ #define ADM1026_REG_CONFIG2 0x01 #define ADM1026_REG_CONFIG3 0x07 -static void adm1026_enable_monitoring(device_t dev) +static void adm1026_enable_monitoring(struct device *dev) { int result; result = smbus_read_byte(dev, ADM1026_REG_CONFIG1); @@ -33,7 +33,7 @@ static void adm1026_enable_monitoring(device_t dev) } } -static void adm1026_init(device_t dev) +static void adm1026_init(struct device *dev) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { if (ops_smbus_bus(get_pbus_smbus(dev))) { @@ -44,7 +44,7 @@ static void adm1026_init(device_t dev) } } -static void adm1026_noop(device_t dummy) +static void adm1026_noop(struct device *dummy) { } diff --git a/src/drivers/i2c/adm1027/adm1027.c b/src/drivers/i2c/adm1027/adm1027.c index e83f2c44d0..9841c81954 100644 --- a/src/drivers/i2c/adm1027/adm1027.c +++ b/src/drivers/i2c/adm1027/adm1027.c @@ -18,7 +18,7 @@ #define ADM1027_REG_CONFIG2 0x73 #define ADM1027_REG_CONFIG3 0x78 -static void adm1027_enable_monitoring(device_t dev) +static void adm1027_enable_monitoring(struct device *dev) { int result; @@ -39,7 +39,7 @@ static void adm1027_enable_monitoring(device_t dev) printk(BIOS_DEBUG, "ADM1027: monitoring enabled\n"); } -static void adm1027_init(device_t dev) +static void adm1027_init(struct device *dev) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { if (ops_smbus_bus(get_pbus_smbus(dev))) { @@ -50,7 +50,7 @@ static void adm1027_init(device_t dev) } } -static void adm1027_noop(device_t dummy) +static void adm1027_noop(struct device *dummy) { } diff --git a/src/drivers/i2c/adt7463/adt7463.c b/src/drivers/i2c/adt7463/adt7463.c index 9ca9f37d4e..dd6d8372c3 100644 --- a/src/drivers/i2c/adt7463/adt7463.c +++ b/src/drivers/i2c/adt7463/adt7463.c @@ -32,7 +32,7 @@ * See Analog Devices ADT7463 datasheet, Rev C (2004): * http://www.analog.com/en/prod/0,,766_825_ADT7463,00.html */ -static void adt7463_init(device_t adt7463) +static void adt7463_init(struct device *adt7463) { int result; @@ -85,7 +85,7 @@ static void adt7463_init(device_t adt7463) printk(BIOS_DEBUG, "ADT7463 properly initialized\n"); } -static void adt7463_noop(device_t dummy) +static void adt7463_noop(struct device *dummy) { } diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c index a9cf2c5031..a03564f8db 100644 --- a/src/drivers/i2c/at24rf08c/at24rf08c.c +++ b/src/drivers/i2c/at24rf08c/at24rf08c.c @@ -25,7 +25,7 @@ #include <smbios.h> #include <console/console.h> -static void at24rf08c_init(device_t dev) +static void at24rf08c_init(struct device *dev) { int i, j; @@ -52,7 +52,7 @@ static void at24rf08c_init(device_t dev) printk (BIOS_DEBUG, "init EEPROM done\n"); } -static void at24rf08c_noop(device_t dummy) +static void at24rf08c_noop(struct device *dummy) { } @@ -63,7 +63,7 @@ static struct device_operations at24rf08c_operations = { .init = at24rf08c_init, }; -static void enable_dev(device_t dev) +static void enable_dev(struct device *dev) { dev->ops = &at24rf08c_operations; } diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c index 53e76da033..65928be427 100644 --- a/src/drivers/i2c/at24rf08c/lenovo_serials.c +++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c @@ -28,16 +28,16 @@ #define ERROR_STRING "*INVALID*" -static device_t at24rf08c_find_bank(u8 bank) +static struct device *at24rf08c_find_bank(u8 bank) { - device_t dev; + struct device *dev; dev = dev_find_slot_on_smbus(1, 0x54 | bank); if (!dev) printk(BIOS_WARNING, "EEPROM not found\n"); return dev; } -static int at24rf08c_read_byte(device_t dev, u8 addr) +static int at24rf08c_read_byte(struct device *dev, u8 addr) { int t = -1; int j; @@ -54,7 +54,7 @@ static int at24rf08c_read_byte(device_t dev, u8 addr) return t; } -static void at24rf08c_read_string_dev(device_t dev, u8 start, +static void at24rf08c_read_string_dev(struct device *dev, u8 start, u8 len, char *result) { int i; @@ -72,7 +72,7 @@ static void at24rf08c_read_string_dev(device_t dev, u8 start, static void at24rf08c_read_string(u8 bank, u8 start, u8 len, char *result) { - device_t dev; + struct device *dev; dev = at24rf08c_find_bank(bank); if (dev == 0) { @@ -124,7 +124,7 @@ void smbios_mainboard_set_uuid(u8 *uuid) static char result[16]; unsigned i; static int already_read; - device_t dev; + struct device *dev; const int remap[16] = { /* UUID byteswap. */ 3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15 @@ -173,7 +173,7 @@ const char *smbios_mainboard_version(void) { static char result[100]; static int already_read; - device_t dev; + struct device *dev; int len; if (already_read) diff --git a/src/drivers/i2c/i2cmux/i2cmux.c b/src/drivers/i2c/i2cmux/i2cmux.c index b318508ae2..d8ad40b691 100644 --- a/src/drivers/i2c/i2cmux/i2cmux.c +++ b/src/drivers/i2c/i2cmux/i2cmux.c @@ -6,7 +6,7 @@ #include <device/pci_ops.h> #include <cpu/x86/msr.h> -static void i2cmux_set_link(device_t dev, unsigned int link) +static void i2cmux_set_link(struct device *dev, unsigned int link) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { if (ops_smbus_bus(get_pbus_smbus(dev))) { @@ -16,7 +16,7 @@ static void i2cmux_set_link(device_t dev, unsigned int link) } } -static void i2cmux_noop(device_t dummy) +static void i2cmux_noop(struct device *dummy) { } diff --git a/src/drivers/i2c/i2cmux2/i2cmux2.c b/src/drivers/i2c/i2cmux2/i2cmux2.c index a7d40e2176..6b05508a1b 100644 --- a/src/drivers/i2c/i2cmux2/i2cmux2.c +++ b/src/drivers/i2c/i2cmux2/i2cmux2.c @@ -6,7 +6,7 @@ #include <device/pci_ops.h> #include <cpu/x86/msr.h> -static void i2cmux2_set_link(device_t dev, unsigned int link) +static void i2cmux2_set_link(struct device *dev, unsigned int link) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { if (ops_smbus_bus(get_pbus_smbus(dev))) { @@ -15,7 +15,7 @@ static void i2cmux2_set_link(device_t dev, unsigned int link) } } -static void i2cmux2_noop(device_t dummy) +static void i2cmux2_noop(struct device *dummy) { } diff --git a/src/drivers/i2c/lm63/lm63.c b/src/drivers/i2c/lm63/lm63.c index 47a548946f..b64751e300 100644 --- a/src/drivers/i2c/lm63/lm63.c +++ b/src/drivers/i2c/lm63/lm63.c @@ -6,7 +6,7 @@ #include <device/pci_ops.h> #include <cpu/x86/msr.h> -static void lm63_init(device_t dev) +static void lm63_init(struct device *dev) { int result; if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { @@ -21,7 +21,7 @@ static void lm63_init(device_t dev) } } -static void lm63_noop(device_t dummy) +static void lm63_noop(struct device *dummy) { } diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c index 44333ac669..4dbfb41890 100644 --- a/src/drivers/i2c/rtd2132/rtd2132.c +++ b/src/drivers/i2c/rtd2132/rtd2132.c @@ -75,7 +75,7 @@ #define RTD2132_DEBUG_REG 0 -static void rtd2132_write_reg(device_t dev, u8 reg, u8 value) +static void rtd2132_write_reg(struct device *dev, u8 reg, u8 value) { if (RTD2132_DEBUG_REG) printk(BIOS_DEBUG, "RTD2132 0x%02x <- 0x%02x\n", reg, value); @@ -83,18 +83,18 @@ static void rtd2132_write_reg(device_t dev, u8 reg, u8 value) smbus_write_byte(dev, RTD2132_DATA, value); } -static void rtd2132_firmware_stop(device_t dev) +static void rtd2132_firmware_stop(struct device *dev) { smbus_write_byte(dev, RTD2132_FIRMWARE, RTD2132_FIRMWARE_STOP); mdelay(60); } -static void rtd2132_firmware_start(device_t dev) +static void rtd2132_firmware_start(struct device *dev) { smbus_write_byte(dev, RTD2132_FIRMWARE, RTD2132_FIRMWARE_START); } -static void rtd2132_pps(device_t dev, struct drivers_i2c_rtd2132_config *cfg) +static void rtd2132_pps(struct device *dev, struct drivers_i2c_rtd2132_config *cfg) { /* T2, T5, and T7 register values are in units of 4ms. */ rtd2132_write_reg(dev, RTD2132_COMMAND_PWR_SEQ_T1, cfg->t1); @@ -106,7 +106,7 @@ static void rtd2132_pps(device_t dev, struct drivers_i2c_rtd2132_config *cfg) rtd2132_write_reg(dev, RTD2132_COMMAND_PWR_SEQ_T7, cfg->t7 / 4); } -static void rtd2132_sscg_enable(device_t dev, u8 sscg_percent) +static void rtd2132_sscg_enable(struct device *dev, u8 sscg_percent) { /* SSCG_Config_0 */ rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_0, @@ -116,7 +116,7 @@ static void rtd2132_sscg_enable(device_t dev, u8 sscg_percent) rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_1, sscg_percent); } -static void rtd2132_sscg_disable(device_t dev) +static void rtd2132_sscg_disable(struct device *dev) { /* SSCG_Config_0 */ rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_0, @@ -127,7 +127,7 @@ static void rtd2132_sscg_disable(device_t dev) RTD2132_SSCG_CONFIG_DISABLED); } -static void rtd2132_sscg(device_t dev, struct drivers_i2c_rtd2132_config *cfg) +static void rtd2132_sscg(struct device *dev, struct drivers_i2c_rtd2132_config *cfg) { switch (cfg->sscg_percent) { case RTD2132_SSCG_PERCENT_0_0: @@ -152,7 +152,7 @@ static void rtd2132_sscg(device_t dev, struct drivers_i2c_rtd2132_config *cfg) } } -static void rtd2132_lvds_swap(device_t dev, +static void rtd2132_lvds_swap(struct device *dev, struct drivers_i2c_rtd2132_config *cfg) { u8 swap_value = RTD2132_LVDS_SWAP_NORMAL; @@ -186,7 +186,7 @@ static void rtd2132_lvds_swap(device_t dev, rtd2132_write_reg(dev, RTD2132_COMMAND_LVDS_SWAP, swap_value); } -static void rtd2132_defaults(device_t dev) +static void rtd2132_defaults(struct device *dev) { static const struct def_setting { u8 reg; @@ -207,7 +207,7 @@ static void rtd2132_defaults(device_t dev) def_settings[i].value); } -static void rtd2132_setup(device_t dev) +static void rtd2132_setup(struct device *dev) { struct drivers_i2c_rtd2132_config *config = dev->chip_info; @@ -233,7 +233,7 @@ static void rtd2132_setup(device_t dev) rtd2132_firmware_start(dev); } -static void rtd2132_init(device_t dev) +static void rtd2132_init(struct device *dev) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C && ops_smbus_bus(get_pbus_smbus(dev))) { @@ -241,7 +241,7 @@ static void rtd2132_init(device_t dev) } } -static void rtd2132_noop(device_t dummy) +static void rtd2132_noop(struct device *dummy) { } diff --git a/src/drivers/i2c/w83793/w83793.c b/src/drivers/i2c/w83793/w83793.c index 8dcfb2822c..732fdb4c6d 100644 --- a/src/drivers/i2c/w83793/w83793.c +++ b/src/drivers/i2c/w83793/w83793.c @@ -25,18 +25,18 @@ #include <device/smbus.h> #include "chip.h" -static int w83793_fan_limit(device_t dev, int fan, uint16_t limit) +static int w83793_fan_limit(struct device *dev, int fan, uint16_t limit) { return smbus_write_byte(dev, 0x90 + fan * 2, limit >> 8) || smbus_write_byte(dev, 0x91 + fan * 2, limit & 0xff); } -static int w83793_bank(device_t dev, int bank) +static int w83793_bank(struct device *dev, int bank) { return smbus_write_byte(dev, 0, bank); } -static int w83793_td_level(device_t dev, int fan, const char *level) +static int w83793_td_level(struct device *dev, int fan, const char *level) { fan *= 0x10; @@ -50,7 +50,7 @@ static int w83793_td_level(device_t dev, int fan, const char *level) return 0; } -static int w83793_tr_level(device_t dev, int fan, const char *level) +static int w83793_tr_level(struct device *dev, int fan, const char *level) { fan *= 0x10; @@ -65,7 +65,7 @@ static int w83793_tr_level(device_t dev, int fan, const char *level) } -static int w83793_td_fan_level(device_t dev, int fan, const char *level) +static int w83793_td_fan_level(struct device *dev, int fan, const char *level) { fan *= 0x10; @@ -79,7 +79,7 @@ static int w83793_td_fan_level(device_t dev, int fan, const char *level) return 0; } -static int w83793_tr_fan_level(device_t dev, int fan, const char *level) +static int w83793_tr_fan_level(struct device *dev, int fan, const char *level) { fan *= 0x10; @@ -94,7 +94,7 @@ static int w83793_tr_fan_level(device_t dev, int fan, const char *level) } -static void w83793_init(device_t dev) +static void w83793_init(struct device *dev) { struct drivers_i2c_w83793_config *config = dev->chip_info; uint16_t id; @@ -220,7 +220,7 @@ static void w83793_init(device_t dev) } -static void w83793_noop(device_t dummy) +static void w83793_noop(struct device *dummy) { } @@ -231,7 +231,7 @@ static struct device_operations w83793_operations = { .init = w83793_init, }; -static void enable_dev(device_t dev) +static void enable_dev(struct device *dev) { dev->ops = &w83793_operations; } diff --git a/src/drivers/i2c/w83795/w83795.c b/src/drivers/i2c/w83795/w83795.c index 87aa7f5d6a..5559666f9a 100644 --- a/src/drivers/i2c/w83795/w83795.c +++ b/src/drivers/i2c/w83795/w83795.c @@ -221,7 +221,7 @@ static void w83795_init(w83795_fan_mode_t mode, u8 dts_src) } } -static void w83795_hwm_init(device_t dev) +static void w83795_hwm_init(struct device *dev) { struct device *cpu; struct cpu_info *info; @@ -239,7 +239,7 @@ static void w83795_hwm_init(device_t dev) printk(BIOS_ERR, "Neither AMD nor INTEL CPU detected\n"); } -static void w83795_noop(device_t dummy) +static void w83795_noop(struct device *dummy) { } @@ -250,7 +250,7 @@ static struct device_operations w83795_operations = { .init = w83795_hwm_init, }; -static void enable_dev(device_t dev) +static void enable_dev(struct device *dev) { dev->ops = &w83795_operations; } |