diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-04-14 10:44:42 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-04-14 10:44:42 -0400 |
| commit | 740c699a8d316c8bf8593f19e2ca47795e690622 (patch) | |
| tree | a78886955770a477945c5d84e06b2e7678733b54 /include/linux/regmap.h | |
| parent | e69af4657e7764d03ad555f0b583d9c4217bcefa (diff) | |
| parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
Merge tag 'v3.15-rc1' into perf/urgent
Pick up the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
| -rw-r--r-- | include/linux/regmap.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 4149f1a9b003..85691b9b4fa7 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -164,6 +164,9 @@ typedef void (*regmap_unlock)(void *); | |||
| 164 | * @use_single_rw: If set, converts the bulk read and write operations into | 164 | * @use_single_rw: If set, converts the bulk read and write operations into |
| 165 | * a series of single read and write operations. This is useful | 165 | * a series of single read and write operations. This is useful |
| 166 | * for device that does not support bulk read and write. | 166 | * for device that does not support bulk read and write. |
| 167 | * @can_multi_write: If set, the device supports the multi write mode of bulk | ||
| 168 | * write operations, if clear multi write requests will be | ||
| 169 | * split into individual write operations | ||
| 167 | * | 170 | * |
| 168 | * @cache_type: The actual cache type. | 171 | * @cache_type: The actual cache type. |
| 169 | * @reg_defaults_raw: Power on reset values for registers (for use with | 172 | * @reg_defaults_raw: Power on reset values for registers (for use with |
| @@ -215,6 +218,7 @@ struct regmap_config { | |||
| 215 | u8 write_flag_mask; | 218 | u8 write_flag_mask; |
| 216 | 219 | ||
| 217 | bool use_single_rw; | 220 | bool use_single_rw; |
| 221 | bool can_multi_write; | ||
| 218 | 222 | ||
| 219 | enum regmap_endian reg_format_endian; | 223 | enum regmap_endian reg_format_endian; |
| 220 | enum regmap_endian val_format_endian; | 224 | enum regmap_endian val_format_endian; |
| @@ -317,12 +321,16 @@ struct regmap *regmap_init(struct device *dev, | |||
| 317 | const struct regmap_bus *bus, | 321 | const struct regmap_bus *bus, |
| 318 | void *bus_context, | 322 | void *bus_context, |
| 319 | const struct regmap_config *config); | 323 | const struct regmap_config *config); |
| 324 | int regmap_attach_dev(struct device *dev, struct regmap *map, | ||
| 325 | const struct regmap_config *config); | ||
| 320 | struct regmap *regmap_init_i2c(struct i2c_client *i2c, | 326 | struct regmap *regmap_init_i2c(struct i2c_client *i2c, |
| 321 | const struct regmap_config *config); | 327 | const struct regmap_config *config); |
| 322 | struct regmap *regmap_init_spi(struct spi_device *dev, | 328 | struct regmap *regmap_init_spi(struct spi_device *dev, |
| 323 | const struct regmap_config *config); | 329 | const struct regmap_config *config); |
| 324 | struct regmap *regmap_init_spmi(struct spmi_device *dev, | 330 | struct regmap *regmap_init_spmi_base(struct spmi_device *dev, |
| 325 | const struct regmap_config *config); | 331 | const struct regmap_config *config); |
| 332 | struct regmap *regmap_init_spmi_ext(struct spmi_device *dev, | ||
| 333 | const struct regmap_config *config); | ||
| 326 | struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id, | 334 | struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id, |
| 327 | void __iomem *regs, | 335 | void __iomem *regs, |
| 328 | const struct regmap_config *config); | 336 | const struct regmap_config *config); |
| @@ -335,8 +343,10 @@ struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c, | |||
| 335 | const struct regmap_config *config); | 343 | const struct regmap_config *config); |
| 336 | struct regmap *devm_regmap_init_spi(struct spi_device *dev, | 344 | struct regmap *devm_regmap_init_spi(struct spi_device *dev, |
| 337 | const struct regmap_config *config); | 345 | const struct regmap_config *config); |
| 338 | struct regmap *devm_regmap_init_spmi(struct spmi_device *dev, | 346 | struct regmap *devm_regmap_init_spmi_base(struct spmi_device *dev, |
| 339 | const struct regmap_config *config); | 347 | const struct regmap_config *config); |
| 348 | struct regmap *devm_regmap_init_spmi_ext(struct spmi_device *dev, | ||
| 349 | const struct regmap_config *config); | ||
| 340 | struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id, | 350 | struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id, |
| 341 | void __iomem *regs, | 351 | void __iomem *regs, |
| 342 | const struct regmap_config *config); | 352 | const struct regmap_config *config); |
| @@ -386,8 +396,11 @@ int regmap_raw_write(struct regmap *map, unsigned int reg, | |||
| 386 | const void *val, size_t val_len); | 396 | const void *val, size_t val_len); |
| 387 | int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, | 397 | int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, |
| 388 | size_t val_count); | 398 | size_t val_count); |
| 389 | int regmap_multi_reg_write(struct regmap *map, struct reg_default *regs, | 399 | int regmap_multi_reg_write(struct regmap *map, const struct reg_default *regs, |
| 390 | int num_regs); | 400 | int num_regs); |
| 401 | int regmap_multi_reg_write_bypassed(struct regmap *map, | ||
| 402 | const struct reg_default *regs, | ||
| 403 | int num_regs); | ||
| 391 | int regmap_raw_write_async(struct regmap *map, unsigned int reg, | 404 | int regmap_raw_write_async(struct regmap *map, unsigned int reg, |
| 392 | const void *val, size_t val_len); | 405 | const void *val, size_t val_len); |
| 393 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val); | 406 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val); |
| @@ -423,6 +436,8 @@ bool regmap_check_range_table(struct regmap *map, unsigned int reg, | |||
| 423 | 436 | ||
| 424 | int regmap_register_patch(struct regmap *map, const struct reg_default *regs, | 437 | int regmap_register_patch(struct regmap *map, const struct reg_default *regs, |
| 425 | int num_regs); | 438 | int num_regs); |
| 439 | int regmap_parse_val(struct regmap *map, const void *buf, | ||
| 440 | unsigned int *val); | ||
| 426 | 441 | ||
| 427 | static inline bool regmap_reg_in_range(unsigned int reg, | 442 | static inline bool regmap_reg_in_range(unsigned int reg, |
| 428 | const struct regmap_range *range) | 443 | const struct regmap_range *range) |
| @@ -695,6 +710,13 @@ static inline int regmap_register_patch(struct regmap *map, | |||
| 695 | return -EINVAL; | 710 | return -EINVAL; |
| 696 | } | 711 | } |
| 697 | 712 | ||
| 713 | static inline int regmap_parse_val(struct regmap *map, const void *buf, | ||
| 714 | unsigned int *val) | ||
| 715 | { | ||
| 716 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 717 | return -EINVAL; | ||
| 718 | } | ||
| 719 | |||
| 698 | static inline struct regmap *dev_get_regmap(struct device *dev, | 720 | static inline struct regmap *dev_get_regmap(struct device *dev, |
| 699 | const char *name) | 721 | const char *name) |
| 700 | { | 722 | { |
