Lines Matching refs:total_gain
708 static int sc500ai_set_hightemp_dpc(struct sc500ai *sc500ai, u32 total_gain) in sc500ai_set_hightemp_dpc() argument
711 if (total_gain <= 0x500) { // 20x gain in sc500ai_set_hightemp_dpc()
713 } else if(total_gain >= 0x780) { // 30x gain in sc500ai_set_hightemp_dpc()
719 static int sc500ai_get_gain_reg(u32 total_gain, u32* again, u32* again_fine, u32* dgain, u32* dgain… in sc500ai_get_gain_reg() argument
724 if (total_gain <= 0x60) { /* 1 - 1.5x gain */ in sc500ai_get_gain_reg()
725 step = total_gain - 0x40; in sc500ai_get_gain_reg()
731 } else if (total_gain <= 0xc0) { /* 1.5x - 3x gain */ in sc500ai_get_gain_reg()
732 step = (total_gain - 0x60) * 64 / 0x60 - 1; in sc500ai_get_gain_reg()
738 } else if (total_gain <= 0x180) { /* 3x - 6x gain */ in sc500ai_get_gain_reg()
739 step = (total_gain - 0xc0) * 64 / 0xc0 - 1; in sc500ai_get_gain_reg()
745 } else if (total_gain <= 0x300) { /* 6x - 12x gain */ in sc500ai_get_gain_reg()
746 step = (total_gain - 0x180) * 64 / 0x180 - 1; in sc500ai_get_gain_reg()
752 } else if (total_gain <= 0x600) { /* 12x - 24x gain */ in sc500ai_get_gain_reg()
753 step = (total_gain - 0x300) * 64 / 0x300 - 1; in sc500ai_get_gain_reg()
759 } else if (total_gain <= 0xc00) { /* 24x - 48x gain */ in sc500ai_get_gain_reg()
760 step = (total_gain - 0x600) * 128 / 0x600 - 1; in sc500ai_get_gain_reg()
766 } else if (total_gain <= 0x1800) { /* 48x - 96x gain */ in sc500ai_get_gain_reg()
767 step = (total_gain - 0xc00) * 128 / 0xc00 - 1; in sc500ai_get_gain_reg()
773 } else if (total_gain <= 0x3000) { /* 96x - 192x gain */ in sc500ai_get_gain_reg()
774 step = (total_gain - 0x1800) * 128 / 0x1800 - 1; in sc500ai_get_gain_reg()
780 } else if (total_gain <= 0x6000) { /* 192x - 384x gain */ in sc500ai_get_gain_reg()
781 step = (total_gain - 0x3000) * 128 / 0x3000 - 1; in sc500ai_get_gain_reg()
787 } else if (total_gain <= 0xc000) { /* 384x - 768x gain */ in sc500ai_get_gain_reg()
788 step = (total_gain - 0x6000) * 128 / 0x6000 - 1; in sc500ai_get_gain_reg()