Lines Matching refs:rk808
550 struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); in rk808_pm_power_off() local
552 switch (rk808->variant) { in rk808_pm_power_off()
573 ret = regmap_update_bits(rk808->regmap, reg, bit, bit); in rk808_pm_power_off()
580 struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); in rk808_restart_notify() local
584 switch (rk808->variant) { in rk808_restart_notify()
594 ret = regmap_update_bits(rk808->regmap, reg, bit, bit); in rk808_restart_notify()
608 struct rk808 *rk808 = i2c_get_clientdata(client); in rk8xx_shutdown() local
611 switch (rk808->variant) { in rk8xx_shutdown()
613 ret = regmap_update_bits(rk808->regmap, in rk8xx_shutdown()
620 ret = regmap_update_bits(rk808->regmap, in rk8xx_shutdown()
647 struct rk808 *rk808; in rk808_probe() local
657 rk808 = devm_kzalloc(&client->dev, sizeof(*rk808), GFP_KERNEL); in rk808_probe()
658 if (!rk808) in rk808_probe()
685 rk808->variant = ((msb << 8) | lsb) & RK8XX_ID_MSK; in rk808_probe()
686 dev_info(&client->dev, "chip id: 0x%x\n", (unsigned int)rk808->variant); in rk808_probe()
688 switch (rk808->variant) { in rk808_probe()
690 rk808->regmap_cfg = &rk805_regmap_config; in rk808_probe()
691 rk808->regmap_irq_chip = &rk805_irq_chip; in rk808_probe()
698 rk808->regmap_cfg = &rk808_regmap_config; in rk808_probe()
699 rk808->regmap_irq_chip = &rk808_irq_chip; in rk808_probe()
706 rk808->regmap_cfg = &rk818_regmap_config; in rk808_probe()
707 rk808->regmap_irq_chip = &rk818_irq_chip; in rk808_probe()
715 rk808->regmap_cfg = &rk817_regmap_config; in rk808_probe()
716 rk808->regmap_irq_chip = &rk817_irq_chip; in rk808_probe()
724 rk808->variant); in rk808_probe()
728 rk808->i2c = client; in rk808_probe()
729 i2c_set_clientdata(client, rk808); in rk808_probe()
731 rk808->regmap = devm_regmap_init_i2c(client, rk808->regmap_cfg); in rk808_probe()
732 if (IS_ERR(rk808->regmap)) { in rk808_probe()
734 return PTR_ERR(rk808->regmap); in rk808_probe()
742 ret = regmap_add_irq_chip(rk808->regmap, client->irq, in rk808_probe()
744 rk808->regmap_irq_chip, &rk808->irq_data); in rk808_probe()
751 ret = regmap_update_bits(rk808->regmap, in rk808_probe()
765 regmap_irq_get_domain(rk808->irq_data)); in rk808_probe()
775 switch (rk808->variant) { in rk808_probe()
791 regmap_del_irq_chip(client->irq, rk808->irq_data); in rk808_probe()
797 struct rk808 *rk808 = i2c_get_clientdata(client); in rk808_remove() local
799 regmap_del_irq_chip(client->irq, rk808->irq_data); in rk808_remove()
813 struct rk808 *rk808 = i2c_get_clientdata(to_i2c_client(dev)); in rk8xx_suspend() local
816 switch (rk808->variant) { in rk8xx_suspend()
818 ret = regmap_update_bits(rk808->regmap, in rk8xx_suspend()
825 ret = regmap_update_bits(rk808->regmap, in rk8xx_suspend()
839 struct rk808 *rk808 = i2c_get_clientdata(to_i2c_client(dev)); in rk8xx_resume() local
842 switch (rk808->variant) { in rk8xx_resume()
845 ret = regmap_update_bits(rk808->regmap, in rk8xx_resume()