| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for TPS61050/61052 boost converters, typically used for white LEDs |
|---|
| 3 | 4 | * or audio amplifiers. |
|---|
| .. | .. |
|---|
| 6 | 7 | * Written on behalf of Linaro for ST-Ericsson |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Author: Linus Walleij <linus.walleij@linaro.org> |
|---|
| 9 | | - * |
|---|
| 10 | | - * License terms: GNU General Public License (GPL) version 2 |
|---|
| 11 | 10 | */ |
|---|
| 12 | 11 | |
|---|
| 13 | 12 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 27 | 26 | 5000000, /* There is an additional 5V */ |
|---|
| 28 | 27 | }; |
|---|
| 29 | 28 | |
|---|
| 30 | | -static struct regulator_ops tps6105x_regulator_ops = { |
|---|
| 29 | +static const struct regulator_ops tps6105x_regulator_ops = { |
|---|
| 31 | 30 | .enable = regulator_enable_regmap, |
|---|
| 32 | 31 | .disable = regulator_disable_regmap, |
|---|
| 33 | 32 | .is_enabled = regulator_is_enabled_regmap, |
|---|
| .. | .. |
|---|
| 38 | 37 | |
|---|
| 39 | 38 | static const struct regulator_desc tps6105x_regulator_desc = { |
|---|
| 40 | 39 | .name = "tps6105x-boost", |
|---|
| 40 | + .of_match = of_match_ptr("regulator"), |
|---|
| 41 | 41 | .ops = &tps6105x_regulator_ops, |
|---|
| 42 | 42 | .type = REGULATOR_VOLTAGE, |
|---|
| 43 | 43 | .id = 0, |
|---|
| .. | .. |
|---|
| 72 | 72 | config.dev = &tps6105x->client->dev; |
|---|
| 73 | 73 | config.init_data = pdata->regulator_data; |
|---|
| 74 | 74 | config.driver_data = tps6105x; |
|---|
| 75 | + config.of_node = pdev->dev.parent->of_node; |
|---|
| 75 | 76 | config.regmap = tps6105x->regmap; |
|---|
| 76 | 77 | |
|---|
| 77 | 78 | /* Register regulator with framework */ |
|---|