Lines Matching +full:boost +full:- +full:converter
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Core driver for TPS61050/61052 boost converters, used for while LED
5 * boost conversion. Additionally it provides a 1-bit GPIO pin (out or in)
9 * Copyright (C) 2011 ST-Ericsson SA
10 * Written on behalf of Linaro for ST-Ericsson
37 ret = regmap_read(tps6105x->regmap, TPS6105X_REG_0, ®val); in tps6105x_startup()
42 dev_info(&tps6105x->client->dev, in tps6105x_startup()
46 dev_info(&tps6105x->client->dev, in tps6105x_startup()
50 dev_info(&tps6105x->client->dev, in tps6105x_startup()
54 dev_info(&tps6105x->client->dev, in tps6105x_startup()
65 * MFD cells - we always have a GPIO cell and we have one cell
69 .name = "tps6105x-gpio",
73 .name = "tps6105x-leds",
77 .name = "tps6105x-flash",
81 .name = "tps6105x-regulator",
87 cell->platform_data = tps6105x; in tps6105x_add_device()
88 cell->pdata_size = sizeof(*tps6105x); in tps6105x_add_device()
90 return mfd_add_devices(&tps6105x->client->dev, in tps6105x_add_device()
96 struct device_node *np = dev->of_node; in tps6105x_parse_dt()
101 return ERR_PTR(-EINVAL); in tps6105x_parse_dt()
104 return ERR_PTR(-EINVAL); in tps6105x_parse_dt()
108 return ERR_PTR(-ENOMEM); in tps6105x_parse_dt()
109 pdata->mode = TPS6105X_MODE_SHUTDOWN; in tps6105x_parse_dt()
111 if (child->name && !of_node_cmp(child->name, "regulator")) in tps6105x_parse_dt()
112 pdata->mode = TPS6105X_MODE_VOLTAGE; in tps6105x_parse_dt()
113 else if (child->name && !of_node_cmp(child->name, "led")) in tps6105x_parse_dt()
114 pdata->mode = TPS6105X_MODE_TORCH; in tps6105x_parse_dt()
127 pdata = dev_get_platdata(&client->dev); in tps6105x_probe()
129 pdata = tps6105x_parse_dt(&client->dev); in tps6105x_probe()
131 dev_err(&client->dev, "No platform data or DT found"); in tps6105x_probe()
135 tps6105x = devm_kmalloc(&client->dev, sizeof(*tps6105x), GFP_KERNEL); in tps6105x_probe()
137 return -ENOMEM; in tps6105x_probe()
139 tps6105x->regmap = devm_regmap_init_i2c(client, &tps6105x_regmap_config); in tps6105x_probe()
140 if (IS_ERR(tps6105x->regmap)) in tps6105x_probe()
141 return PTR_ERR(tps6105x->regmap); in tps6105x_probe()
144 tps6105x->client = client; in tps6105x_probe()
145 tps6105x->pdata = pdata; in tps6105x_probe()
149 dev_err(&client->dev, "chip initialization failed\n"); in tps6105x_probe()
157 switch (pdata->mode) { in tps6105x_probe()
159 dev_info(&client->dev, in tps6105x_probe()
172 dev_warn(&client->dev, "invalid mode: %d\n", pdata->mode); in tps6105x_probe()
177 mfd_remove_devices(&client->dev); in tps6105x_probe()
186 mfd_remove_devices(&client->dev); in tps6105x_remove()
189 regmap_update_bits(tps6105x->regmap, TPS6105X_REG_0, in tps6105x_remove()
231 MODULE_DESCRIPTION("TPS6105x White LED Boost Converter Driver");