aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>2019-06-03 03:24:32 -0400
committerLee Jones <lee.jones@linaro.org>2019-06-27 05:56:27 -0400
commit2a6a7aacd4e557a4c7007f8858bcc9654b098fea (patch)
tree3b0ecedd2e3c7acef6a8a6bdf4a2572454f4e124 /include/linux/mfd
parenta188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff)
mfd: regulator: clk: Split rohm-bd718x7.h
Split the bd718x7.h to ROHM common and bd718x7 specific parts so that we do not need to add same things in every new ROHM PMIC header. Please note that this change requires changes also in bd718x7 sub-device drivers for regulators and clk. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/rohm-bd718x7.h22
-rw-r--r--include/linux/mfd/rohm-generic.h20
2 files changed, 28 insertions, 14 deletions
diff --git a/include/linux/mfd/rohm-bd718x7.h b/include/linux/mfd/rohm-bd718x7.h
index fd194bfc836f..7f2dbde402a1 100644
--- a/include/linux/mfd/rohm-bd718x7.h
+++ b/include/linux/mfd/rohm-bd718x7.h
@@ -4,15 +4,10 @@
4#ifndef __LINUX_MFD_BD718XX_H__ 4#ifndef __LINUX_MFD_BD718XX_H__
5#define __LINUX_MFD_BD718XX_H__ 5#define __LINUX_MFD_BD718XX_H__
6 6
7#include <linux/mfd/rohm-generic.h>
7#include <linux/regmap.h> 8#include <linux/regmap.h>
8 9
9enum { 10enum {
10 BD718XX_TYPE_BD71837 = 0,
11 BD718XX_TYPE_BD71847,
12 BD718XX_TYPE_AMOUNT
13};
14
15enum {
16 BD718XX_BUCK1 = 0, 11 BD718XX_BUCK1 = 0,
17 BD718XX_BUCK2, 12 BD718XX_BUCK2,
18 BD718XX_BUCK3, 13 BD718XX_BUCK3,
@@ -321,18 +316,17 @@ enum {
321 BD718XX_PWRBTN_LONG_PRESS_15S 316 BD718XX_PWRBTN_LONG_PRESS_15S
322}; 317};
323 318
324struct bd718xx_clk;
325
326struct bd718xx { 319struct bd718xx {
327 unsigned int chip_type; 320 /*
328 struct device *dev; 321 * Please keep this as the first member here as some
329 struct regmap *regmap; 322 * drivers (clk) supporting more than one chip may only know this
330 unsigned long int id; 323 * generic struct 'struct rohm_regmap_dev' and assume it is
324 * the first chunk of parent device's private data.
325 */
326 struct rohm_regmap_dev chip;
331 327
332 int chip_irq; 328 int chip_irq;
333 struct regmap_irq_chip_data *irq_data; 329 struct regmap_irq_chip_data *irq_data;
334
335 struct bd718xx_clk *clk;
336}; 330};
337 331
338#endif /* __LINUX_MFD_BD718XX_H__ */ 332#endif /* __LINUX_MFD_BD718XX_H__ */
diff --git a/include/linux/mfd/rohm-generic.h b/include/linux/mfd/rohm-generic.h
new file mode 100644
index 000000000000..bff15ac26f2c
--- /dev/null
+++ b/include/linux/mfd/rohm-generic.h
@@ -0,0 +1,20 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/* Copyright (C) 2018 ROHM Semiconductors */
3
4#ifndef __LINUX_MFD_ROHM_H__
5#define __LINUX_MFD_ROHM_H__
6
7enum {
8 ROHM_CHIP_TYPE_BD71837 = 0,
9 ROHM_CHIP_TYPE_BD71847,
10 ROHM_CHIP_TYPE_BD70528,
11 ROHM_CHIP_TYPE_AMOUNT
12};
13
14struct rohm_regmap_dev {
15 unsigned int chip_type;
16 struct device *dev;
17 struct regmap *regmap;
18};
19
20#endif