0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <linux/regulator/machine.h>
0015
0016 struct device;
0017
0018 #ifndef MFD_ABX500_H
0019 #define MFD_ABX500_H
0020
0021
0022
0023
0024
0025 struct abx500_init_settings {
0026 u8 bank;
0027 u8 reg;
0028 u8 setting;
0029 };
0030
0031 int abx500_set_register_interruptible(struct device *dev, u8 bank, u8 reg,
0032 u8 value);
0033 int abx500_get_register_interruptible(struct device *dev, u8 bank, u8 reg,
0034 u8 *value);
0035 int abx500_get_register_page_interruptible(struct device *dev, u8 bank,
0036 u8 first_reg, u8 *regvals, u8 numregs);
0037 int abx500_set_register_page_interruptible(struct device *dev, u8 bank,
0038 u8 first_reg, u8 *regvals, u8 numregs);
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 int abx500_mask_and_set_register_interruptible(struct device *dev, u8 bank,
0052 u8 reg, u8 bitmask, u8 bitvalues);
0053 int abx500_get_chip_id(struct device *dev);
0054 int abx500_event_registers_startup_state_get(struct device *dev, u8 *event);
0055 int abx500_startup_irq_enabled(struct device *dev, unsigned int irq);
0056
0057 struct abx500_ops {
0058 int (*get_chip_id) (struct device *);
0059 int (*get_register) (struct device *, u8, u8, u8 *);
0060 int (*set_register) (struct device *, u8, u8, u8);
0061 int (*get_register_page) (struct device *, u8, u8, u8 *, u8);
0062 int (*set_register_page) (struct device *, u8, u8, u8 *, u8);
0063 int (*mask_and_set_register) (struct device *, u8, u8, u8, u8);
0064 int (*event_registers_startup_state_get) (struct device *, u8 *);
0065 int (*startup_irq_enabled) (struct device *, unsigned int);
0066 void (*dump_all_banks) (struct device *);
0067 };
0068
0069 int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops);
0070 void abx500_remove_ops(struct device *dev);
0071 #endif