-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mark Brown
committed
Aug 8, 2011
1 parent
30d3cae
commit 7306312
Showing
3 changed files
with
47 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 73304781274200c341996f65220d36b3cda8e217 | ||
refs/heads/master: 93de91245b66f20dd387c2745744950a11a5c436 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Register map access API internal header | ||
* | ||
* Copyright 2011 Wolfson Microelectronics plc | ||
* | ||
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef _REGMAP_INTERNAL_H | ||
#define _REGMAP_INTERNAL_H | ||
|
||
#include <linux/regmap.h> | ||
|
||
struct regmap; | ||
|
||
struct regmap_format { | ||
size_t buf_size; | ||
size_t reg_bytes; | ||
size_t val_bytes; | ||
void (*format_write)(struct regmap *map, | ||
unsigned int reg, unsigned int val); | ||
void (*format_reg)(void *buf, unsigned int reg); | ||
void (*format_val)(void *buf, unsigned int val); | ||
unsigned int (*parse_val)(void *buf); | ||
}; | ||
|
||
struct regmap { | ||
struct mutex lock; | ||
|
||
struct device *dev; /* Device we do I/O on */ | ||
void *work_buf; /* Scratch buffer used to format I/O */ | ||
struct regmap_format format; /* Buffer format */ | ||
const struct regmap_bus *bus; | ||
|
||
unsigned int max_register; | ||
bool (*writeable_reg)(struct device *dev, unsigned int reg); | ||
bool (*readable_reg)(struct device *dev, unsigned int reg); | ||
bool (*volatile_reg)(struct device *dev, unsigned int reg); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters