[HTC One S] phoenixita:
I have a 1800 mAh battery in my One S what if i change these lines in board-ville.c

};

struct pm8921_bms_battery_data bms_battery_data_id_1 = {
.fcc	= 1650,
.fcc_temp_lut	= &fcc_temp_id_1,
.fcc_sf_lut	= &fcc_sf_id_1,
.pc_temp_ocv_lut	= &pc_temp_ocv_id_1,
.pc_sf_lut	= &pc_sf_id_1,
};

static struct single_row_lut fcc_temp_id_2 = {
.x	= {-20, 0, 25, 40, 65},
.y	= {1631, 1642, 1643, 1641, 1642},
.cols	= 5
};

static struct single_row_lut fcc_sf_id_2 = {
.x	= {0},
.y	= {100},
.cols	= 1
};

static struct sf_lut pc_sf_id_2 = {
.rows	= 10,
.cols	= 5,

.row_entries	= {100, 200, 300, 400, 500},
.percent	= {100, 90, 80, 70, 60, 50, 40, 30, 20, 10},
.sf	= {
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100}
},
};

static struct pc_temp_ocv_lut pc_temp_ocv_id_2 = {
.rows	= 29,
.cols	= 5,
.temp	= {-20, 0, 25, 40, 65},
.percent	= {100, 95, 90, 85, 80, 75, 70, 65, 60, 55,
50, 45, 40, 35, 30, 25, 20, 15, 10, 9,
8, 7, 6, 5, 4, 3, 2, 1, 0},
.ocv	= {
{4156 ,4154 ,4151 ,4147 ,4150},
{4112 ,4123 ,4123 ,4120 ,4125},
{4062 ,4074 ,4079 ,4076 ,4081},
{4007 ,4027 ,4038 ,4035 ,4039},
{3956 ,3981 ,4000 ,3998 ,4001},
{3921 ,3945 ,3966 ,3964 ,3965},
{3887 ,3913 ,3936 ,3935 ,3934},
{3855 ,3883 ,3905 ,3907 ,3906},
{3828 ,3857 ,3863 ,3876 ,3877},
{3807 ,3833 ,3837 ,3836 ,3841},
{3789 ,3813 ,3816 ,3815 ,3814},
{3775 ,3792 ,3801 ,3799 ,3799},
{3764 ,3774 ,3788 ,3785 ,3785},
{3752 ,3762 ,3778 ,3775 ,3774},
{3739 ,3750 ,3770 ,3767 ,3760},
{3724 ,3739 ,3762 ,3757 ,3741},
{3706 ,3727 ,3742 ,3735 ,3720},
{3681 ,3714 ,3711 ,3703 ,3687},
{3641 ,3685 ,3676 ,3668 ,3654},
{3635 ,3681 ,3675 ,3667 ,3653},
{3628 ,3677 ,3673 ,3666 ,3651},
{3620 ,3672 ,3672 ,3665 ,3650},
{3610 ,3666 ,3670 ,3662 ,3646},
{3599 ,3656 ,3662 ,3653 ,3633},
{3585 ,3639 ,3641 ,3632 ,3608},
{3566 ,3612 ,3608 ,3599 ,3574},
{3537 ,3571 ,3564 ,3556 ,3530},
{3487 ,3506 ,3502 ,3494 ,3468},
{3360 ,3371 ,3371 ,3368 ,3366}
}
};

struct pm8921_bms_battery_data bms_battery_data_id_2 = {
.fcc	= 1650,
.fcc_temp_lut	= &fcc_temp_id_2,
.fcc_sf_lut	= &fcc_sf_id_2,
.pc_temp_ocv_lut	= &pc_temp_ocv_id_2,
.pc_sf_lut	= &pc_sf_id_2,
};

static struct htc_battery_cell htc_battery_cells[] = {
[0] = {
.model_name = "BJ40100",
.capacity = 1650,
.id = 1,
.id_raw_min = 0, /* unit:mV (22kohm) */
.id_raw_max = 330,
.type = HTC_BATTERY_CELL_TYPE_NORMAL,
.voltage_max = 4200,
.voltage_min = 3200,
.chg_param = &chg_batt_params[0],
.gauge_param = &bms_battery_data_id_1,
},
[1] = {
.model_name = "BJ40100",
.capacity = 1650,
.id = 2,
.id_raw_min = 331, /* unit:mV (33kohm) */
.id_raw_max = 540,
.type = HTC_BATTERY_CELL_TYPE_NORMAL,
.voltage_max = 4200,
.voltage_min = 3200,
.chg_param = &chg_batt_params[0],
.gauge_param = &bms_battery_data_id_2,
},
[2] = {
.model_name = "UNKNOWN",
.capacity = 1650,
.id = 255,
.id_raw_min = INT_MIN,
.id_raw_max = INT_MAX,
.type = HTC_BATTERY_CELL_TYPE_NORMAL,
.voltage_max = 4200,
.voltage_min = 3200,
.chg_param = &chg_batt_params[0],
.gauge_param = NULL,
},

into these ones taken from board-elite.c?

};

struct pm8921_bms_battery_data bms_battery_data_id_1 = {
.fcc	= 1800,
.fcc_temp_lut	= &fcc_temp_id_1,
.fcc_sf_lut	= &fcc_sf_id_1,
.pc_temp_ocv_lut	= &pc_temp_ocv_id_1,
.pc_sf_lut	= &pc_sf_id_1,
};

static struct single_row_lut fcc_temp_id_2 = {
.x	= {-20, -10, 0, 5, 10, 20, 30, 40},
.y	= {1540, 1543, 1623, 1715, 1759, 1794, 1785, 1780},
.cols	= 8,
};

