linux-4.4.1/regmap_config
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#fd14baf7]
#backlinks
*説明 [#x13b8961]
-パス: [[linux-4.4.1/include/linux/regmap.h]]
-FIXME: これは何?
--説明
**参考 [#w07fee28]
*実装 [#k22862b5]
/**
* Configuration for the register map of a device.
*
* @name: Optional name of the regmap. Useful when a dev...
* register regions.
*
* @reg_bits: Number of bits in a register address, mand...
* @reg_stride: The register address stride. Valid regis...
* multiple of this value. If set to 0, a v...
* used.
* @pad_bits: Number of bits of padding between register...
* @val_bits: Number of bits in a register value, mandat...
*
* @writeable_reg: Optional callback returning true if t...
* can be written to. If this field is N...
* (see below) is not, the check is perf...
* (a register is writeable if it belong...
* specified by wr_table).
* @readable_reg: Optional callback returning true if th...
* can be read from. If this field is NUL...
* (see below) is not, the check is perf...
* (a register is readable if it belongs...
* specified by rd_table).
* @volatile_reg: Optional callback returning true if th...
* value can't be cached. If this field i...
* volatile_table (see below) is not, the...
* such table (a register is volatile if ...
* the ranges specified by volatile_table).
* @precious_reg: Optional callback returning true if th...
* should not be read outside of a call f...
* (e.g., a clear on read interrupt statu...
* field is NULL but precious_table (see ...
* check is performed on such table (a re...
* it belongs to one of the ranges specif...
* @lock: Optional lock callback (overrides regm...
* function, based on spinlock or mutex).
* @unlock: As above for unlocking.
* @lock_arg: this field is passed as the only argum...
* functions (ignored in case regular loc...
* are not overridden).
* @reg_read: Optional callback that if filled will ...
* all the reads from the registers. Shou...
* devices whose read operation cannot be...
* read operation on a bus such as SPI, I...
* devices do not need this.
* @reg_write: Same as above for writing.
* @fast_io: Register IO is fast. Use a spinlock in...
* to perform locking. This field is igno...
* functions are used (see fields lock/un...
* This field is a duplicate of a similar...
* 'struct regmap_bus' and serves exact s...
* Use it only for "no-bus" cases.
* @max_register: Optional, specifies the maximum valid ...
* @wr_table: Optional, points to a struct regmap_ac...
* valid ranges for write access.
* @rd_table: As above, for read access.
* @volatile_table: As above, for volatile registers.
* @precious_table: As above, for precious registers.
* @reg_defaults: Power on reset values for registers (f...
* register cache support).
* @num_reg_defaults: Number of elements in reg_defaults.
*
* @read_flag_mask: Mask to be set in the top byte of th...
* a read.
* @write_flag_mask: Mask to be set in the top byte of t...
* a write. If both read_flag_mask and...
* empty the regmap_bus default masks ...
* @use_single_rw: If set, converts the bulk read and wr...
* a series of single read and write op...
* for device that does not support bul...
* @can_multi_write: If set, the device supports the mul...
* write operations, if clear multi wr...
* split into individual write operati...
*
* @cache_type: The actual cache type.
* @reg_defaults_raw: Power on reset values for register...
* register cache support).
* @num_reg_defaults_raw: Number of elements in reg_defa...
* @reg_format_endian: Endianness for formatted register...
* DEFAULT, the @reg_format_endian_d...
* regmap bus is used.
* @val_format_endian: Endianness for formatted register...
* DEFAULT, the @reg_format_endian_d...
* regmap bus is used.
*
* @ranges: Array of configuration entries for virtual a...
* @num_ranges: Number of range configuration entries.
*/
struct regmap_config {
const char *name;
int reg_bits;
int reg_stride;
int pad_bits;
int val_bits;
bool (*writeable_reg)(struct device *dev, unsign...
bool (*readable_reg)(struct device *dev, unsigne...
bool (*volatile_reg)(struct device *dev, unsigne...
bool (*precious_reg)(struct device *dev, unsigne...
regmap_lock lock;
regmap_unlock unlock;
void *lock_arg;
-
--[[linux-4.4.1/device]]
--[[linux-4.4.1/regmap_lock]]
--[[linux-4.4.1/regmap_unlock]]
int (*reg_read)(void *context, unsigned int reg,...
int (*reg_write)(void *context, unsigned int reg...
bool fast_io;
unsigned int max_register;
const struct regmap_access_table *wr_table;
const struct regmap_access_table *rd_table;
const struct regmap_access_table *volatile_table;
const struct regmap_access_table *precious_table;
-
--[[linux-4.4.1/regmap_access_table]]
const struct reg_default *reg_defaults;
unsigned int num_reg_defaults;
-
--[[linux-4.4.1/reg_default]]
enum regcache_type cache_type;
const void *reg_defaults_raw;
unsigned int num_reg_defaults_raw;
-
--[[linux-4.4.1/regcache_type]]
u8 read_flag_mask;
u8 write_flag_mask;
bool use_single_rw;
bool can_multi_write;
enum regmap_endian reg_format_endian;
enum regmap_endian val_format_endian;
-
--[[linux-4.4.1/regmap_endian]]
const struct regmap_range_cfg *ranges;
unsigned int num_ranges;
-
--[[linux-4.4.1/regmap_range_cfg]]
};
*コメント [#t388bc8a]
終了行:
*参照元 [#fd14baf7]
#backlinks
*説明 [#x13b8961]
-パス: [[linux-4.4.1/include/linux/regmap.h]]
-FIXME: これは何?
--説明
**参考 [#w07fee28]
*実装 [#k22862b5]
/**
* Configuration for the register map of a device.
*
* @name: Optional name of the regmap. Useful when a dev...
* register regions.
*
* @reg_bits: Number of bits in a register address, mand...
* @reg_stride: The register address stride. Valid regis...
* multiple of this value. If set to 0, a v...
* used.
* @pad_bits: Number of bits of padding between register...
* @val_bits: Number of bits in a register value, mandat...
*
* @writeable_reg: Optional callback returning true if t...
* can be written to. If this field is N...
* (see below) is not, the check is perf...
* (a register is writeable if it belong...
* specified by wr_table).
* @readable_reg: Optional callback returning true if th...
* can be read from. If this field is NUL...
* (see below) is not, the check is perf...
* (a register is readable if it belongs...
* specified by rd_table).
* @volatile_reg: Optional callback returning true if th...
* value can't be cached. If this field i...
* volatile_table (see below) is not, the...
* such table (a register is volatile if ...
* the ranges specified by volatile_table).
* @precious_reg: Optional callback returning true if th...
* should not be read outside of a call f...
* (e.g., a clear on read interrupt statu...
* field is NULL but precious_table (see ...
* check is performed on such table (a re...
* it belongs to one of the ranges specif...
* @lock: Optional lock callback (overrides regm...
* function, based on spinlock or mutex).
* @unlock: As above for unlocking.
* @lock_arg: this field is passed as the only argum...
* functions (ignored in case regular loc...
* are not overridden).
* @reg_read: Optional callback that if filled will ...
* all the reads from the registers. Shou...
* devices whose read operation cannot be...
* read operation on a bus such as SPI, I...
* devices do not need this.
* @reg_write: Same as above for writing.
* @fast_io: Register IO is fast. Use a spinlock in...
* to perform locking. This field is igno...
* functions are used (see fields lock/un...
* This field is a duplicate of a similar...
* 'struct regmap_bus' and serves exact s...
* Use it only for "no-bus" cases.
* @max_register: Optional, specifies the maximum valid ...
* @wr_table: Optional, points to a struct regmap_ac...
* valid ranges for write access.
* @rd_table: As above, for read access.
* @volatile_table: As above, for volatile registers.
* @precious_table: As above, for precious registers.
* @reg_defaults: Power on reset values for registers (f...
* register cache support).
* @num_reg_defaults: Number of elements in reg_defaults.
*
* @read_flag_mask: Mask to be set in the top byte of th...
* a read.
* @write_flag_mask: Mask to be set in the top byte of t...
* a write. If both read_flag_mask and...
* empty the regmap_bus default masks ...
* @use_single_rw: If set, converts the bulk read and wr...
* a series of single read and write op...
* for device that does not support bul...
* @can_multi_write: If set, the device supports the mul...
* write operations, if clear multi wr...
* split into individual write operati...
*
* @cache_type: The actual cache type.
* @reg_defaults_raw: Power on reset values for register...
* register cache support).
* @num_reg_defaults_raw: Number of elements in reg_defa...
* @reg_format_endian: Endianness for formatted register...
* DEFAULT, the @reg_format_endian_d...
* regmap bus is used.
* @val_format_endian: Endianness for formatted register...
* DEFAULT, the @reg_format_endian_d...
* regmap bus is used.
*
* @ranges: Array of configuration entries for virtual a...
* @num_ranges: Number of range configuration entries.
*/
struct regmap_config {
const char *name;
int reg_bits;
int reg_stride;
int pad_bits;
int val_bits;
bool (*writeable_reg)(struct device *dev, unsign...
bool (*readable_reg)(struct device *dev, unsigne...
bool (*volatile_reg)(struct device *dev, unsigne...
bool (*precious_reg)(struct device *dev, unsigne...
regmap_lock lock;
regmap_unlock unlock;
void *lock_arg;
-
--[[linux-4.4.1/device]]
--[[linux-4.4.1/regmap_lock]]
--[[linux-4.4.1/regmap_unlock]]
int (*reg_read)(void *context, unsigned int reg,...
int (*reg_write)(void *context, unsigned int reg...
bool fast_io;
unsigned int max_register;
const struct regmap_access_table *wr_table;
const struct regmap_access_table *rd_table;
const struct regmap_access_table *volatile_table;
const struct regmap_access_table *precious_table;
-
--[[linux-4.4.1/regmap_access_table]]
const struct reg_default *reg_defaults;
unsigned int num_reg_defaults;
-
--[[linux-4.4.1/reg_default]]
enum regcache_type cache_type;
const void *reg_defaults_raw;
unsigned int num_reg_defaults_raw;
-
--[[linux-4.4.1/regcache_type]]
u8 read_flag_mask;
u8 write_flag_mask;
bool use_single_rw;
bool can_multi_write;
enum regmap_endian reg_format_endian;
enum regmap_endian val_format_endian;
-
--[[linux-4.4.1/regmap_endian]]
const struct regmap_range_cfg *ranges;
unsigned int num_ranges;
-
--[[linux-4.4.1/regmap_range_cfg]]
};
*コメント [#t388bc8a]
ページ名: