Merge remote-tracking branch 'regmap/topic/irq' into regmap-next
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 14 Feb 2013 17:11:08 +0000 (17:11 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 14 Feb 2013 17:11:08 +0000 (17:11 +0000)
1  2 
drivers/mfd/wm5102-tables.c
include/linux/regmap.h

index 1133a64c2dc9388609ff125c480a82840d9285d1,1e90d8e4d8a90c6084f3e3dd8f224f9f20dea596..f6fcb87b3504adc8e966d8225efcee066d2977e1
@@@ -96,6 -96,7 +96,7 @@@ const struct regmap_irq_chip wm5102_ao
        .mask_base = ARIZONA_AOD_IRQ_MASK_IRQ1,
        .ack_base = ARIZONA_AOD_IRQ1,
        .wake_base = ARIZONA_WAKE_CONTROL,
+       .wake_invert = 1,
        .num_regs = 1,
        .irqs = wm5102_aod_irqs,
        .num_irqs = ARRAY_SIZE(wm5102_aod_irqs),
@@@ -1882,7 -1883,7 +1883,7 @@@ static bool wm5102_volatile_register(st
        }
  }
  
 -#define WM5102_MAX_REGISTER 0x1a8fff
 +#define WM5102_MAX_REGISTER 0x1a9800
  
  const struct regmap_config wm5102_spi_regmap = {
        .reg_bits = 32,
diff --combined include/linux/regmap.h
index 7e2a48e25bd4578e8e9ef6820b0fa78aad6c8624,8c0b50df3d593aa5dde9672084e95f5b6d8869c8..9e790f9560255b2fcecfdb4669365accee04d92a
@@@ -28,8 -28,7 +28,8 @@@ struct regmap_range_cfg
  enum regcache_type {
        REGCACHE_NONE,
        REGCACHE_RBTREE,
 -      REGCACHE_COMPRESSED
 +      REGCACHE_COMPRESSED,
 +      REGCACHE_FLAT,
  };
  
  /**
@@@ -236,21 -235,14 +236,21 @@@ struct regmap_range_cfg 
        unsigned int window_len;
  };
  
 +struct regmap_async;
 +
  typedef int (*regmap_hw_write)(void *context, const void *data,
                               size_t count);
  typedef int (*regmap_hw_gather_write)(void *context,
                                      const void *reg, size_t reg_len,
                                      const void *val, size_t val_len);
 +typedef int (*regmap_hw_async_write)(void *context,
 +                                   const void *reg, size_t reg_len,
 +                                   const void *val, size_t val_len,
 +                                   struct regmap_async *async);
  typedef int (*regmap_hw_read)(void *context,
                              const void *reg_buf, size_t reg_size,
                              void *val_buf, size_t val_size);
 +typedef struct regmap_async *(*regmap_hw_async_alloc)(void);
  typedef void (*regmap_hw_free_context)(void *context);
  
  /**
   * @write: Write operation.
   * @gather_write: Write operation with split register/value, return -ENOTSUPP
   *                if not implemented  on a given device.
 + * @async_write: Write operation which completes asynchronously, optional and
 + *               must serialise with respect to non-async I/O.
   * @read: Read operation.  Data is returned in the buffer used to transmit
   *         data.
 + * @async_alloc: Allocate a regmap_async() structure.
   * @read_flag_mask: Mask to be set in the top byte of the register when doing
   *                  a read.
   * @reg_format_endian_default: Default endianness for formatted register
   * @val_format_endian_default: Default endianness for formatted register
   *     values. Used when the regmap_config specifies DEFAULT. If this is
   *     DEFAULT, BIG is assumed.
 + * @async_size: Size of struct used for async work.
   */
  struct regmap_bus {
        bool fast_io;
        regmap_hw_write write;
        regmap_hw_gather_write gather_write;
 +      regmap_hw_async_write async_write;
        regmap_hw_read read;
        regmap_hw_free_context free_context;
 +      regmap_hw_async_alloc async_alloc;
        u8 read_flag_mask;
        enum regmap_endian reg_format_endian_default;
        enum regmap_endian val_format_endian_default;
@@@ -324,8 -310,6 +324,8 @@@ int regmap_raw_write(struct regmap *map
                     const void *val, size_t val_len);
  int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
                        size_t val_count);
 +int regmap_raw_write_async(struct regmap *map, unsigned int reg,
 +                         const void *val, size_t val_len);
  int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
  int regmap_raw_read(struct regmap *map, unsigned int reg,
                    void *val, size_t val_len);
@@@ -337,7 -321,6 +337,7 @@@ int regmap_update_bits_check(struct reg
                             unsigned int mask, unsigned int val,
                             bool *change);
  int regmap_get_val_bytes(struct regmap *map);
 +int regmap_async_complete(struct regmap *map);
  
  int regcache_sync(struct regmap *map);
  int regcache_sync_region(struct regmap *map, unsigned int min,
@@@ -398,6 -381,7 +398,7 @@@ struct regmap_irq_chip 
        unsigned int wake_base;
        unsigned int irq_reg_stride;
        unsigned int mask_invert;
+       unsigned int wake_invert;
        bool runtime_pm;
  
        int num_regs;
@@@ -439,13 -423,6 +440,13 @@@ static inline int regmap_raw_write(stru
        return -EINVAL;
  }
  
 +static inline int regmap_raw_write_async(struct regmap *map, unsigned int reg,
 +                                       const void *val, size_t val_len)
 +{
 +      WARN_ONCE(1, "regmap API is disabled");
 +      return -EINVAL;
 +}
 +
  static inline int regmap_bulk_write(struct regmap *map, unsigned int reg,
                                    const void *val, size_t val_count)
  {
@@@ -524,11 -501,6 +525,11 @@@ static inline void regcache_mark_dirty(
        WARN_ONCE(1, "regmap API is disabled");
  }
  
 +static inline void regmap_async_complete(struct regmap *map)
 +{
 +      WARN_ONCE(1, "regmap API is disabled");
 +}
 +
  static inline int regmap_register_patch(struct regmap *map,
                                        const struct reg_default *regs,
                                        int num_regs)