Lines Matching refs:cs35l36
462 struct cs35l36_private *cs35l36 = in cs35l36_ldm_sel_get() local
465 ucontrol->value.integer.value[0] = cs35l36->ldm_mode_sel; in cs35l36_ldm_sel_get()
475 struct cs35l36_private *cs35l36 = in cs35l36_ldm_sel_put() local
480 cs35l36->ldm_mode_sel = val; in cs35l36_ldm_sel_put()
482 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_ldm_sel_put()
509 struct cs35l36_private *cs35l36 = in cs35l36_main_amp_event() local
515 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL1, in cs35l36_main_amp_event()
521 regmap_read(cs35l36->regmap, CS35L36_INT4_RAW_STATUS, ®); in cs35l36_main_amp_event()
524 dev_crit(cs35l36->dev, "PLL Unlocked\n"); in cs35l36_main_amp_event()
526 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RX1_SEL, in cs35l36_main_amp_event()
529 regmap_update_bits(cs35l36->regmap, CS35L36_AMP_OUT_MUTE, in cs35l36_main_amp_event()
534 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RX1_SEL, in cs35l36_main_amp_event()
537 regmap_update_bits(cs35l36->regmap, CS35L36_AMP_OUT_MUTE, in cs35l36_main_amp_event()
542 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL1, in cs35l36_main_amp_event()
561 struct cs35l36_private *cs35l36 = in cs35l36_boost_event() local
566 if (!cs35l36->pdata.extern_boost) in cs35l36_boost_event()
567 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL2, in cs35l36_boost_event()
573 if (!cs35l36->pdata.extern_boost) in cs35l36_boost_event()
574 regmap_update_bits(cs35l36->regmap, CS35L36_PWR_CTRL2, in cs35l36_boost_event()
758 struct cs35l36_private *cs35l36 = in cs35l36_set_dai_fmt() local
773 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_TX_PIN_CTRL, in cs35l36_set_dai_fmt()
776 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RATE_CTRL, in cs35l36_set_dai_fmt()
791 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_TX_PIN_CTRL, in cs35l36_set_dai_fmt()
794 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RATE_CTRL, in cs35l36_set_dai_fmt()
830 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RATE_CTRL, in cs35l36_set_dai_fmt()
833 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_TX_PIN_CTRL, in cs35l36_set_dai_fmt()
836 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_FORMAT, in cs35l36_set_dai_fmt()
868 struct cs35l36_private *cs35l36 = in cs35l36_pcm_hw_params() local
875 regmap_update_bits(cs35l36->regmap, in cs35l36_pcm_hw_params()
897 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_FRAME_CTRL, in cs35l36_pcm_hw_params()
901 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_FRAME_CTRL, in cs35l36_pcm_hw_params()
913 struct cs35l36_private *cs35l36 = in cs35l36_dai_set_sysclk() local
925 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_dai_set_sysclk()
927 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_dai_set_sysclk()
930 regmap_update_bits(cs35l36->regmap, CS35L36_TST_FS_MON0, in cs35l36_dai_set_sysclk()
934 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_dai_set_sysclk()
936 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_dai_set_sysclk()
942 struct cs35l36_private *cs35l36, int freq) in cs35l36_get_clk_config() argument
1007 struct cs35l36_private *cs35l36 = in cs35l36_component_set_sysclk() local
1013 prev_clksrc = cs35l36->clksrc; in cs35l36_component_set_sysclk()
1017 cs35l36->clksrc = CS35L36_PLLSRC_SCLK; in cs35l36_component_set_sysclk()
1020 cs35l36->clksrc = CS35L36_PLLSRC_LRCLK; in cs35l36_component_set_sysclk()
1023 cs35l36->clksrc = CS35L36_PLLSRC_PDMCLK; in cs35l36_component_set_sysclk()
1026 cs35l36->clksrc = CS35L36_PLLSRC_SELF; in cs35l36_component_set_sysclk()
1029 cs35l36->clksrc = CS35L36_PLLSRC_MCLK; in cs35l36_component_set_sysclk()
1035 clk_cfg = cs35l36_get_clk_config(cs35l36, freq); in cs35l36_component_set_sysclk()
1041 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1044 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1047 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1050 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1052 cs35l36->clksrc); in cs35l36_component_set_sysclk()
1053 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1056 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_CLK_CTRL, in cs35l36_component_set_sysclk()
1060 if (cs35l36->rev_id == CS35L36_REV_A0) { in cs35l36_component_set_sysclk()
1061 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_set_sysclk()
1063 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_set_sysclk()
1066 regmap_write(cs35l36->regmap, CS35L36_DCO_CTRL, 0x00036DA8); in cs35l36_component_set_sysclk()
1067 regmap_write(cs35l36->regmap, CS35L36_MISC_CTRL, 0x0100EE0E); in cs35l36_component_set_sysclk()
1069 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_LOOP_PARAMS, in cs35l36_component_set_sysclk()
1073 regmap_update_bits(cs35l36->regmap, CS35L36_PLL_LOOP_PARAMS, in cs35l36_component_set_sysclk()
1077 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_set_sysclk()
1079 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_set_sysclk()
1083 if (cs35l36->clksrc == CS35L36_PLLSRC_PDMCLK) { in cs35l36_component_set_sysclk()
1084 pdm_switch = cs35l36->ldm_mode_sel && in cs35l36_component_set_sysclk()
1088 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_component_set_sysclk()
1092 regmap_update_bits(cs35l36->regmap, CS35L36_DAC_MSM_CFG, in cs35l36_component_set_sysclk()
1097 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_component_set_sysclk()
1101 pdm_switch = cs35l36->ldm_mode_sel && in cs35l36_component_set_sysclk()
1105 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_component_set_sysclk()
1109 regmap_update_bits(cs35l36->regmap, CS35L36_DAC_MSM_CFG, in cs35l36_component_set_sysclk()
1114 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_component_set_sysclk()
1122 static int cs35l36_boost_inductor(struct cs35l36_private *cs35l36, int inductor) in cs35l36_boost_inductor() argument
1124 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_COEFF, in cs35l36_boost_inductor()
1126 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_COEFF, in cs35l36_boost_inductor()
1129 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SW_FREQ, in cs35l36_boost_inductor()
1134 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SLOPE_LBST, in cs35l36_boost_inductor()
1137 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SLOPE_LBST, in cs35l36_boost_inductor()
1141 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SLOPE_LBST, in cs35l36_boost_inductor()
1144 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_SLOPE_LBST, in cs35l36_boost_inductor()
1148 dev_err(cs35l36->dev, "%s Invalid Inductor Value %d uH\n", in cs35l36_boost_inductor()
1158 struct cs35l36_private *cs35l36 = in cs35l36_component_probe() local
1162 if ((cs35l36->rev_id == CS35L36_REV_A0) && cs35l36->pdata.dcm_mode) { in cs35l36_component_probe()
1163 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_DCM_CTRL, in cs35l36_component_probe()
1167 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1169 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1172 regmap_update_bits(cs35l36->regmap, CS35L36_BST_TST_MANUAL, in cs35l36_component_probe()
1175 regmap_update_bits(cs35l36->regmap, CS35L36_BST_TST_MANUAL, in cs35l36_component_probe()
1179 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1181 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1185 if (cs35l36->pdata.amp_pcm_inv) in cs35l36_component_probe()
1186 regmap_update_bits(cs35l36->regmap, CS35L36_AMP_DIG_VOL_CTRL, in cs35l36_component_probe()
1190 if (cs35l36->pdata.multi_amp_mode) in cs35l36_component_probe()
1191 regmap_update_bits(cs35l36->regmap, CS35L36_ASP_TX_PIN_CTRL, in cs35l36_component_probe()
1195 if (cs35l36->pdata.imon_pol_inv) in cs35l36_component_probe()
1196 regmap_update_bits(cs35l36->regmap, CS35L36_VI_SPKMON_FILT, in cs35l36_component_probe()
1199 if (cs35l36->pdata.vmon_pol_inv) in cs35l36_component_probe()
1200 regmap_update_bits(cs35l36->regmap, CS35L36_VI_SPKMON_FILT, in cs35l36_component_probe()
1203 if (cs35l36->pdata.bst_vctl) in cs35l36_component_probe()
1204 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_VCTRL1, in cs35l36_component_probe()
1206 cs35l36->pdata.bst_vctl); in cs35l36_component_probe()
1208 if (cs35l36->pdata.bst_vctl_sel) in cs35l36_component_probe()
1209 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_VCTRL2, in cs35l36_component_probe()
1211 cs35l36->pdata.bst_vctl_sel); in cs35l36_component_probe()
1213 if (cs35l36->pdata.bst_ipk) in cs35l36_component_probe()
1214 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_PEAK_CUR, in cs35l36_component_probe()
1216 cs35l36->pdata.bst_ipk); in cs35l36_component_probe()
1218 if (cs35l36->pdata.boost_ind) { in cs35l36_component_probe()
1219 ret = cs35l36_boost_inductor(cs35l36, cs35l36->pdata.boost_ind); in cs35l36_component_probe()
1221 dev_err(cs35l36->dev, in cs35l36_component_probe()
1227 if (cs35l36->pdata.temp_warn_thld) in cs35l36_component_probe()
1228 regmap_update_bits(cs35l36->regmap, CS35L36_DTEMP_WARN_THLD, in cs35l36_component_probe()
1230 cs35l36->pdata.temp_warn_thld); in cs35l36_component_probe()
1232 if (cs35l36->pdata.irq_drv_sel) in cs35l36_component_probe()
1233 regmap_update_bits(cs35l36->regmap, CS35L36_PAD_INTERFACE, in cs35l36_component_probe()
1235 cs35l36->pdata.irq_drv_sel << in cs35l36_component_probe()
1238 if (cs35l36->pdata.irq_gpio_sel) in cs35l36_component_probe()
1239 regmap_update_bits(cs35l36->regmap, CS35L36_PAD_INTERFACE, in cs35l36_component_probe()
1241 cs35l36->pdata.irq_gpio_sel << in cs35l36_component_probe()
1252 if (cs35l36->chip_version == CS35L36_10V_L36) { in cs35l36_component_probe()
1253 regmap_update_bits(cs35l36->regmap, in cs35l36_component_probe()
1258 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1260 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1263 regmap_update_bits(cs35l36->regmap, CS35L36_BST_ANA2_TEST, in cs35l36_component_probe()
1267 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_VCTRL2, in cs35l36_component_probe()
1270 regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_VCTRL1, in cs35l36_component_probe()
1273 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1275 regmap_write(cs35l36->regmap, CS35L36_TESTKEY_CTRL, in cs35l36_component_probe()
1284 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()
1705 struct cs35l36_private *cs35l36; in cs35l36_i2c_probe() local
1712 cs35l36 = devm_kzalloc(dev, sizeof(struct cs35l36_private), GFP_KERNEL); in cs35l36_i2c_probe()
1713 if (!cs35l36) in cs35l36_i2c_probe()
1716 cs35l36->dev = dev; in cs35l36_i2c_probe()
1718 i2c_set_clientdata(i2c_client, cs35l36); in cs35l36_i2c_probe()
1719 cs35l36->regmap = devm_regmap_init_i2c(i2c_client, &cs35l36_regmap); in cs35l36_i2c_probe()
1720 if (IS_ERR(cs35l36->regmap)) { in cs35l36_i2c_probe()
1721 ret = PTR_ERR(cs35l36->regmap); in cs35l36_i2c_probe()
1726 cs35l36->num_supplies = ARRAY_SIZE(cs35l36_supplies); in cs35l36_i2c_probe()
1728 cs35l36->supplies[i].supply = cs35l36_supplies[i]; in cs35l36_i2c_probe()
1730 ret = devm_regulator_bulk_get(dev, cs35l36->num_supplies, in cs35l36_i2c_probe()
1731 cs35l36->supplies); in cs35l36_i2c_probe()
1738 cs35l36->pdata = *pdata; in cs35l36_i2c_probe()
1752 cs35l36->pdata = *pdata; in cs35l36_i2c_probe()
1755 ret = regulator_bulk_enable(cs35l36->num_supplies, cs35l36->supplies); in cs35l36_i2c_probe()
1762 cs35l36->reset_gpio = devm_gpiod_get_optional(dev, "reset", in cs35l36_i2c_probe()
1764 if (IS_ERR(cs35l36->reset_gpio)) { in cs35l36_i2c_probe()
1765 ret = PTR_ERR(cs35l36->reset_gpio); in cs35l36_i2c_probe()
1766 cs35l36->reset_gpio = NULL; in cs35l36_i2c_probe()
1775 if (cs35l36->reset_gpio) in cs35l36_i2c_probe()
1776 gpiod_set_value_cansleep(cs35l36->reset_gpio, 1); in cs35l36_i2c_probe()
1781 ret = regmap_read(cs35l36->regmap, CS35L36_SW_RESET, ®_id); in cs35l36_i2c_probe()
1794 ret = regmap_read(cs35l36->regmap, CS35L36_REV_ID, ®_revid); in cs35l36_i2c_probe()
1800 cs35l36->rev_id = reg_revid >> 8; in cs35l36_i2c_probe()
1802 ret = regmap_read(cs35l36->regmap, CS35L36_OTP_MEM30, &l37_id_reg); in cs35l36_i2c_probe()
1810 cs35l36->chip_version = CS35L36_12V_L37; in cs35l36_i2c_probe()
1812 cs35l36->chip_version = CS35L36_10V_L36; in cs35l36_i2c_probe()
1814 switch (cs35l36->rev_id) { in cs35l36_i2c_probe()
1816 ret = regmap_register_patch(cs35l36->regmap, in cs35l36_i2c_probe()
1826 ret = cs35l36_pac(cs35l36); in cs35l36_i2c_probe()
1832 ret = regmap_register_patch(cs35l36->regmap, in cs35l36_i2c_probe()
1844 cs35l36_apply_vpbr_config(cs35l36); in cs35l36_i2c_probe()
1865 dev_err(cs35l36->dev, "Invalid IRQ polarity: %d\n", irq_pol); in cs35l36_i2c_probe()
1870 regmap_update_bits(cs35l36->regmap, CS35L36_PAD_INTERFACE, in cs35l36_i2c_probe()
1876 cs35l36); in cs35l36_i2c_probe()
1882 regmap_update_bits(cs35l36->regmap, CS35L36_PAD_INTERFACE, in cs35l36_i2c_probe()
1886 regmap_write(cs35l36->regmap, CS35L36_INT1_MASK, in cs35l36_i2c_probe()
1888 regmap_write(cs35l36->regmap, CS35L36_INT3_MASK, in cs35l36_i2c_probe()
1892 cs35l36->chip_version, reg_revid >> 8); in cs35l36_i2c_probe()
1906 gpiod_set_value_cansleep(cs35l36->reset_gpio, 0); in cs35l36_i2c_probe()
1909 regulator_bulk_disable(cs35l36->num_supplies, cs35l36->supplies); in cs35l36_i2c_probe()
1915 struct cs35l36_private *cs35l36 = i2c_get_clientdata(client); in cs35l36_i2c_remove() local
1918 regmap_write(cs35l36->regmap, CS35L36_INT1_MASK, in cs35l36_i2c_remove()
1920 regmap_write(cs35l36->regmap, CS35L36_INT3_MASK, in cs35l36_i2c_remove()
1923 if (cs35l36->reset_gpio) in cs35l36_i2c_remove()
1924 gpiod_set_value_cansleep(cs35l36->reset_gpio, 0); in cs35l36_i2c_remove()
1926 regulator_bulk_disable(cs35l36->num_supplies, cs35l36->supplies); in cs35l36_i2c_remove()