| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Regulator driver for Ricoh RN5T618 PMIC |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * version 2 as published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * You should have received a copy of the GNU General Public License |
|---|
| 11 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 12 | 6 | */ |
|---|
| 13 | 7 | |
|---|
| 14 | 8 | #include <linux/mfd/rn5t618.h> |
|---|
| .. | .. |
|---|
| 46 | 40 | .vsel_mask = (vmask), \ |
|---|
| 47 | 41 | } |
|---|
| 48 | 42 | |
|---|
| 49 | | -static struct regulator_desc rn5t567_regulators[] = { |
|---|
| 43 | +static const struct regulator_desc rn5t567_regulators[] = { |
|---|
| 50 | 44 | /* DCDC */ |
|---|
| 51 | 45 | REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), |
|---|
| 52 | 46 | REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), |
|---|
| .. | .. |
|---|
| 63 | 57 | REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000), |
|---|
| 64 | 58 | }; |
|---|
| 65 | 59 | |
|---|
| 66 | | -static struct regulator_desc rn5t618_regulators[] = { |
|---|
| 60 | +static const struct regulator_desc rn5t618_regulators[] = { |
|---|
| 67 | 61 | /* DCDC */ |
|---|
| 68 | 62 | REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), |
|---|
| 69 | 63 | REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), |
|---|
| .. | .. |
|---|
| 79 | 73 | REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000), |
|---|
| 80 | 74 | }; |
|---|
| 81 | 75 | |
|---|
| 82 | | -static struct regulator_desc rc5t619_regulators[] = { |
|---|
| 76 | +static const struct regulator_desc rc5t619_regulators[] = { |
|---|
| 83 | 77 | /* DCDC */ |
|---|
| 84 | 78 | REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), |
|---|
| 85 | 79 | REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), |
|---|
| .. | .. |
|---|
| 96 | 90 | REG(LDO7, LDOEN1, BIT(6), LDO7DAC, 0x7f, 900000, 3500000, 25000), |
|---|
| 97 | 91 | REG(LDO8, LDOEN1, BIT(7), LDO8DAC, 0x7f, 900000, 3500000, 25000), |
|---|
| 98 | 92 | REG(LDO9, LDOEN2, BIT(0), LDO9DAC, 0x7f, 900000, 3500000, 25000), |
|---|
| 99 | | - REG(LDO10, LDOEN2, BIT(0), LDO10DAC, 0x7f, 900000, 3500000, 25000), |
|---|
| 93 | + REG(LDO10, LDOEN2, BIT(1), LDO10DAC, 0x7f, 900000, 3500000, 25000), |
|---|
| 100 | 94 | /* LDO RTC */ |
|---|
| 101 | 95 | REG(LDORTC1, LDOEN2, BIT(4), LDORTCDAC, 0x7f, 1700000, 3500000, 25000), |
|---|
| 102 | 96 | REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000), |
|---|
| .. | .. |
|---|
| 107 | 101 | struct rn5t618 *rn5t618 = dev_get_drvdata(pdev->dev.parent); |
|---|
| 108 | 102 | struct regulator_config config = { }; |
|---|
| 109 | 103 | struct regulator_dev *rdev; |
|---|
| 110 | | - struct regulator_desc *regulators; |
|---|
| 104 | + const struct regulator_desc *regulators; |
|---|
| 111 | 105 | int i; |
|---|
| 112 | 106 | int num_regulators = 0; |
|---|
| 113 | 107 | |
|---|