ltc3676.c (0cce284537fb42d9c28b9b31038ffc9b464555f5) | ltc3676.c (f9e93acc14d1867176afaf3ab9bded914cd012f5) |
---|---|
1/* 2 * Copyright (C) 2016 Gateworks Corporation, Inc. All Rights Reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 6 * as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 147 unchanged lines hidden (view full) --- 156 rdesc->min_uV = ltc3676_scale(desc->min_uV, r[0], r[1]); 157 rdesc->uV_step = ltc3676_scale(desc->uV_step, r[0], r[1]); 158 rdesc->fixed_uV = ltc3676_scale(desc->fixed_uV, r[0], r[1]); 159 160 return 0; 161} 162 163/* SW1, SW2, SW3, SW4 linear 0.8V-3.3V with scalar via R1/R2 feeback res */ | 1/* 2 * Copyright (C) 2016 Gateworks Corporation, Inc. All Rights Reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 6 * as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 147 unchanged lines hidden (view full) --- 156 rdesc->min_uV = ltc3676_scale(desc->min_uV, r[0], r[1]); 157 rdesc->uV_step = ltc3676_scale(desc->uV_step, r[0], r[1]); 158 rdesc->fixed_uV = ltc3676_scale(desc->fixed_uV, r[0], r[1]); 159 160 return 0; 161} 162 163/* SW1, SW2, SW3, SW4 linear 0.8V-3.3V with scalar via R1/R2 feeback res */ |
164static struct regulator_ops ltc3676_linear_regulator_ops = { | 164static const struct regulator_ops ltc3676_linear_regulator_ops = { |
165 .enable = regulator_enable_regmap, 166 .disable = regulator_disable_regmap, 167 .is_enabled = regulator_is_enabled_regmap, 168 .list_voltage = regulator_list_voltage_linear, 169 .set_voltage_sel = regulator_set_voltage_sel_regmap, 170 .get_voltage_sel = regulator_get_voltage_sel_regmap, 171 .set_suspend_voltage = ltc3676_set_suspend_voltage, 172 .set_suspend_mode = ltc3676_set_suspend_mode, 173}; 174 175/* LDO1 always on fixed 0.8V-3.3V via scalar via R1/R2 feeback res */ | 165 .enable = regulator_enable_regmap, 166 .disable = regulator_disable_regmap, 167 .is_enabled = regulator_is_enabled_regmap, 168 .list_voltage = regulator_list_voltage_linear, 169 .set_voltage_sel = regulator_set_voltage_sel_regmap, 170 .get_voltage_sel = regulator_get_voltage_sel_regmap, 171 .set_suspend_voltage = ltc3676_set_suspend_voltage, 172 .set_suspend_mode = ltc3676_set_suspend_mode, 173}; 174 175/* LDO1 always on fixed 0.8V-3.3V via scalar via R1/R2 feeback res */ |
176static struct regulator_ops ltc3676_fixed_standby_regulator_ops = { | 176static const struct regulator_ops ltc3676_fixed_standby_regulator_ops = { |
177}; 178 179/* LDO2, LDO3 fixed (LDO2 has external scalar via R1/R2 feedback res) */ | 177}; 178 179/* LDO2, LDO3 fixed (LDO2 has external scalar via R1/R2 feedback res) */ |
180static struct regulator_ops ltc3676_fixed_regulator_ops = { | 180static const struct regulator_ops ltc3676_fixed_regulator_ops = { |
181 .enable = regulator_enable_regmap, 182 .disable = regulator_disable_regmap, 183 .is_enabled = regulator_is_enabled_regmap, 184}; 185 186#define LTC3676_REG(_id, _name, _ops, en_reg, en_bit, dvba_reg, dvb_mask) \ 187 [LTC3676_ ## _id] = { \ 188 .name = #_name, \ --- 232 unchanged lines hidden --- | 181 .enable = regulator_enable_regmap, 182 .disable = regulator_disable_regmap, 183 .is_enabled = regulator_is_enabled_regmap, 184}; 185 186#define LTC3676_REG(_id, _name, _ops, en_reg, en_bit, dvba_reg, dvb_mask) \ 187 [LTC3676_ ## _id] = { \ 188 .name = #_name, \ --- 232 unchanged lines hidden --- |