1
2
3
4
5
6
7
8
9
10
11
12
13
14#include <linux/regulator/machine.h>
15
16struct device;
17
18#ifndef MFD_ABX500_H
19#define MFD_ABX500_H
20
21
22
23
24
25struct abx500_init_settings {
26 u8 bank;
27 u8 reg;
28 u8 setting;
29};
30
31int abx500_set_register_interruptible(struct device *dev, u8 bank, u8 reg,
32 u8 value);
33int abx500_get_register_interruptible(struct device *dev, u8 bank, u8 reg,
34 u8 *value);
35int abx500_get_register_page_interruptible(struct device *dev, u8 bank,
36 u8 first_reg, u8 *regvals, u8 numregs);
37int abx500_set_register_page_interruptible(struct device *dev, u8 bank,
38 u8 first_reg, u8 *regvals, u8 numregs);
39
40
41
42
43
44
45
46
47
48
49
50
51int abx500_mask_and_set_register_interruptible(struct device *dev, u8 bank,
52 u8 reg, u8 bitmask, u8 bitvalues);
53int abx500_get_chip_id(struct device *dev);
54int abx500_event_registers_startup_state_get(struct device *dev, u8 *event);
55int abx500_startup_irq_enabled(struct device *dev, unsigned int irq);
56
57struct abx500_ops {
58 int (*get_chip_id) (struct device *);
59 int (*get_register) (struct device *, u8, u8, u8 *);
60 int (*set_register) (struct device *, u8, u8, u8);
61 int (*get_register_page) (struct device *, u8, u8, u8 *, u8);
62 int (*set_register_page) (struct device *, u8, u8, u8 *, u8);
63 int (*mask_and_set_register) (struct device *, u8, u8, u8, u8);
64 int (*event_registers_startup_state_get) (struct device *, u8 *);
65 int (*startup_irq_enabled) (struct device *, unsigned int);
66 void (*dump_all_banks) (struct device *);
67};
68
69int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops);
70void abx500_remove_ops(struct device *dev);
71#endif
72