Linux Kernel
3.7.1
|
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/mutex.h>
#include <linux/err.h>
#include <linux/rbtree.h>
#include <trace/events/regmap.h>
#include "internal.h"
Go to the source code of this file.
Macros | |
#define | CREATE_TRACE_POINTS |
|
read |
devm_regmap_init(): Initialise managed register map
: Device that will be interacted with : Bus-specific callbacks to use with device : Data passed to bus-specific callbacks : Configuration for register map
The return value will be an ERR_PTR() on error or a valid pointer to a struct regmap. This function should generally not be called directly, it should be called by bus-specific init functions. The map will be automatically freed by the device management code.
EXPORT_SYMBOL_GPL | ( | regmap_init | ) |
EXPORT_SYMBOL_GPL | ( | devm_regmap_init | ) |
EXPORT_SYMBOL_GPL | ( | regmap_reinit_cache | ) |
EXPORT_SYMBOL_GPL | ( | regmap_exit | ) |
EXPORT_SYMBOL_GPL | ( | dev_get_regmap | ) |
EXPORT_SYMBOL_GPL | ( | regmap_write | ) |
EXPORT_SYMBOL_GPL | ( | regmap_raw_write | ) |
EXPORT_SYMBOL_GPL | ( | regmap_bulk_write | ) |
EXPORT_SYMBOL_GPL | ( | regmap_read | ) |
EXPORT_SYMBOL_GPL | ( | regmap_raw_read | ) |
EXPORT_SYMBOL_GPL | ( | regmap_bulk_read | ) |
EXPORT_SYMBOL_GPL | ( | regmap_update_bits | ) |
EXPORT_SYMBOL_GPL | ( | regmap_update_bits_check | ) |
EXPORT_SYMBOL_GPL | ( | regmap_register_patch | ) |
EXPORT_SYMBOL_GPL | ( | regmap_get_val_bytes | ) |
postcore_initcall | ( | regmap_initcall | ) |
regmap_bulk_read(): Read multiple registers from the device
: Register map to write to : First register to be read from : Pointer to store read value, in native register size for device : Number of registers to read
A value of zero will be returned on success, a negative errno will be returned in error cases.
regmap_exit(): Free a previously allocated register map
|
read |
regmap_init(): Initialise register map
: Device that will be interacted with : Bus-specific callbacks to use with device : Data passed to bus-specific callbacks : Configuration for register map
The return value will be an ERR_PTR() on error or a valid pointer to a struct regmap. This function should generally not be called directly, it should be called by bus-specific init functions.
regmap_raw_read(): Read raw data from the device
: Register map to write to : First register to be read from : Pointer to store read value : Size of data to read
A value of zero will be returned on success, a negative errno will be returned in error cases.
regmap_raw_write(): Write raw values to one or more registers
: Register map to write to : Initial register to write to : Block of data to be written, laid out for direct transmission to the device : Length of data pointed to by val.
This function is intended to be used for things like firmware download where a large block of data needs to be transferred to the device. No formatting will be done on the data provided.
A value of zero will be returned on success, a negative errno will be returned in error cases.
regmap_read(): Read a value from a single register
: Register map to write to : Register to be read from : Pointer to store read value
A value of zero will be returned on success, a negative errno will be returned in error cases.
regmap_register_patch: Register and apply register updates to be applied on device initialistion
: Register map to apply updates to. : Values to update. : Number of entries in regs.
Register a set of register updates to be applied to the device whenever the device registers are synchronised with the cache and apply them immediately. Typically this is used to apply corrections to be applied to the device defaults on startup, such as the updates some vendors provide to undocumented registers.
regmap_reinit_cache(): Reinitialise the current register cache
: Register map to operate on. : New configuration. Only the cache data will be used.
Discard any existing register cache for the map and initialize a new cache. This can be used to restore the cache to defaults or to update the cache configuration to reflect runtime discovery of the hardware.
No explicit locking is done here, the user needs to ensure that this function will not race with other calls to regmap.
int regmap_update_bits_check | ( | struct regmap * | map, |
unsigned int | reg, | ||
unsigned int | mask, | ||
unsigned int | val, | ||
bool * | change | ||
) |
regmap_update_bits_check: Perform a read/modify/write cycle on the register map and report if updated
: Register map to update : Register to update : Bitmask to change : New value for bitmask : Boolean indicating if a write was done
Returns zero for success, a negative number on error.
regmap_write(): Write a value to a single register
: Register map to write to : Register to write to : Value to be written
A value of zero will be returned on success, a negative errno will be returned in error cases.