Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: sec: Remove sec_reg* regmap helpers

Remove sec_reg* helpers as they are not used anymore. These helpers were
error-prone as they mixed u8 with unsigned int and they changed order of
some of parameters (val and mask in sec_reg_update()).

Also the helpers didn't give any way of useful abstraction as they just
called corresponding regmap function.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
ee5182b5 d1c8b1bd

-36
-30
drivers/mfd/sec-core.c
··· 79 79 }; 80 80 #endif 81 81 82 - int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest) 83 - { 84 - return regmap_read(sec_pmic->regmap_pmic, reg, dest); 85 - } 86 - EXPORT_SYMBOL_GPL(sec_reg_read); 87 - 88 - int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf) 89 - { 90 - return regmap_bulk_read(sec_pmic->regmap_pmic, reg, buf, count); 91 - } 92 - EXPORT_SYMBOL_GPL(sec_bulk_read); 93 - 94 - int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value) 95 - { 96 - return regmap_write(sec_pmic->regmap_pmic, reg, value); 97 - } 98 - EXPORT_SYMBOL_GPL(sec_reg_write); 99 - 100 - int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf) 101 - { 102 - return regmap_raw_write(sec_pmic->regmap_pmic, reg, buf, count); 103 - } 104 - EXPORT_SYMBOL_GPL(sec_bulk_write); 105 - 106 - int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask) 107 - { 108 - return regmap_update_bits(sec_pmic->regmap_pmic, reg, mask, val); 109 - } 110 - EXPORT_SYMBOL_GPL(sec_reg_update); 111 - 112 82 static bool s2mps11_volatile(struct device *dev, unsigned int reg) 113 83 { 114 84 switch (reg) {
-6
include/linux/mfd/samsung/core.h
··· 59 59 void sec_irq_exit(struct sec_pmic_dev *sec_pmic); 60 60 int sec_irq_resume(struct sec_pmic_dev *sec_pmic); 61 61 62 - extern int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest); 63 - extern int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf); 64 - extern int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value); 65 - extern int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf); 66 - extern int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask); 67 - 68 62 struct sec_platform_data { 69 63 struct sec_regulator_data *regulators; 70 64 struct sec_opmode_data *opmode;