Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hwmon: (ina238) Order chip information alphabetically

Order chip type enum and chip configuration data alphabetically
to simplify adding support for additional chips.

No functional change.

Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

+12 -12
+12 -12
drivers/hwmon/ina238.c
··· 100 100 .val_bits = 16, 101 101 }; 102 102 103 - enum ina238_ids { ina238, ina237, sq52206, ina228 }; 103 + enum ina238_ids { ina228, ina237, ina238, sq52206 }; 104 104 105 105 struct ina238_config { 106 106 bool has_20bit_voltage_current; /* vshunt, vbus and current are 20-bit fields */ ··· 127 127 }; 128 128 129 129 static const struct ina238_config ina238_config[] = { 130 - [ina238] = { 130 + [ina228] = { 131 + .has_20bit_voltage_current = true, 132 + .has_energy = true, 133 + .has_power_highest = false, 134 + .power_calculate_factor = 20, 135 + .config_default = INA238_CONFIG_DEFAULT, 136 + .bus_voltage_lsb = INA238_BUS_VOLTAGE_LSB, 137 + .temp_resolution = 16, 138 + }, 139 + [ina237] = { 131 140 .has_20bit_voltage_current = false, 132 141 .has_energy = false, 133 142 .has_power_highest = false, ··· 145 136 .bus_voltage_lsb = INA238_BUS_VOLTAGE_LSB, 146 137 .temp_resolution = 12, 147 138 }, 148 - [ina237] = { 139 + [ina238] = { 149 140 .has_20bit_voltage_current = false, 150 141 .has_energy = false, 151 142 .has_power_highest = false, ··· 161 152 .power_calculate_factor = 24, 162 153 .config_default = SQ52206_CONFIG_DEFAULT, 163 154 .bus_voltage_lsb = SQ52206_BUS_VOLTAGE_LSB, 164 - .temp_resolution = 16, 165 - }, 166 - [ina228] = { 167 - .has_20bit_voltage_current = true, 168 - .has_energy = true, 169 - .has_power_highest = false, 170 - .power_calculate_factor = 20, 171 - .config_default = INA238_CONFIG_DEFAULT, 172 - .bus_voltage_lsb = INA238_BUS_VOLTAGE_LSB, 173 155 .temp_resolution = 16, 174 156 }, 175 157 };