twl6040            16 drivers/clk/clk-twl6040.c 	struct twl6040 *twl6040;
twl6040            36 drivers/clk/clk-twl6040.c 	ret = twl6040_set_bits(pdmclk->twl6040, reg, reset_mask);
twl6040            40 drivers/clk/clk-twl6040.c 	ret = twl6040_clear_bits(pdmclk->twl6040, reg, reset_mask);
twl6040            73 drivers/clk/clk-twl6040.c 	ret = twl6040_power(pdmclk->twl6040, 1);
twl6040            87 drivers/clk/clk-twl6040.c 	twl6040_power(pdmclk->twl6040, 0);
twl6040            98 drivers/clk/clk-twl6040.c 	ret = twl6040_power(pdmclk->twl6040, 0);
twl6040           110 drivers/clk/clk-twl6040.c 	return twl6040_get_sysclk(pdmclk->twl6040);
twl6040           128 drivers/clk/clk-twl6040.c 	struct twl6040 *twl6040 = dev_get_drvdata(pdev->dev.parent);
twl6040           137 drivers/clk/clk-twl6040.c 	clkdata->twl6040 = twl6040;
twl6040            25 drivers/gpio/gpio-twl6040.c 	struct twl6040 *twl6040 = dev_get_drvdata(chip->parent->parent);
twl6040            28 drivers/gpio/gpio-twl6040.c 	ret = twl6040_reg_read(twl6040, TWL6040_REG_GPOCTL);
twl6040            50 drivers/gpio/gpio-twl6040.c 	struct twl6040 *twl6040 = dev_get_drvdata(chip->parent->parent);
twl6040            54 drivers/gpio/gpio-twl6040.c 	ret = twl6040_reg_read(twl6040, TWL6040_REG_GPOCTL);
twl6040            63 drivers/gpio/gpio-twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_GPOCTL, gpoctl);
twl6040            81 drivers/gpio/gpio-twl6040.c 	struct twl6040 *twl6040 = dev_get_drvdata(twl6040_core_dev);
twl6040            86 drivers/gpio/gpio-twl6040.c 	if (twl6040_get_revid(twl6040) < TWL6041_REV_ES2_0)
twl6040            50 drivers/input/misc/twl6040-vibra.c 	struct twl6040 *twl6040;
twl6040            56 drivers/input/misc/twl6040-vibra.c 	struct twl6040 *twl6040 = info->twl6040;
twl6040            59 drivers/input/misc/twl6040-vibra.c 	status = twl6040_reg_read(twl6040, TWL6040_REG_STATUS);
twl6040            62 drivers/input/misc/twl6040-vibra.c 		twl6040_clear_bits(twl6040, TWL6040_REG_VIBCTLL,
twl6040            67 drivers/input/misc/twl6040-vibra.c 		twl6040_clear_bits(twl6040, TWL6040_REG_VIBCTLR,
twl6040            76 drivers/input/misc/twl6040-vibra.c 	struct twl6040 *twl6040 = info->twl6040;
twl6040            85 drivers/input/misc/twl6040-vibra.c 	twl6040_power(info->twl6040, 1);
twl6040            86 drivers/input/misc/twl6040-vibra.c 	if (twl6040_get_revid(twl6040) <= TWL6040_REV_ES1_1) {
twl6040            92 drivers/input/misc/twl6040-vibra.c 		twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLL,
twl6040            94 drivers/input/misc/twl6040-vibra.c 		twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLR,
twl6040            99 drivers/input/misc/twl6040-vibra.c 	twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLL,
twl6040           101 drivers/input/misc/twl6040-vibra.c 	twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLR,
twl6040           109 drivers/input/misc/twl6040-vibra.c 	struct twl6040 *twl6040 = info->twl6040;
twl6040           111 drivers/input/misc/twl6040-vibra.c 	twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLL, 0x00);
twl6040           112 drivers/input/misc/twl6040-vibra.c 	twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLR, 0x00);
twl6040           113 drivers/input/misc/twl6040-vibra.c 	twl6040_power(info->twl6040, 0);
twl6040           146 drivers/input/misc/twl6040-vibra.c 	struct twl6040 *twl6040 = info->twl6040;
twl6040           162 drivers/input/misc/twl6040-vibra.c 	twl6040_reg_write(twl6040, TWL6040_REG_VIBDATL, vibdatl);
twl6040           163 drivers/input/misc/twl6040-vibra.c 	twl6040_reg_write(twl6040, TWL6040_REG_VIBDATR, vibdatr);
twl6040           173 drivers/input/misc/twl6040-vibra.c 	ret = twl6040_get_vibralr_status(info->twl6040);
twl6040           253 drivers/input/misc/twl6040-vibra.c 	info->twl6040 = dev_get_drvdata(pdev->dev.parent);
twl6040            99 drivers/mfd/twl6040.c int twl6040_reg_read(struct twl6040 *twl6040, unsigned int reg)
twl6040           104 drivers/mfd/twl6040.c 	ret = regmap_read(twl6040->regmap, reg, &val);
twl6040           112 drivers/mfd/twl6040.c int twl6040_reg_write(struct twl6040 *twl6040, unsigned int reg, u8 val)
twl6040           116 drivers/mfd/twl6040.c 	ret = regmap_write(twl6040->regmap, reg, val);
twl6040           122 drivers/mfd/twl6040.c int twl6040_set_bits(struct twl6040 *twl6040, unsigned int reg, u8 mask)
twl6040           124 drivers/mfd/twl6040.c 	return regmap_update_bits(twl6040->regmap, reg, mask, mask);
twl6040           128 drivers/mfd/twl6040.c int twl6040_clear_bits(struct twl6040 *twl6040, unsigned int reg, u8 mask)
twl6040           130 drivers/mfd/twl6040.c 	return regmap_update_bits(twl6040->regmap, reg, mask, 0);
twl6040           135 drivers/mfd/twl6040.c static int twl6040_power_up_manual(struct twl6040 *twl6040)
twl6040           142 drivers/mfd/twl6040.c 	ret = twl6040_reg_write(twl6040, TWL6040_REG_LDOCTL, ldoctl);
twl6040           149 drivers/mfd/twl6040.c 	ret = twl6040_reg_write(twl6040, TWL6040_REG_NCPCTL, ncpctl);
twl6040           156 drivers/mfd/twl6040.c 	ret = twl6040_reg_write(twl6040, TWL6040_REG_LDOCTL, ldoctl);
twl6040           163 drivers/mfd/twl6040.c 	ret = twl6040_reg_write(twl6040, TWL6040_REG_LPPLLCTL, lppllctl);
twl6040           170 drivers/mfd/twl6040.c 	ret = twl6040_reg_write(twl6040, TWL6040_REG_LDOCTL, ldoctl);
twl6040           178 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_LPPLLCTL, lppllctl);
twl6040           181 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_LDOCTL, ldoctl);
twl6040           184 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_NCPCTL, ncpctl);
twl6040           187 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_LDOCTL, ldoctl);
twl6040           189 drivers/mfd/twl6040.c 	dev_err(twl6040->dev, "manual power-up failed\n");
twl6040           194 drivers/mfd/twl6040.c static void twl6040_power_down_manual(struct twl6040 *twl6040)
twl6040           198 drivers/mfd/twl6040.c 	ncpctl = twl6040_reg_read(twl6040, TWL6040_REG_NCPCTL);
twl6040           199 drivers/mfd/twl6040.c 	ldoctl = twl6040_reg_read(twl6040, TWL6040_REG_LDOCTL);
twl6040           200 drivers/mfd/twl6040.c 	lppllctl = twl6040_reg_read(twl6040, TWL6040_REG_LPPLLCTL);
twl6040           204 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_LDOCTL, ldoctl);
twl6040           209 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_LPPLLCTL, lppllctl);
twl6040           213 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_LDOCTL, ldoctl);
twl6040           217 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_NCPCTL, ncpctl);
twl6040           221 drivers/mfd/twl6040.c 	twl6040_reg_write(twl6040, TWL6040_REG_LDOCTL, ldoctl);
twl6040           226 drivers/mfd/twl6040.c 	struct twl6040 *twl6040 = data;
twl6040           228 drivers/mfd/twl6040.c 	complete(&twl6040->ready);
twl6040           235 drivers/mfd/twl6040.c 	struct twl6040 *twl6040 = data;
twl6040           238 drivers/mfd/twl6040.c 	status = twl6040_reg_read(twl6040, TWL6040_REG_STATUS);
twl6040           240 drivers/mfd/twl6040.c 		dev_warn(twl6040->dev, "Thermal shutdown, powering-off");
twl6040           241 drivers/mfd/twl6040.c 		twl6040_power(twl6040, 0);
twl6040           243 drivers/mfd/twl6040.c 		dev_warn(twl6040->dev, "Leaving thermal shutdown, powering-on");
twl6040           244 drivers/mfd/twl6040.c 		twl6040_power(twl6040, 1);
twl6040           250 drivers/mfd/twl6040.c static int twl6040_power_up_automatic(struct twl6040 *twl6040)
twl6040           254 drivers/mfd/twl6040.c 	gpio_set_value(twl6040->audpwron, 1);
twl6040           256 drivers/mfd/twl6040.c 	time_left = wait_for_completion_timeout(&twl6040->ready,
twl6040           261 drivers/mfd/twl6040.c 		dev_warn(twl6040->dev, "timeout waiting for READYINT\n");
twl6040           262 drivers/mfd/twl6040.c 		intid = twl6040_reg_read(twl6040, TWL6040_REG_INTID);
twl6040           264 drivers/mfd/twl6040.c 			dev_err(twl6040->dev, "automatic power-up failed\n");
twl6040           265 drivers/mfd/twl6040.c 			gpio_set_value(twl6040->audpwron, 0);
twl6040           273 drivers/mfd/twl6040.c int twl6040_power(struct twl6040 *twl6040, int on)
twl6040           277 drivers/mfd/twl6040.c 	mutex_lock(&twl6040->mutex);
twl6040           281 drivers/mfd/twl6040.c 		if (twl6040->power_count++)
twl6040           284 drivers/mfd/twl6040.c 		ret = clk_prepare_enable(twl6040->clk32k);
twl6040           286 drivers/mfd/twl6040.c 			twl6040->power_count = 0;
twl6040           291 drivers/mfd/twl6040.c 		regcache_cache_only(twl6040->regmap, false);
twl6040           293 drivers/mfd/twl6040.c 		if (gpio_is_valid(twl6040->audpwron)) {
twl6040           295 drivers/mfd/twl6040.c 			ret = twl6040_power_up_automatic(twl6040);
twl6040           297 drivers/mfd/twl6040.c 				clk_disable_unprepare(twl6040->clk32k);
twl6040           298 drivers/mfd/twl6040.c 				twl6040->power_count = 0;
twl6040           303 drivers/mfd/twl6040.c 			ret = twl6040_power_up_manual(twl6040);
twl6040           305 drivers/mfd/twl6040.c 				clk_disable_unprepare(twl6040->clk32k);
twl6040           306 drivers/mfd/twl6040.c 				twl6040->power_count = 0;
twl6040           318 drivers/mfd/twl6040.c 		ret = regcache_sync(twl6040->regmap);
twl6040           320 drivers/mfd/twl6040.c 			dev_err(twl6040->dev, "Failed to sync with the HW: %i\n",
twl6040           326 drivers/mfd/twl6040.c 		twl6040->pll = TWL6040_SYSCLK_SEL_LPPLL;
twl6040           327 drivers/mfd/twl6040.c 		twl6040->sysclk_rate = 19200000;
twl6040           330 drivers/mfd/twl6040.c 		if (!twl6040->power_count) {
twl6040           331 drivers/mfd/twl6040.c 			dev_err(twl6040->dev,
twl6040           337 drivers/mfd/twl6040.c 		if (--twl6040->power_count)
twl6040           340 drivers/mfd/twl6040.c 		if (gpio_is_valid(twl6040->audpwron)) {
twl6040           342 drivers/mfd/twl6040.c 			gpio_set_value(twl6040->audpwron, 0);
twl6040           348 drivers/mfd/twl6040.c 			twl6040_power_down_manual(twl6040);
twl6040           352 drivers/mfd/twl6040.c 		regcache_cache_only(twl6040->regmap, true);
twl6040           353 drivers/mfd/twl6040.c 		regcache_mark_dirty(twl6040->regmap);
twl6040           355 drivers/mfd/twl6040.c 		twl6040->sysclk_rate = 0;
twl6040           357 drivers/mfd/twl6040.c 		if (twl6040->pll == TWL6040_SYSCLK_SEL_HPPLL) {
twl6040           358 drivers/mfd/twl6040.c 			clk_disable_unprepare(twl6040->mclk);
twl6040           359 drivers/mfd/twl6040.c 			twl6040->mclk_rate = 0;
twl6040           362 drivers/mfd/twl6040.c 		clk_disable_unprepare(twl6040->clk32k);
twl6040           366 drivers/mfd/twl6040.c 	mutex_unlock(&twl6040->mutex);
twl6040           371 drivers/mfd/twl6040.c int twl6040_set_pll(struct twl6040 *twl6040, int pll_id,
twl6040           377 drivers/mfd/twl6040.c 	mutex_lock(&twl6040->mutex);
twl6040           379 drivers/mfd/twl6040.c 	hppllctl = twl6040_reg_read(twl6040, TWL6040_REG_HPPLLCTL);
twl6040           380 drivers/mfd/twl6040.c 	lppllctl = twl6040_reg_read(twl6040, TWL6040_REG_LPPLLCTL);
twl6040           383 drivers/mfd/twl6040.c 	if (pll_id != twl6040->pll) {
twl6040           384 drivers/mfd/twl6040.c 		twl6040->sysclk_rate = 0;
twl6040           385 drivers/mfd/twl6040.c 		twl6040->mclk_rate = 0;
twl6040           392 drivers/mfd/twl6040.c 		if (twl6040->sysclk_rate != freq_out) {
twl6040           401 drivers/mfd/twl6040.c 				dev_err(twl6040->dev,
twl6040           407 drivers/mfd/twl6040.c 			twl6040_reg_write(twl6040, TWL6040_REG_LPPLLCTL,
twl6040           412 drivers/mfd/twl6040.c 		if (twl6040->pll == pll_id)
twl6040           418 drivers/mfd/twl6040.c 			twl6040_reg_write(twl6040, TWL6040_REG_LPPLLCTL,
twl6040           422 drivers/mfd/twl6040.c 			twl6040_reg_write(twl6040, TWL6040_REG_LPPLLCTL,
twl6040           425 drivers/mfd/twl6040.c 			twl6040_reg_write(twl6040, TWL6040_REG_HPPLLCTL,
twl6040           429 drivers/mfd/twl6040.c 			dev_err(twl6040->dev,
twl6040           435 drivers/mfd/twl6040.c 		clk_disable_unprepare(twl6040->mclk);
twl6040           440 drivers/mfd/twl6040.c 			dev_err(twl6040->dev,
twl6040           446 drivers/mfd/twl6040.c 		if (twl6040->mclk_rate != freq_in) {
twl6040           471 drivers/mfd/twl6040.c 				dev_err(twl6040->dev,
twl6040           478 drivers/mfd/twl6040.c 			if (pll_id != twl6040->pll)
twl6040           479 drivers/mfd/twl6040.c 				clk_prepare_enable(twl6040->mclk);
twl6040           486 drivers/mfd/twl6040.c 			twl6040_reg_write(twl6040, TWL6040_REG_HPPLLCTL,
twl6040           490 drivers/mfd/twl6040.c 			twl6040_reg_write(twl6040, TWL6040_REG_LPPLLCTL,
twl6040           493 drivers/mfd/twl6040.c 			twl6040_reg_write(twl6040, TWL6040_REG_LPPLLCTL,
twl6040           496 drivers/mfd/twl6040.c 			twl6040->mclk_rate = freq_in;
twl6040           500 drivers/mfd/twl6040.c 		dev_err(twl6040->dev, "unknown pll id %d\n", pll_id);
twl6040           505 drivers/mfd/twl6040.c 	twl6040->sysclk_rate = freq_out;
twl6040           506 drivers/mfd/twl6040.c 	twl6040->pll = pll_id;
twl6040           509 drivers/mfd/twl6040.c 	mutex_unlock(&twl6040->mutex);
twl6040           514 drivers/mfd/twl6040.c int twl6040_get_pll(struct twl6040 *twl6040)
twl6040           516 drivers/mfd/twl6040.c 	if (twl6040->power_count)
twl6040           517 drivers/mfd/twl6040.c 		return twl6040->pll;
twl6040           523 drivers/mfd/twl6040.c unsigned int twl6040_get_sysclk(struct twl6040 *twl6040)
twl6040           525 drivers/mfd/twl6040.c 	return twl6040->sysclk_rate;
twl6040           530 drivers/mfd/twl6040.c int twl6040_get_vibralr_status(struct twl6040 *twl6040)
twl6040           536 drivers/mfd/twl6040.c 	ret = regmap_read(twl6040->regmap, TWL6040_REG_VIBCTLL, &reg);
twl6040           541 drivers/mfd/twl6040.c 	ret = regmap_read(twl6040->regmap, TWL6040_REG_VIBCTLR, &reg);
twl6040           640 drivers/mfd/twl6040.c 	struct twl6040 *twl6040;
twl6040           655 drivers/mfd/twl6040.c 	twl6040 = devm_kzalloc(&client->dev, sizeof(struct twl6040),
twl6040           657 drivers/mfd/twl6040.c 	if (!twl6040)
twl6040           660 drivers/mfd/twl6040.c 	twl6040->regmap = devm_regmap_init_i2c(client, &twl6040_regmap_config);
twl6040           661 drivers/mfd/twl6040.c 	if (IS_ERR(twl6040->regmap))
twl6040           662 drivers/mfd/twl6040.c 		return PTR_ERR(twl6040->regmap);
twl6040           664 drivers/mfd/twl6040.c 	i2c_set_clientdata(client, twl6040);
twl6040           666 drivers/mfd/twl6040.c 	twl6040->clk32k = devm_clk_get(&client->dev, "clk32k");
twl6040           667 drivers/mfd/twl6040.c 	if (IS_ERR(twl6040->clk32k)) {
twl6040           668 drivers/mfd/twl6040.c 		if (PTR_ERR(twl6040->clk32k) == -EPROBE_DEFER)
twl6040           671 drivers/mfd/twl6040.c 		twl6040->clk32k = NULL;
twl6040           674 drivers/mfd/twl6040.c 	twl6040->mclk = devm_clk_get(&client->dev, "mclk");
twl6040           675 drivers/mfd/twl6040.c 	if (IS_ERR(twl6040->mclk)) {
twl6040           676 drivers/mfd/twl6040.c 		if (PTR_ERR(twl6040->mclk) == -EPROBE_DEFER)
twl6040           679 drivers/mfd/twl6040.c 		twl6040->mclk = NULL;
twl6040           682 drivers/mfd/twl6040.c 	twl6040->supplies[0].supply = "vio";
twl6040           683 drivers/mfd/twl6040.c 	twl6040->supplies[1].supply = "v2v1";
twl6040           685 drivers/mfd/twl6040.c 				      twl6040->supplies);
twl6040           691 drivers/mfd/twl6040.c 	ret = regulator_bulk_enable(TWL6040_NUM_SUPPLIES, twl6040->supplies);
twl6040           697 drivers/mfd/twl6040.c 	twl6040->dev = &client->dev;
twl6040           698 drivers/mfd/twl6040.c 	twl6040->irq = client->irq;
twl6040           700 drivers/mfd/twl6040.c 	mutex_init(&twl6040->mutex);
twl6040           701 drivers/mfd/twl6040.c 	init_completion(&twl6040->ready);
twl6040           703 drivers/mfd/twl6040.c 	regmap_register_patch(twl6040->regmap, twl6040_patch,
twl6040           706 drivers/mfd/twl6040.c 	twl6040->rev = twl6040_reg_read(twl6040, TWL6040_REG_ASICREV);
twl6040           707 drivers/mfd/twl6040.c 	if (twl6040->rev < 0) {
twl6040           709 drivers/mfd/twl6040.c 			twl6040->rev);
twl6040           710 drivers/mfd/twl6040.c 		ret = twl6040->rev;
twl6040           715 drivers/mfd/twl6040.c 	if (twl6040_get_revid(twl6040) > TWL6040_REV_ES1_0)
twl6040           716 drivers/mfd/twl6040.c 		twl6040->audpwron = of_get_named_gpio(node,
twl6040           719 drivers/mfd/twl6040.c 		twl6040->audpwron = -EINVAL;
twl6040           721 drivers/mfd/twl6040.c 	if (gpio_is_valid(twl6040->audpwron)) {
twl6040           722 drivers/mfd/twl6040.c 		ret = devm_gpio_request_one(&client->dev, twl6040->audpwron,
twl6040           728 drivers/mfd/twl6040.c 		twl6040_reg_read(twl6040, TWL6040_REG_INTID);
twl6040           731 drivers/mfd/twl6040.c 	ret = regmap_add_irq_chip(twl6040->regmap, twl6040->irq, IRQF_ONESHOT,
twl6040           732 drivers/mfd/twl6040.c 				  0, &twl6040_irq_chip, &twl6040->irq_data);
twl6040           736 drivers/mfd/twl6040.c 	twl6040->irq_ready = regmap_irq_get_virq(twl6040->irq_data,
twl6040           738 drivers/mfd/twl6040.c 	twl6040->irq_th = regmap_irq_get_virq(twl6040->irq_data,
twl6040           741 drivers/mfd/twl6040.c 	ret = devm_request_threaded_irq(twl6040->dev, twl6040->irq_ready, NULL,
twl6040           743 drivers/mfd/twl6040.c 					"twl6040_irq_ready", twl6040);
twl6040           745 drivers/mfd/twl6040.c 		dev_err(twl6040->dev, "READY IRQ request failed: %d\n", ret);
twl6040           749 drivers/mfd/twl6040.c 	ret = devm_request_threaded_irq(twl6040->dev, twl6040->irq_th, NULL,
twl6040           751 drivers/mfd/twl6040.c 					"twl6040_irq_th", twl6040);
twl6040           753 drivers/mfd/twl6040.c 		dev_err(twl6040->dev, "Thermal IRQ request failed: %d\n", ret);
twl6040           761 drivers/mfd/twl6040.c 	irq = regmap_irq_get_virq(twl6040->irq_data, TWL6040_IRQ_PLUG);
twl6040           762 drivers/mfd/twl6040.c 	cell = &twl6040->cells[children];
twl6040           772 drivers/mfd/twl6040.c 		irq = regmap_irq_get_virq(twl6040->irq_data, TWL6040_IRQ_VIB);
twl6040           774 drivers/mfd/twl6040.c 		cell = &twl6040->cells[children];
twl6040           784 drivers/mfd/twl6040.c 	cell = &twl6040->cells[children];
twl6040           789 drivers/mfd/twl6040.c 	cell = &twl6040->cells[children];
twl6040           794 drivers/mfd/twl6040.c 	regcache_cache_only(twl6040->regmap, true);
twl6040           795 drivers/mfd/twl6040.c 	regcache_mark_dirty(twl6040->regmap);
twl6040           797 drivers/mfd/twl6040.c 	ret = mfd_add_devices(&client->dev, -1, twl6040->cells, children,
twl6040           805 drivers/mfd/twl6040.c 	regmap_del_irq_chip(twl6040->irq, twl6040->irq_data);
twl6040           807 drivers/mfd/twl6040.c 	regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies);
twl6040           813 drivers/mfd/twl6040.c 	struct twl6040 *twl6040 = i2c_get_clientdata(client);
twl6040           815 drivers/mfd/twl6040.c 	if (twl6040->power_count)
twl6040           816 drivers/mfd/twl6040.c 		twl6040_power(twl6040, 0);
twl6040           818 drivers/mfd/twl6040.c 	regmap_del_irq_chip(twl6040->irq, twl6040->irq_data);
twl6040           822 drivers/mfd/twl6040.c 	regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies);
twl6040           235 include/linux/mfd/twl6040.h int twl6040_reg_read(struct twl6040 *twl6040, unsigned int reg);
twl6040           236 include/linux/mfd/twl6040.h int twl6040_reg_write(struct twl6040 *twl6040, unsigned int reg,
twl6040           238 include/linux/mfd/twl6040.h int twl6040_set_bits(struct twl6040 *twl6040, unsigned int reg,
twl6040           240 include/linux/mfd/twl6040.h int twl6040_clear_bits(struct twl6040 *twl6040, unsigned int reg,
twl6040           242 include/linux/mfd/twl6040.h int twl6040_power(struct twl6040 *twl6040, int on);
twl6040           243 include/linux/mfd/twl6040.h int twl6040_set_pll(struct twl6040 *twl6040, int pll_id,
twl6040           245 include/linux/mfd/twl6040.h int twl6040_get_pll(struct twl6040 *twl6040);
twl6040           246 include/linux/mfd/twl6040.h unsigned int twl6040_get_sysclk(struct twl6040 *twl6040);
twl6040           249 include/linux/mfd/twl6040.h int twl6040_get_vibralr_status(struct twl6040 *twl6040);
twl6040           251 include/linux/mfd/twl6040.h static inline int twl6040_get_revid(struct twl6040 *twl6040)
twl6040           253 include/linux/mfd/twl6040.h 	return twl6040->rev;
twl6040           100 sound/soc/codecs/twl6040.c 	struct twl6040 *twl6040 = to_twl6040(component);
twl6040           115 sound/soc/codecs/twl6040.c 		value = twl6040_reg_read(twl6040, reg);
twl6040           162 sound/soc/codecs/twl6040.c 	struct twl6040 *twl6040 = to_twl6040(component);
twl6040           169 sound/soc/codecs/twl6040.c 		return twl6040_reg_write(twl6040, reg, value);
twl6040           563 sound/soc/codecs/twl6040.c 	struct twl6040 *twl6040 = to_twl6040(component);
twl6040           565 sound/soc/codecs/twl6040.c 	if (twl6040_get_revid(twl6040) < TWL6040_REV_ES1_3)
twl6040           821 sound/soc/codecs/twl6040.c 	struct twl6040 *twl6040 = to_twl6040(component);
twl6040           833 sound/soc/codecs/twl6040.c 			ret = twl6040_set_pll(twl6040, TWL6040_SYSCLK_SEL_LPPLL,
twl6040           838 sound/soc/codecs/twl6040.c 		ret = twl6040_power(twl6040, 1);
twl6040           851 sound/soc/codecs/twl6040.c 		twl6040_power(twl6040, 0);
twl6040           913 sound/soc/codecs/twl6040.c 	struct twl6040 *twl6040 = to_twl6040(component);
twl6040           923 sound/soc/codecs/twl6040.c 	ret = twl6040_set_pll(twl6040, priv->pll, priv->clk_in, priv->sysclk);
twl6040           955 sound/soc/codecs/twl6040.c 	struct twl6040 *twl6040 = to_twl6040(component);
twl6040           974 sound/soc/codecs/twl6040.c 		twl6040_reg_write(twl6040, TWL6040_REG_EARCTL, earctl);
twl6040           975 sound/soc/codecs/twl6040.c 		twl6040_reg_write(twl6040, TWL6040_REG_HSLCTL, hslctl);
twl6040           976 sound/soc/codecs/twl6040.c 		twl6040_reg_write(twl6040, TWL6040_REG_HSRCTL, hsrctl);
twl6040           991 sound/soc/codecs/twl6040.c 		twl6040_reg_write(twl6040, TWL6040_REG_HFLCTL, hflctl);
twl6040           992 sound/soc/codecs/twl6040.c 		twl6040_reg_write(twl6040, TWL6040_REG_HFRCTL, hfrctl);