Skip to content

Commit 44e6171

Browse files
author
Lee Jones
committed
mfd: core: Add OF_MFD_CELL_REG() helper
Extend current list of helpers to provide support for parent drivers wishing to match specific child devices to particular OF nodes. Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent d097965 commit 44e6171

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

‎include/linux/mfd/core.h‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,37 @@
1414

1515
#define MFD_RES_SIZE(arr) (sizeof(arr) / sizeof(struct resource))
1616

17-
#define MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, _compat, _match)\
17+
#define MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, _compat, _of_reg, _use_of_reg, _match) \
1818
{ \
1919
.name = (_name), \
2020
.resources = (_res), \
2121
.num_resources = MFD_RES_SIZE((_res)), \
2222
.platform_data = (_pdata), \
2323
.pdata_size = (_pdsize), \
2424
.of_compatible = (_compat), \
25+
.of_reg = (_of_reg), \
26+
.use_of_reg = (_use_of_reg), \
2527
.acpi_match = (_match), \
2628
.id = (_id), \
2729
}
2830

31+
#define OF_MFD_CELL_REG(_name, _res, _pdata, _pdsize, _id, _compat, _of_reg) \
32+
MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, _compat, _of_reg, true, NULL)
33+
2934
#define OF_MFD_CELL(_name, _res, _pdata, _pdsize, _id, _compat) \
30-
MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, _compat, NULL)
35+
MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, _compat, 0, false, NULL)
3136

3237
#define ACPI_MFD_CELL(_name, _res, _pdata, _pdsize, _id, _match) \
33-
MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, NULL, _match)
38+
MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, NULL, 0, false, _match)
3439

3540
#define MFD_CELL_BASIC(_name, _res, _pdata, _pdsize, _id) \
36-
MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, NULL, NULL)
41+
MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, NULL, 0, false, NULL)
3742

3843
#define MFD_CELL_RES(_name, _res) \
39-
MFD_CELL_ALL(_name, _res, NULL, 0, 0, NULL, NULL)
44+
MFD_CELL_ALL(_name, _res, NULL, 0, 0, NULL, 0, false, NULL)
4045

4146
#define MFD_CELL_NAME(_name) \
42-
MFD_CELL_ALL(_name, NULL, NULL, 0, 0, NULL, NULL)
47+
MFD_CELL_ALL(_name, NULL, NULL, 0, 0, NULL, 0, false, NULL)
4348

4449
struct irq_domain;
4550
struct property_entry;

0 commit comments

Comments
 (0)