| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * max8907-regulator.c -- support regulators in max8907 |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * Copyright 2010 Texas Instruments Inc. |
|---|
| 9 | 10 | * Author: Graeme Gregory <gg@slimlogic.co.uk> |
|---|
| 10 | 11 | * Author: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 13 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 14 | | - * published by the Free Software Foundation. |
|---|
| 15 | 12 | */ |
|---|
| 16 | 13 | |
|---|
| 17 | 14 | #include <linux/err.h> |
|---|
| .. | .. |
|---|
| 112 | 109 | static const struct regulator_ops max8907_mbatt_ops = { |
|---|
| 113 | 110 | }; |
|---|
| 114 | 111 | |
|---|
| 115 | | -static struct regulator_ops max8907_ldo_ops = { |
|---|
| 112 | +static const struct regulator_ops max8907_ldo_ops = { |
|---|
| 116 | 113 | .list_voltage = regulator_list_voltage_linear, |
|---|
| 117 | 114 | .set_voltage_sel = regulator_set_voltage_sel_regmap, |
|---|
| 118 | 115 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
|---|
| .. | .. |
|---|
| 131 | 128 | .list_voltage = regulator_list_voltage_linear, |
|---|
| 132 | 129 | }; |
|---|
| 133 | 130 | |
|---|
| 134 | | -static struct regulator_ops max8907_out5v_ops = { |
|---|
| 131 | +static const struct regulator_ops max8907_out5v_ops = { |
|---|
| 135 | 132 | .list_voltage = regulator_list_voltage_linear, |
|---|
| 136 | 133 | .enable = regulator_enable_regmap, |
|---|
| 137 | 134 | .disable = regulator_disable_regmap, |
|---|
| .. | .. |
|---|
| 148 | 145 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
|---|
| 149 | 146 | }; |
|---|
| 150 | 147 | |
|---|
| 151 | | -static struct regulator_desc max8907_regulators[] = { |
|---|
| 148 | +static const struct regulator_desc max8907_regulators[] = { |
|---|
| 152 | 149 | REG_MBATT(), |
|---|
| 153 | 150 | REG_LDO(SD1, "in-v1", MAX8907_REG_SDCTL1, 650000, 2225000, 25000), |
|---|
| 154 | 151 | REG_LDO(SD2, "in-v2", MAX8907_REG_SDCTL2, 637500, 1425000, 12500), |
|---|