static struct single_row_lut fcc_sf_id_2 = {
.x	= {100, 200, 300, 400, 500},
.y	= {100, 97, 96, 93, 90},
.cols	= 5,
};

static struct sf_lut pc_sf_id_2 = {
.rows	= 10,
.cols	= 5,
.row_entries	= {100, 200, 300, 400, 500},
.percent	= {100, 90, 80, 70, 60, 50, 40, 30, 20, 10},
.sf	= {
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100},
{100, 100, 100, 100, 100}
},
};

static struct pc_temp_ocv_lut pc_temp_ocv_id_2 = {
.rows	= 29,
.cols	= 8,
.temp	= {-20, -10, 0, 5, 10, 20, 30, 40},
.percent	= {100, 95, 90, 85, 80, 75, 70, 65, 60, 55,
50, 45, 40, 35, 30, 25, 20, 15, 10, 9,
8, 7, 6, 5, 4, 3, 2, 1, 0
},
.ocv	= {
{4150 , 4150 , 4150 , 4150 , 4150 , 4150 , 4150 , 4150 },
{4141 , 4141 , 4140 , 4137 , 4135 , 4133 , 4132 , 4130 },
{4102 , 4102 , 4098 , 4094 , 4091 , 4088 , 4087 , 4085 },
{4066 , 4066 , 4061 , 4054 , 4051 , 4047 , 4046 , 4044 },
{4024 , 4024 , 4021 , 4013 , 4011 , 4007 , 4008 , 4006 },
{3986 , 3986 , 3987 , 3980 , 3977 , 3974 , 3974 , 3972 },
{3955 , 3955 , 3960 , 3952 , 3948 , 3944 , 3943 , 3941 },
{3926 , 3926 , 3930 , 3922 , 3920 , 3917 , 3916 , 3914 },
{3897 , 3897 , 3897 , 3887 , 3886 , 3887 , 3890 , 3889 },
{3871 , 3871 , 3866 , 3855 , 3849 , 3845 , 3846 , 3847 },
{3848 , 3848 , 3841 , 3829 , 3823 , 3819 , 3819 , 3819 },
{3829 , 3829 , 3821 , 3811 , 3806 , 3802 , 3802 , 3802 },
{3812 , 3812 , 3805 , 3797 , 3793 , 3790 , 3789 , 3789 },
{3798 , 3798 , 3793 , 3787 , 3784 , 3781 , 3779 , 3778 },
{3788 , 3788 , 3785 , 3780 , 3778 , 3774 , 3771 , 3768 },
{3781 , 3781 , 3780 , 3775 , 3772 , 3766 , 3758 , 3751 },
{3773 , 3773 , 3774 , 3765 , 3756 , 3742 , 3735 , 3731 },
{3763 , 3763 , 3762 , 3738 , 3721 , 3702 , 3697 , 3696 },
{3747 , 3747 , 3736 , 3703 , 3693 , 3684 , 3679 , 3674 },
{3743 , 3743 , 3730 , 3701 , 3691 , 3674 , 3669 , 3668 },
{3739 , 3739 , 3724 , 3698 , 3688 , 3664 , 3659 , 3661 },
{3735 , 3735 , 3718 , 3695 , 3685 , 3653 , 3649 , 3654 },
{3731 , 3731 , 3712 , 3692 , 3682 , 3643 , 3639 , 3647 },
{3726 , 3726 , 3705 , 3689 , 3679 , 3632 , 3628 , 3640 },
{3722 , 3722 , 3702 , 3669 , 3626 , 3592 , 3589 , 3599 },
{3717 , 3717 , 3698 , 3649 , 3573 , 3551 , 3550 , 3558 },
{3713 , 3713 , 3695 , 3629 , 3520 , 3511 , 3511 , 3517 },
{3708 , 3708 , 3691 , 3609 , 3467 , 3470 , 3472 , 3475 },
{3600 , 3600 , 3550 , 3500 , 3300 , 3300 , 3300 , 3300 }
},
};

struct pm8921_bms_battery_data bms_battery_data_id_2 = {
.fcc	= 1780,
.fcc_temp_lut	= &fcc_temp_id_2,
.fcc_sf_lut	= &fcc_sf_id_2,
.pc_temp_ocv_lut	= &pc_temp_ocv_id_2,
.pc_sf_lut	= &pc_sf_id_2,
};

static struct htc_battery_cell htc_battery_cells[] = {
[0] = {
.model_name = "BJ83100",
.capacity = 1800,
.id = 1,
.id_raw_min = 73, /* unit:mV (10kohm) */
.id_raw_max = 204,
.type = HTC_BATTERY_CELL_TYPE_NORMAL,
.voltage_max = 4200,
.voltage_min = 3200,
.chg_param = &chg_batt_params[0],
.gauge_param = &bms_battery_data_id_1,
},
[1] = {
.model_name = "BJ83100",
.capacity = 1800,
.id = 2,
.id_raw_min = 205, /* unit:mV (22kohm) */
.id_raw_max = 595,
.type = HTC_BATTERY_CELL_TYPE_NORMAL,
.voltage_max = 4200,
.voltage_min = 3200,
.chg_param = &chg_batt_params[0],
.gauge_param = &bms_battery_data_id_2,
},
[2] = {
.model_name = "UNKNOWN",
.capacity = 1800,
.id = 255,
.id_raw_min = INT_MIN,
.id_raw_max = INT_MAX,
.type = HTC_BATTERY_CELL_TYPE_NORMAL,
.voltage_max = 4200,
.voltage_min = 3200,
.chg_param = &chg_batt_params[0],
.gauge_param = NULL,
},

Will the changes make the kernel recognize my 1800 mAh battery or it will be a useless change?

-----------------------------------------

I'm gonna test this in a few minutes...