diff options
author | Hongbo Zhang <hongbo.zhang@linaro.org> | 2013-04-03 20:18:11 +0800 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-04-16 17:38:10 -0700 |
commit | ea2be6f21071b4af3b765a0f228be2bef08515e9 (patch) | |
tree | 1293fb20bdaa9a6925a5da0b92573be8b3d93910 /drivers/power/ab8500_bmdata.c | |
parent | 2c89940786ef8c6e4dbcd2960142ce513e289f1e (diff) | |
download | kernel_goldelico_gta04-ea2be6f21071b4af3b765a0f228be2bef08515e9.zip kernel_goldelico_gta04-ea2be6f21071b4af3b765a0f228be2bef08515e9.tar.gz kernel_goldelico_gta04-ea2be6f21071b4af3b765a0f228be2bef08515e9.tar.bz2 |
ab8500_bmdata: Export abx500_res_to_temp tables for hwmon
This patch exports the thermistor resistance-to-temperature tables, so
that the hwmon driver can access them, and also adds the corresponding
table size variables.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power/ab8500_bmdata.c')
-rw-r--r-- | drivers/power/ab8500_bmdata.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/power/ab8500_bmdata.c b/drivers/power/ab8500_bmdata.c index 3cdcdcf..d298645 100644 --- a/drivers/power/ab8500_bmdata.c +++ b/drivers/power/ab8500_bmdata.c @@ -11,7 +11,7 @@ * Note that the res_to_temp table must be strictly sorted by falling resistance * values to work. */ -static const struct abx500_res_to_temp temp_tbl_a_thermistor[] = { +const struct abx500_res_to_temp ab8500_temp_tbl_a_thermistor[] = { {-5, 53407}, { 0, 48594}, { 5, 43804}, @@ -28,8 +28,12 @@ static const struct abx500_res_to_temp temp_tbl_a_thermistor[] = { {60, 13437}, {65, 12500}, }; +EXPORT_SYMBOL(ab8500_temp_tbl_a_thermistor); -static const struct abx500_res_to_temp temp_tbl_b_thermistor[] = { +const int ab8500_temp_tbl_a_size = ARRAY_SIZE(ab8500_temp_tbl_a_thermistor); +EXPORT_SYMBOL(ab8500_temp_tbl_a_size); + +const struct abx500_res_to_temp ab8500_temp_tbl_b_thermistor[] = { {-5, 200000}, { 0, 159024}, { 5, 151921}, @@ -46,6 +50,10 @@ static const struct abx500_res_to_temp temp_tbl_b_thermistor[] = { {60, 85461}, {65, 82869}, }; +EXPORT_SYMBOL(ab8500_temp_tbl_b_thermistor); + +const int ab8500_temp_tbl_b_size = ARRAY_SIZE(ab8500_temp_tbl_b_thermistor); +EXPORT_SYMBOL(ab8500_temp_tbl_b_size); static const struct abx500_v_to_cap cap_tbl_a_thermistor[] = { {4171, 100}, @@ -230,8 +238,8 @@ static struct abx500_battery_type bat_type_thermistor[] = { .maint_b_chg_timer_h = 200, .low_high_cur_lvl = 300, .low_high_vol_lvl = 4000, - .n_temp_tbl_elements = ARRAY_SIZE(temp_tbl_a_thermistor), - .r_to_t_tbl = temp_tbl_a_thermistor, + .n_temp_tbl_elements = ARRAY_SIZE(ab8500_temp_tbl_a_thermistor), + .r_to_t_tbl = ab8500_temp_tbl_a_thermistor, .n_v_cap_tbl_elements = ARRAY_SIZE(cap_tbl_a_thermistor), .v_to_cap_tbl = cap_tbl_a_thermistor, .n_batres_tbl_elements = ARRAY_SIZE(temp_to_batres_tbl_thermistor), @@ -258,8 +266,8 @@ static struct abx500_battery_type bat_type_thermistor[] = { .maint_b_chg_timer_h = 200, .low_high_cur_lvl = 300, .low_high_vol_lvl = 4000, - .n_temp_tbl_elements = ARRAY_SIZE(temp_tbl_b_thermistor), - .r_to_t_tbl = temp_tbl_b_thermistor, + .n_temp_tbl_elements = ARRAY_SIZE(ab8500_temp_tbl_b_thermistor), + .r_to_t_tbl = ab8500_temp_tbl_b_thermistor, .n_v_cap_tbl_elements = ARRAY_SIZE(cap_tbl_b_thermistor), .v_to_cap_tbl = cap_tbl_b_thermistor, .n_batres_tbl_elements = ARRAY_SIZE(temp_to_batres_tbl_thermistor), |