diff options
| -rw-r--r-- | drivers/power/ab8500_bmdata.c | 20 | ||||
| -rw-r--r-- | drivers/power/ab8500_fg.c | 4 | ||||
| -rw-r--r-- | include/linux/mfd/abx500.h | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/drivers/power/ab8500_bmdata.c b/drivers/power/ab8500_bmdata.c index 05ad9664b05d..3cdcdcff4dd1 100644 --- a/drivers/power/ab8500_bmdata.c +++ b/drivers/power/ab8500_bmdata.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Note that the res_to_temp table must be strictly sorted by falling resistance | 11 | * Note that the res_to_temp table must be strictly sorted by falling resistance |
| 12 | * values to work. | 12 | * values to work. |
| 13 | */ | 13 | */ |
| 14 | static struct abx500_res_to_temp temp_tbl_a_thermistor[] = { | 14 | static const struct abx500_res_to_temp temp_tbl_a_thermistor[] = { |
| 15 | {-5, 53407}, | 15 | {-5, 53407}, |
| 16 | { 0, 48594}, | 16 | { 0, 48594}, |
| 17 | { 5, 43804}, | 17 | { 5, 43804}, |
| @@ -29,7 +29,7 @@ static struct abx500_res_to_temp temp_tbl_a_thermistor[] = { | |||
| 29 | {65, 12500}, | 29 | {65, 12500}, |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | static struct abx500_res_to_temp temp_tbl_b_thermistor[] = { | 32 | static const struct abx500_res_to_temp temp_tbl_b_thermistor[] = { |
| 33 | {-5, 200000}, | 33 | {-5, 200000}, |
| 34 | { 0, 159024}, | 34 | { 0, 159024}, |
| 35 | { 5, 151921}, | 35 | { 5, 151921}, |
| @@ -47,7 +47,7 @@ static struct abx500_res_to_temp temp_tbl_b_thermistor[] = { | |||
| 47 | {65, 82869}, | 47 | {65, 82869}, |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | static struct abx500_v_to_cap cap_tbl_a_thermistor[] = { | 50 | static const struct abx500_v_to_cap cap_tbl_a_thermistor[] = { |
| 51 | {4171, 100}, | 51 | {4171, 100}, |
| 52 | {4114, 95}, | 52 | {4114, 95}, |
| 53 | {4009, 83}, | 53 | {4009, 83}, |
| @@ -70,7 +70,7 @@ static struct abx500_v_to_cap cap_tbl_a_thermistor[] = { | |||
| 70 | {3247, 0}, | 70 | {3247, 0}, |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | static struct abx500_v_to_cap cap_tbl_b_thermistor[] = { | 73 | static const struct abx500_v_to_cap cap_tbl_b_thermistor[] = { |
| 74 | {4161, 100}, | 74 | {4161, 100}, |
| 75 | {4124, 98}, | 75 | {4124, 98}, |
| 76 | {4044, 90}, | 76 | {4044, 90}, |
| @@ -93,7 +93,7 @@ static struct abx500_v_to_cap cap_tbl_b_thermistor[] = { | |||
| 93 | {3250, 0}, | 93 | {3250, 0}, |
| 94 | }; | 94 | }; |
| 95 | 95 | ||
| 96 | static struct abx500_v_to_cap cap_tbl[] = { | 96 | static const struct abx500_v_to_cap cap_tbl[] = { |
| 97 | {4186, 100}, | 97 | {4186, 100}, |
| 98 | {4163, 99}, | 98 | {4163, 99}, |
| 99 | {4114, 95}, | 99 | {4114, 95}, |
| @@ -124,7 +124,7 @@ static struct abx500_v_to_cap cap_tbl[] = { | |||
| 124 | * Note that the res_to_temp table must be strictly sorted by falling | 124 | * Note that the res_to_temp table must be strictly sorted by falling |
| 125 | * resistance values to work. | 125 | * resistance values to work. |
| 126 | */ | 126 | */ |
| 127 | static struct abx500_res_to_temp temp_tbl[] = { | 127 | static const struct abx500_res_to_temp temp_tbl[] = { |
| 128 | {-5, 214834}, | 128 | {-5, 214834}, |
| 129 | { 0, 162943}, | 129 | { 0, 162943}, |
| 130 | { 5, 124820}, | 130 | { 5, 124820}, |
| @@ -146,7 +146,7 @@ static struct abx500_res_to_temp temp_tbl[] = { | |||
| 146 | * Note that the batres_vs_temp table must be strictly sorted by falling | 146 | * Note that the batres_vs_temp table must be strictly sorted by falling |
| 147 | * temperature values to work. | 147 | * temperature values to work. |
| 148 | */ | 148 | */ |
| 149 | static struct batres_vs_temp temp_to_batres_tbl_thermistor[] = { | 149 | static const struct batres_vs_temp temp_to_batres_tbl_thermistor[] = { |
| 150 | { 40, 120}, | 150 | { 40, 120}, |
| 151 | { 30, 135}, | 151 | { 30, 135}, |
| 152 | { 20, 165}, | 152 | { 20, 165}, |
| @@ -160,7 +160,7 @@ static struct batres_vs_temp temp_to_batres_tbl_thermistor[] = { | |||
| 160 | * Note that the batres_vs_temp table must be strictly sorted by falling | 160 | * Note that the batres_vs_temp table must be strictly sorted by falling |
| 161 | * temperature values to work. | 161 | * temperature values to work. |
| 162 | */ | 162 | */ |
| 163 | static struct batres_vs_temp temp_to_batres_tbl_ext_thermistor[] = { | 163 | static const struct batres_vs_temp temp_to_batres_tbl_ext_thermistor[] = { |
| 164 | { 60, 300}, | 164 | { 60, 300}, |
| 165 | { 30, 300}, | 165 | { 30, 300}, |
| 166 | { 20, 300}, | 166 | { 20, 300}, |
| @@ -171,7 +171,7 @@ static struct batres_vs_temp temp_to_batres_tbl_ext_thermistor[] = { | |||
| 171 | }; | 171 | }; |
| 172 | 172 | ||
| 173 | /* battery resistance table for LI ION 9100 battery */ | 173 | /* battery resistance table for LI ION 9100 battery */ |
| 174 | static struct batres_vs_temp temp_to_batres_tbl_9100[] = { | 174 | static const struct batres_vs_temp temp_to_batres_tbl_9100[] = { |
| 175 | { 60, 180}, | 175 | { 60, 180}, |
| 176 | { 30, 180}, | 176 | { 30, 180}, |
| 177 | { 20, 180}, | 177 | { 20, 180}, |
| @@ -547,7 +547,7 @@ int ab8500_bm_of_probe(struct device *dev, | |||
| 547 | struct device_node *np, | 547 | struct device_node *np, |
| 548 | struct abx500_bm_data *bm) | 548 | struct abx500_bm_data *bm) |
| 549 | { | 549 | { |
| 550 | struct batres_vs_temp *tmp_batres_tbl; | 550 | const struct batres_vs_temp *tmp_batres_tbl; |
| 551 | struct device_node *battery_node; | 551 | struct device_node *battery_node; |
| 552 | const char *btech; | 552 | const char *btech; |
| 553 | int i; | 553 | int i; |
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index 1601d27ce5d4..c5391f5c372d 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c | |||
| @@ -863,7 +863,7 @@ static int ab8500_fg_bat_voltage(struct ab8500_fg *di) | |||
| 863 | static int ab8500_fg_volt_to_capacity(struct ab8500_fg *di, int voltage) | 863 | static int ab8500_fg_volt_to_capacity(struct ab8500_fg *di, int voltage) |
| 864 | { | 864 | { |
| 865 | int i, tbl_size; | 865 | int i, tbl_size; |
| 866 | struct abx500_v_to_cap *tbl; | 866 | const struct abx500_v_to_cap *tbl; |
| 867 | int cap = 0; | 867 | int cap = 0; |
| 868 | 868 | ||
| 869 | tbl = di->bm->bat_type[di->bm->batt_id].v_to_cap_tbl, | 869 | tbl = di->bm->bat_type[di->bm->batt_id].v_to_cap_tbl, |
| @@ -915,7 +915,7 @@ static int ab8500_fg_uncomp_volt_to_capacity(struct ab8500_fg *di) | |||
| 915 | static int ab8500_fg_battery_resistance(struct ab8500_fg *di) | 915 | static int ab8500_fg_battery_resistance(struct ab8500_fg *di) |
| 916 | { | 916 | { |
| 917 | int i, tbl_size; | 917 | int i, tbl_size; |
| 918 | struct batres_vs_temp *tbl; | 918 | const struct batres_vs_temp *tbl; |
| 919 | int resist = 0; | 919 | int resist = 0; |
| 920 | 920 | ||
| 921 | tbl = di->bm->bat_type[di->bm->batt_id].batres_tbl; | 921 | tbl = di->bm->bat_type[di->bm->batt_id].batres_tbl; |
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 33b0253569a3..3301b2031c8d 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
| @@ -183,11 +183,11 @@ struct abx500_battery_type { | |||
| 183 | int low_high_vol_lvl; | 183 | int low_high_vol_lvl; |
| 184 | int battery_resistance; | 184 | int battery_resistance; |
| 185 | int n_temp_tbl_elements; | 185 | int n_temp_tbl_elements; |
| 186 | struct abx500_res_to_temp *r_to_t_tbl; | 186 | const struct abx500_res_to_temp *r_to_t_tbl; |
| 187 | int n_v_cap_tbl_elements; | 187 | int n_v_cap_tbl_elements; |
| 188 | struct abx500_v_to_cap *v_to_cap_tbl; | 188 | const struct abx500_v_to_cap *v_to_cap_tbl; |
| 189 | int n_batres_tbl_elements; | 189 | int n_batres_tbl_elements; |
| 190 | struct batres_vs_temp *batres_tbl; | 190 | const struct batres_vs_temp *batres_tbl; |
| 191 | }; | 191 | }; |
| 192 | 192 | ||
| 193 | /** | 193 | /** |
