tas6424 76 sound/soc/codecs/tas6424.c struct tas6424_data *tas6424 = snd_soc_component_get_drvdata(component); tas6424 85 sound/soc/codecs/tas6424.c tas6424->last_fault1 = 0; tas6424 86 sound/soc/codecs/tas6424.c tas6424->last_fault2 = 0; tas6424 87 sound/soc/codecs/tas6424.c tas6424->last_warn = 0; tas6424 88 sound/soc/codecs/tas6424.c schedule_delayed_work(&tas6424->fault_check_work, tas6424 92 sound/soc/codecs/tas6424.c cancel_delayed_work_sync(&tas6424->fault_check_work); tas6424 258 sound/soc/codecs/tas6424.c struct tas6424_data *tas6424 = snd_soc_component_get_drvdata(component); tas6424 263 sound/soc/codecs/tas6424.c if (tas6424->mute_gpio) { tas6424 264 sound/soc/codecs/tas6424.c gpiod_set_value_cansleep(tas6424->mute_gpio, mute); tas6424 280 sound/soc/codecs/tas6424.c struct tas6424_data *tas6424 = snd_soc_component_get_drvdata(component); tas6424 285 sound/soc/codecs/tas6424.c regcache_cache_only(tas6424->regmap, true); tas6424 286 sound/soc/codecs/tas6424.c regcache_mark_dirty(tas6424->regmap); tas6424 288 sound/soc/codecs/tas6424.c ret = regulator_bulk_disable(ARRAY_SIZE(tas6424->supplies), tas6424 289 sound/soc/codecs/tas6424.c tas6424->supplies); tas6424 300 sound/soc/codecs/tas6424.c struct tas6424_data *tas6424 = snd_soc_component_get_drvdata(component); tas6424 306 sound/soc/codecs/tas6424.c if (!regmap_read(tas6424->regmap, TAS6424_DC_DIAG_CTRL1, ®_val)) tas6424 309 sound/soc/codecs/tas6424.c ret = regulator_bulk_enable(ARRAY_SIZE(tas6424->supplies), tas6424 310 sound/soc/codecs/tas6424.c tas6424->supplies); tas6424 316 sound/soc/codecs/tas6424.c regcache_cache_only(tas6424->regmap, false); tas6424 318 sound/soc/codecs/tas6424.c ret = regcache_sync(tas6424->regmap); tas6424 324 sound/soc/codecs/tas6424.c if (tas6424->mute_gpio) { tas6424 325 sound/soc/codecs/tas6424.c gpiod_set_value_cansleep(tas6424->mute_gpio, 0); tas6424 404 sound/soc/codecs/tas6424.c struct tas6424_data *tas6424 = container_of(work, struct tas6424_data, tas6424 406 sound/soc/codecs/tas6424.c struct device *dev = tas6424->dev; tas6424 410 sound/soc/codecs/tas6424.c ret = regmap_read(tas6424->regmap, TAS6424_CHANNEL_FAULT, ®); tas6424 417 sound/soc/codecs/tas6424.c tas6424->last_cfault = reg; tas6424 427 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OC_CH1) && !(tas6424->last_cfault & TAS6424_FAULT_OC_CH1)) tas6424 430 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OC_CH2) && !(tas6424->last_cfault & TAS6424_FAULT_OC_CH2)) tas6424 433 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OC_CH3) && !(tas6424->last_cfault & TAS6424_FAULT_OC_CH3)) tas6424 436 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OC_CH4) && !(tas6424->last_cfault & TAS6424_FAULT_OC_CH4)) tas6424 439 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_DC_CH1) && !(tas6424->last_cfault & TAS6424_FAULT_DC_CH1)) tas6424 442 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_DC_CH2) && !(tas6424->last_cfault & TAS6424_FAULT_DC_CH2)) tas6424 445 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_DC_CH3) && !(tas6424->last_cfault & TAS6424_FAULT_DC_CH3)) tas6424 448 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_DC_CH4) && !(tas6424->last_cfault & TAS6424_FAULT_DC_CH4)) tas6424 452 sound/soc/codecs/tas6424.c tas6424->last_cfault = reg; tas6424 455 sound/soc/codecs/tas6424.c ret = regmap_read(tas6424->regmap, TAS6424_GLOB_FAULT1, ®); tas6424 474 sound/soc/codecs/tas6424.c tas6424->last_fault1 = reg; tas6424 478 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_PVDD_OV) && !(tas6424->last_fault1 & TAS6424_FAULT_PVDD_OV)) tas6424 481 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_VBAT_OV) && !(tas6424->last_fault1 & TAS6424_FAULT_VBAT_OV)) tas6424 484 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_PVDD_UV) && !(tas6424->last_fault1 & TAS6424_FAULT_PVDD_UV)) tas6424 487 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_VBAT_UV) && !(tas6424->last_fault1 & TAS6424_FAULT_VBAT_UV)) tas6424 491 sound/soc/codecs/tas6424.c tas6424->last_fault1 = reg; tas6424 494 sound/soc/codecs/tas6424.c ret = regmap_read(tas6424->regmap, TAS6424_GLOB_FAULT2, ®); tas6424 507 sound/soc/codecs/tas6424.c tas6424->last_fault2 = reg; tas6424 511 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OTSD) && !(tas6424->last_fault2 & TAS6424_FAULT_OTSD)) tas6424 514 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OTSD_CH1) && !(tas6424->last_fault2 & TAS6424_FAULT_OTSD_CH1)) tas6424 517 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OTSD_CH2) && !(tas6424->last_fault2 & TAS6424_FAULT_OTSD_CH2)) tas6424 520 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OTSD_CH3) && !(tas6424->last_fault2 & TAS6424_FAULT_OTSD_CH3)) tas6424 523 sound/soc/codecs/tas6424.c if ((reg & TAS6424_FAULT_OTSD_CH4) && !(tas6424->last_fault2 & TAS6424_FAULT_OTSD_CH4)) tas6424 527 sound/soc/codecs/tas6424.c tas6424->last_fault2 = reg; tas6424 530 sound/soc/codecs/tas6424.c ret = regmap_read(tas6424->regmap, TAS6424_WARN, ®); tas6424 545 sound/soc/codecs/tas6424.c tas6424->last_warn = reg; tas6424 549 sound/soc/codecs/tas6424.c if ((reg & TAS6424_WARN_VDD_UV) && !(tas6424->last_warn & TAS6424_WARN_VDD_UV)) tas6424 552 sound/soc/codecs/tas6424.c if ((reg & TAS6424_WARN_VDD_POR) && !(tas6424->last_warn & TAS6424_WARN_VDD_POR)) tas6424 555 sound/soc/codecs/tas6424.c if ((reg & TAS6424_WARN_VDD_OTW) && !(tas6424->last_warn & TAS6424_WARN_VDD_OTW)) tas6424 558 sound/soc/codecs/tas6424.c if ((reg & TAS6424_WARN_VDD_OTW_CH1) && !(tas6424->last_warn & TAS6424_WARN_VDD_OTW_CH1)) tas6424 561 sound/soc/codecs/tas6424.c if ((reg & TAS6424_WARN_VDD_OTW_CH2) && !(tas6424->last_warn & TAS6424_WARN_VDD_OTW_CH2)) tas6424 564 sound/soc/codecs/tas6424.c if ((reg & TAS6424_WARN_VDD_OTW_CH3) && !(tas6424->last_warn & TAS6424_WARN_VDD_OTW_CH3)) tas6424 567 sound/soc/codecs/tas6424.c if ((reg & TAS6424_WARN_VDD_OTW_CH4) && !(tas6424->last_warn & TAS6424_WARN_VDD_OTW_CH4)) tas6424 571 sound/soc/codecs/tas6424.c tas6424->last_warn = reg; tas6424 574 sound/soc/codecs/tas6424.c ret = regmap_write_bits(tas6424->regmap, TAS6424_MISC_CTRL3, tas6424 579 sound/soc/codecs/tas6424.c ret = regmap_write_bits(tas6424->regmap, TAS6424_MISC_CTRL3, tas6424 586 sound/soc/codecs/tas6424.c schedule_delayed_work(&tas6424->fault_check_work, tas6424 688 sound/soc/codecs/tas6424.c struct tas6424_data *tas6424; tas6424 692 sound/soc/codecs/tas6424.c tas6424 = devm_kzalloc(dev, sizeof(*tas6424), GFP_KERNEL); tas6424 693 sound/soc/codecs/tas6424.c if (!tas6424) tas6424 695 sound/soc/codecs/tas6424.c dev_set_drvdata(dev, tas6424); tas6424 697 sound/soc/codecs/tas6424.c tas6424->dev = dev; tas6424 699 sound/soc/codecs/tas6424.c tas6424->regmap = devm_regmap_init_i2c(client, &tas6424_regmap_config); tas6424 700 sound/soc/codecs/tas6424.c if (IS_ERR(tas6424->regmap)) { tas6424 701 sound/soc/codecs/tas6424.c ret = PTR_ERR(tas6424->regmap); tas6424 712 sound/soc/codecs/tas6424.c tas6424->standby_gpio = devm_gpiod_get_optional(dev, "standby", tas6424 714 sound/soc/codecs/tas6424.c if (IS_ERR(tas6424->standby_gpio)) { tas6424 715 sound/soc/codecs/tas6424.c if (PTR_ERR(tas6424->standby_gpio) == -EPROBE_DEFER) tas6424 718 sound/soc/codecs/tas6424.c PTR_ERR(tas6424->standby_gpio)); tas6424 719 sound/soc/codecs/tas6424.c tas6424->standby_gpio = NULL; tas6424 728 sound/soc/codecs/tas6424.c tas6424->mute_gpio = devm_gpiod_get_optional(dev, "mute", tas6424 730 sound/soc/codecs/tas6424.c if (IS_ERR(tas6424->mute_gpio)) { tas6424 731 sound/soc/codecs/tas6424.c if (PTR_ERR(tas6424->mute_gpio) == -EPROBE_DEFER) tas6424 734 sound/soc/codecs/tas6424.c PTR_ERR(tas6424->mute_gpio)); tas6424 735 sound/soc/codecs/tas6424.c tas6424->mute_gpio = NULL; tas6424 738 sound/soc/codecs/tas6424.c for (i = 0; i < ARRAY_SIZE(tas6424->supplies); i++) tas6424 739 sound/soc/codecs/tas6424.c tas6424->supplies[i].supply = tas6424_supply_names[i]; tas6424 740 sound/soc/codecs/tas6424.c ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(tas6424->supplies), tas6424 741 sound/soc/codecs/tas6424.c tas6424->supplies); tas6424 747 sound/soc/codecs/tas6424.c ret = regulator_bulk_enable(ARRAY_SIZE(tas6424->supplies), tas6424 748 sound/soc/codecs/tas6424.c tas6424->supplies); tas6424 755 sound/soc/codecs/tas6424.c ret = regmap_update_bits(tas6424->regmap, TAS6424_MODE_CTRL, tas6424 762 sound/soc/codecs/tas6424.c INIT_DELAYED_WORK(&tas6424->fault_check_work, tas6424_fault_check_work); tas6424 777 sound/soc/codecs/tas6424.c struct tas6424_data *tas6424 = dev_get_drvdata(dev); tas6424 780 sound/soc/codecs/tas6424.c cancel_delayed_work_sync(&tas6424->fault_check_work); tas6424 783 sound/soc/codecs/tas6424.c if (tas6424->standby_gpio) tas6424 784 sound/soc/codecs/tas6424.c gpiod_set_value_cansleep(tas6424->standby_gpio, 1); tas6424 786 sound/soc/codecs/tas6424.c ret = regulator_bulk_disable(ARRAY_SIZE(tas6424->supplies), tas6424 787 sound/soc/codecs/tas6424.c tas6424->supplies);