Lines Matching refs:cs35l36

461 	struct cs35l36_private *cs35l36 =  in cs35l36_ldm_sel_get()  local
464 ucontrol->value.integer.value[0] = cs35l36->ldm_mode_sel; in cs35l36_ldm_sel_get()
474 struct cs35l36_private *cs35l36 = in cs35l36_ldm_sel_put() local
479 cs35l36->ldm_mode_sel = val; in cs35l36_ldm_sel_put()
481 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_ldm_sel_put()
508 struct cs35l36_private *cs35l36 = in cs35l36_main_amp_event() local
514 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL1, in cs35l36_main_amp_event()
520 regmap_read(cs35l36->regmap, CS35L36_INT4_RAW_STATUS, &reg); in cs35l36_main_amp_event()
523 dev_crit(cs35l36->dev, "PLL Unlocked\n"); in cs35l36_main_amp_event()
525 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RX1_SEL, in cs35l36_main_amp_event()
528 regmap_update_bits(cs35l36->regmap, CS35L36_AMP_OUT_MUTE, in cs35l36_main_amp_event()
533 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RX1_SEL, in cs35l36_main_amp_event()
536 regmap_update_bits(cs35l36->regmap, CS35L36_AMP_OUT_MUTE, in cs35l36_main_amp_event()
541 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL1, in cs35l36_main_amp_event()
560 struct cs35l36_private *cs35l36 = in cs35l36_boost_event() local
565 if (!cs35l36->pdata.extern_boost) in cs35l36_boost_event()
566 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL2, in cs35l36_boost_event()
572 if (!cs35l36->pdata.extern_boost) in cs35l36_boost_event()
573 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL2, in cs35l36_boost_event()
757 struct cs35l36_private *cs35l36 = in cs35l36_set_dai_fmt() local
772 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_TX_PIN_CTRL, in cs35l36_set_dai_fmt()
775 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RATE_CTRL, in cs35l36_set_dai_fmt()
790 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_TX_PIN_CTRL, in cs35l36_set_dai_fmt()
793 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RATE_CTRL, in cs35l36_set_dai_fmt()
829 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RATE_CTRL, in cs35l36_set_dai_fmt()
832 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_TX_PIN_CTRL, in cs35l36_set_dai_fmt()
835 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_FORMAT, in cs35l36_set_dai_fmt()
867 struct cs35l36_private *cs35l36 = in cs35l36_pcm_hw_params() local
874 regmap_update_bits(cs35l36->regmap, in cs35l36_pcm_hw_params()
896 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_FRAME_CTRL, in cs35l36_pcm_hw_params()
900 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_FRAME_CTRL, in cs35l36_pcm_hw_params()
912 struct cs35l36_private *cs35l36 = in cs35l36_dai_set_sysclk() local
924 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_dai_set_sysclk()
926 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_dai_set_sysclk()
929 regmap_update_bits(cs35l36->regmap, CS35L36_TST_FS_MON0, in cs35l36_dai_set_sysclk()
933 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_dai_set_sysclk()
935 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_dai_set_sysclk()
941 struct cs35l36_private *cs35l36, int freq) in cs35l36_get_clk_config() argument
1006 struct cs35l36_private *cs35l36 = in cs35l36_component_set_sysclk() local
1012 prev_clksrc = cs35l36->clksrc; in cs35l36_component_set_sysclk()
1016 cs35l36->clksrc = CS35L36_PLLSRC_SCLK; in cs35l36_component_set_sysclk()
1019 cs35l36->clksrc = CS35L36_PLLSRC_LRCLK; in cs35l36_component_set_sysclk()
1022 cs35l36->clksrc = CS35L36_PLLSRC_PDMCLK; in cs35l36_component_set_sysclk()
1025 cs35l36->clksrc = CS35L36_PLLSRC_SELF; in cs35l36_component_set_sysclk()
1028 cs35l36->clksrc = CS35L36_PLLSRC_MCLK; in cs35l36_component_set_sysclk()
1034 clk_cfg = cs35l36_get_clk_config(cs35l36, freq); in cs35l36_component_set_sysclk()
1040 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1043 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1046 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1049 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1051 cs35l36->clksrc); in cs35l36_component_set_sysclk()
1052 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1055 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1059 if (cs35l36->rev_id == CS35L36_REV_A0) { in cs35l36_component_set_sysclk()
1060 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_set_sysclk()
1062 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_set_sysclk()
1065 regmap_write(cs35l36->regmap, CS35L36_DCO_CTRL, 0x00036DA8); in cs35l36_component_set_sysclk()
1066 regmap_write(cs35l36->regmap, CS35L36_MISC_CTRL, 0x0100EE0E); in cs35l36_component_set_sysclk()
1068 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_LOOP_PARAMS, in cs35l36_component_set_sysclk()
1072 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_LOOP_PARAMS, in cs35l36_component_set_sysclk()
1076 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_set_sysclk()
1078 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_set_sysclk()
1082 if (cs35l36->clksrc == CS35L36_PLLSRC_PDMCLK) { in cs35l36_component_set_sysclk()
1083 pdm_switch = cs35l36->ldm_mode_sel && in cs35l36_component_set_sysclk()
1087 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_component_set_sysclk()
1091 regmap_update_bits(cs35l36->regmap, CS35L36_DAC_MSM_CFG, in cs35l36_component_set_sysclk()
1096 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_component_set_sysclk()
1100 pdm_switch = cs35l36->ldm_mode_sel && in cs35l36_component_set_sysclk()
1104 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_component_set_sysclk()
1108 regmap_update_bits(cs35l36->regmap, CS35L36_DAC_MSM_CFG, in cs35l36_component_set_sysclk()
1113 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_component_set_sysclk()
1121 static int cs35l36_boost_inductor(struct cs35l36_private *cs35l36, int inductor) in cs35l36_boost_inductor() argument
1123 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_COEFF, in cs35l36_boost_inductor()
1125 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_COEFF, in cs35l36_boost_inductor()
1128 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SW_FREQ, in cs35l36_boost_inductor()
1133 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SLOPE_LBST, in cs35l36_boost_inductor()
1136 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SLOPE_LBST, in cs35l36_boost_inductor()
1140 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SLOPE_LBST, in cs35l36_boost_inductor()
1143 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SLOPE_LBST, in cs35l36_boost_inductor()
1147 dev_err(cs35l36->dev, "%s Invalid Inductor Value %d uH\n", in cs35l36_boost_inductor()
1157 struct cs35l36_private *cs35l36 = in cs35l36_component_probe() local
1161 if ((cs35l36->rev_id == CS35L36_REV_A0) && cs35l36->pdata.dcm_mode) { in cs35l36_component_probe()
1162 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_DCM_CTRL, in cs35l36_component_probe()
1166 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1168 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1171 regmap_update_bits(cs35l36->regmap, CS35L36_BST_TST_MANUAL, in cs35l36_component_probe()
1174 regmap_update_bits(cs35l36->regmap, CS35L36_BST_TST_MANUAL, in cs35l36_component_probe()
1178 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1180 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1184 if (cs35l36->pdata.amp_pcm_inv) in cs35l36_component_probe()
1185 regmap_update_bits(cs35l36->regmap, CS35L36_AMP_DIG_VOL_CTRL, in cs35l36_component_probe()
1189 if (cs35l36->pdata.multi_amp_mode) in cs35l36_component_probe()
1190 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_TX_PIN_CTRL, in cs35l36_component_probe()
1194 if (cs35l36->pdata.imon_pol_inv) in cs35l36_component_probe()
1195 regmap_update_bits(cs35l36->regmap, CS35L36_VI_SPKMON_FILT, in cs35l36_component_probe()
1198 if (cs35l36->pdata.vmon_pol_inv) in cs35l36_component_probe()
1199 regmap_update_bits(cs35l36->regmap, CS35L36_VI_SPKMON_FILT, in cs35l36_component_probe()
1202 if (cs35l36->pdata.bst_vctl) in cs35l36_component_probe()
1203 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_VCTRL1, in cs35l36_component_probe()
1205 cs35l36->pdata.bst_vctl); in cs35l36_component_probe()
1207 if (cs35l36->pdata.bst_vctl_sel) in cs35l36_component_probe()
1208 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_VCTRL2, in cs35l36_component_probe()
1210 cs35l36->pdata.bst_vctl_sel); in cs35l36_component_probe()
1212 if (cs35l36->pdata.bst_ipk) in cs35l36_component_probe()
1213 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_PEAK_CUR, in cs35l36_component_probe()
1215 cs35l36->pdata.bst_ipk); in cs35l36_component_probe()
1217 if (cs35l36->pdata.boost_ind) { in cs35l36_component_probe()
1218 ret = cs35l36_boost_inductor(cs35l36, cs35l36->pdata.boost_ind); in cs35l36_component_probe()
1220 dev_err(cs35l36->dev, in cs35l36_component_probe()
1226 if (cs35l36->pdata.temp_warn_thld) in cs35l36_component_probe()
1227 regmap_update_bits(cs35l36->regmap, CS35L36_DTEMP_WARN_THLD, in cs35l36_component_probe()
1229 cs35l36->pdata.temp_warn_thld); in cs35l36_component_probe()
1231 if (cs35l36->pdata.irq_drv_sel) in cs35l36_component_probe()
1232 regmap_update_bits(cs35l36->regmap, CS35L36_PAD_INTERFACE, in cs35l36_component_probe()
1234 cs35l36->pdata.irq_drv_sel << in cs35l36_component_probe()
1237 if (cs35l36->pdata.irq_gpio_sel) in cs35l36_component_probe()
1238 regmap_update_bits(cs35l36->regmap, CS35L36_PAD_INTERFACE, in cs35l36_component_probe()
1240 cs35l36->pdata.irq_gpio_sel << in cs35l36_component_probe()
1251 if (cs35l36->chip_version == CS35L36_10V_L36) { in cs35l36_component_probe()
1252 regmap_update_bits(cs35l36->regmap, in cs35l36_component_probe()
1257 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1259 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1262 regmap_update_bits(cs35l36->regmap, CS35L36_BST_ANA2_TEST, in cs35l36_component_probe()
1266 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_VCTRL2, in cs35l36_component_probe()
1269 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_VCTRL1, in cs35l36_component_probe()
1272 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1274 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1283 regmap_update_bits(cs35l36->regmap, CS35L36_CTRL_OVRRIDE, in cs35l36_component_probe()
1320 struct cs35l36_private *cs35l36 = data; in cs35l36_irq() local
1326 regmap_bulk_read(cs35l36->regmap, CS35L36_INT1_STATUS, status, in cs35l36_irq()
1329 regmap_bulk_read(cs35l36->regmap, CS35L36_INT1_MASK, masks, in cs35l36_irq()
1344 dev_crit(cs35l36->dev, "Amp short error\n"); in cs35l36_irq()
1345 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1347 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1350 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1352 regmap_update_bits(cs35l36->regmap, CS35L36_INT3_STATUS, in cs35l36_irq()
1359 dev_crit(cs35l36->dev, "Over temperature warning\n"); in cs35l36_irq()
1360 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1362 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1365 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1367 regmap_update_bits(cs35l36->regmap, CS35L36_INT1_STATUS, in cs35l36_irq()
1373 dev_crit(cs35l36->dev, "Over temperature error\n"); in cs35l36_irq()
1374 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1376 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1378 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1380 regmap_update_bits(cs35l36->regmap, CS35L36_INT1_STATUS, in cs35l36_irq()
1386 dev_crit(cs35l36->dev, "VBST Over Voltage error\n"); in cs35l36_irq()
1387 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1389 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1391 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1393 regmap_update_bits(cs35l36->regmap, CS35L36_INT1_STATUS, in cs35l36_irq()
1399 dev_crit(cs35l36->dev, "DCM VBST Under Voltage Error\n"); in cs35l36_irq()
1400 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1402 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1405 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1407 regmap_update_bits(cs35l36->regmap, CS35L36_INT1_STATUS, in cs35l36_irq()
1414 dev_crit(cs35l36->dev, "LBST SHORT error!\n"); in cs35l36_irq()
1415 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1417 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1420 regmap_update_bits(cs35l36->regmap, CS35L36_PROTECT_REL_ERR, in cs35l36_irq()
1422 regmap_update_bits(cs35l36->regmap, CS35L36_INT1_STATUS, in cs35l36_irq()
1541 static int cs35l36_pac(struct cs35l36_private *cs35l36) in cs35l36_pac() argument
1546 if (cs35l36->rev_id != CS35L36_REV_B0) in cs35l36_pac()
1552 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_pac()
1554 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_pac()
1559 regmap_write(cs35l36->regmap, CS35L36_PAC_CTL1, in cs35l36_pac()
1561 regmap_write(cs35l36->regmap, CS35L36_PAC_CTL3, in cs35l36_pac()
1563 regmap_write(cs35l36->regmap, CS35L36_PAC_PMEM_WORD0, in cs35l36_pac()
1566 regmap_write(cs35l36->regmap, CS35L36_PAC_CTL3, in cs35l36_pac()
1568 regmap_write(cs35l36->regmap, CS35L36_PAC_CTL1, in cs35l36_pac()
1573 ret = regmap_read(cs35l36->regmap, CS35L36_INT4_STATUS, &val); in cs35l36_pac()
1575 dev_err(cs35l36->dev, "Failed to read int4_status %d\n", ret); in cs35l36_pac()
1584 ret = regmap_read(cs35l36->regmap, CS35L36_INT4_STATUS, in cs35l36_pac()
1587 dev_err(cs35l36->dev, "Failed to read int4_status %d\n", in cs35l36_pac()
1596 regmap_write(cs35l36->regmap, CS35L36_INT4_STATUS, in cs35l36_pac()
1598 regmap_update_bits(cs35l36->regmap, CS35L36_PAC_CTL1, in cs35l36_pac()
1601 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_pac()
1603 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_pac()
1609 static void cs35l36_apply_vpbr_config(struct cs35l36_private *cs35l36) in cs35l36_apply_vpbr_config() argument
1611 struct cs35l36_platform_data *pdata = &cs35l36->pdata; in cs35l36_apply_vpbr_config()
1614 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL3, in cs35l36_apply_vpbr_config()
1618 regmap_update_bits(cs35l36->regmap, CS35L36_VPBR_CFG, in cs35l36_apply_vpbr_config()
1622 regmap_update_bits(cs35l36->regmap, CS35L36_VPBR_CFG, in cs35l36_apply_vpbr_config()
1626 regmap_update_bits(cs35l36->regmap, CS35L36_VPBR_CFG, in cs35l36_apply_vpbr_config()
1630 regmap_update_bits(cs35l36->regmap, CS35L36_VPBR_CFG, in cs35l36_apply_vpbr_config()
1634 regmap_update_bits(cs35l36->regmap, CS35L36_VPBR_CFG, in cs35l36_apply_vpbr_config()
1638 regmap_update_bits(cs35l36->regmap, CS35L36_VPBR_CFG, in cs35l36_apply_vpbr_config()
1642 regmap_update_bits(cs35l36->regmap, CS35L36_VPBR_CFG, in cs35l36_apply_vpbr_config()
1706 struct cs35l36_private *cs35l36; in cs35l36_i2c_probe() local
1713 cs35l36 = devm_kzalloc(dev, sizeof(struct cs35l36_private), GFP_KERNEL); in cs35l36_i2c_probe()
1714 if (!cs35l36) in cs35l36_i2c_probe()
1717 cs35l36->dev = dev; in cs35l36_i2c_probe()
1719 i2c_set_clientdata(i2c_client, cs35l36); in cs35l36_i2c_probe()
1720 cs35l36->regmap = devm_regmap_init_i2c(i2c_client, &cs35l36_regmap); in cs35l36_i2c_probe()
1721 if (IS_ERR(cs35l36->regmap)) { in cs35l36_i2c_probe()
1722 ret = PTR_ERR(cs35l36->regmap); in cs35l36_i2c_probe()
1727 cs35l36->num_supplies = ARRAY_SIZE(cs35l36_supplies); in cs35l36_i2c_probe()
1729 cs35l36->supplies[i].supply = cs35l36_supplies[i]; in cs35l36_i2c_probe()
1731 ret = devm_regulator_bulk_get(dev, cs35l36->num_supplies, in cs35l36_i2c_probe()
1732 cs35l36->supplies); in cs35l36_i2c_probe()
1739 cs35l36->pdata = *pdata; in cs35l36_i2c_probe()
1753 cs35l36->pdata = *pdata; in cs35l36_i2c_probe()
1756 ret = regulator_bulk_enable(cs35l36->num_supplies, cs35l36->supplies); in cs35l36_i2c_probe()
1763 cs35l36->reset_gpio = devm_gpiod_get_optional(dev, "reset", in cs35l36_i2c_probe()
1765 if (IS_ERR(cs35l36->reset_gpio)) { in cs35l36_i2c_probe()
1766 ret = PTR_ERR(cs35l36->reset_gpio); in cs35l36_i2c_probe()
1767 cs35l36->reset_gpio = NULL; in cs35l36_i2c_probe()
1776 if (cs35l36->reset_gpio) in cs35l36_i2c_probe()
1777 gpiod_set_value_cansleep(cs35l36->reset_gpio, 1); in cs35l36_i2c_probe()
1782 ret = regmap_read(cs35l36->regmap, CS35L36_SW_RESET, &reg_id); in cs35l36_i2c_probe()
1795 ret = regmap_read(cs35l36->regmap, CS35L36_REV_ID, &reg_revid); in cs35l36_i2c_probe()
1801 cs35l36->rev_id = reg_revid >> 8; in cs35l36_i2c_probe()
1803 ret = regmap_read(cs35l36->regmap, CS35L36_OTP_MEM30, &l37_id_reg); in cs35l36_i2c_probe()
1811 cs35l36->chip_version = CS35L36_12V_L37; in cs35l36_i2c_probe()
1813 cs35l36->chip_version = CS35L36_10V_L36; in cs35l36_i2c_probe()
1815 switch (cs35l36->rev_id) { in cs35l36_i2c_probe()
1817 ret = regmap_register_patch(cs35l36->regmap, in cs35l36_i2c_probe()
1827 ret = cs35l36_pac(cs35l36); in cs35l36_i2c_probe()
1833 ret = regmap_register_patch(cs35l36->regmap, in cs35l36_i2c_probe()
1845 cs35l36_apply_vpbr_config(cs35l36); in cs35l36_i2c_probe()
1866 dev_err(cs35l36->dev, "Invalid IRQ polarity: %d\n", irq_pol); in cs35l36_i2c_probe()
1871 regmap_update_bits(cs35l36->regmap, CS35L36_PAD_INTERFACE, in cs35l36_i2c_probe()
1877 cs35l36); in cs35l36_i2c_probe()
1883 regmap_update_bits(cs35l36->regmap, CS35L36_PAD_INTERFACE, in cs35l36_i2c_probe()
1887 regmap_write(cs35l36->regmap, CS35L36_INT1_MASK, in cs35l36_i2c_probe()
1889 regmap_write(cs35l36->regmap, CS35L36_INT3_MASK, in cs35l36_i2c_probe()
1893 cs35l36->chip_version, reg_revid >> 8); in cs35l36_i2c_probe()
1907 gpiod_set_value_cansleep(cs35l36->reset_gpio, 0); in cs35l36_i2c_probe()
1910 regulator_bulk_disable(cs35l36->num_supplies, cs35l36->supplies); in cs35l36_i2c_probe()
1916 struct cs35l36_private *cs35l36 = i2c_get_clientdata(client); in cs35l36_i2c_remove() local
1919 regmap_write(cs35l36->regmap, CS35L36_INT1_MASK, in cs35l36_i2c_remove()
1921 regmap_write(cs35l36->regmap, CS35L36_INT3_MASK, in cs35l36_i2c_remove()
1924 if (cs35l36->reset_gpio) in cs35l36_i2c_remove()
1925 gpiod_set_value_cansleep(cs35l36->reset_gpio, 0); in cs35l36_i2c_remove()
1927 regulator_bulk_disable(cs35l36->num_supplies, cs35l36->supplies); in cs35l36_i2c_remove()