Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b508c80c
Commit
b508c80c
authored
Apr 16, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regmap/topic/async' into regmap-next
parents
41ef2d56
fe7d4ccd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
drivers/base/regmap/regmap.c
drivers/base/regmap/regmap.c
+8
-0
include/trace/events/regmap.h
include/trace/events/regmap.h
+48
-0
No files found.
drivers/base/regmap/regmap.c
View file @
b508c80c
...
...
@@ -999,6 +999,8 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,
if
(
!
async
)
return
-
ENOMEM
;
trace_regmap_async_write_start
(
map
->
dev
,
reg
,
val_len
);
async
->
work_buf
=
kzalloc
(
map
->
format
.
buf_size
,
GFP_KERNEL
|
GFP_DMA
);
if
(
!
async
->
work_buf
)
{
...
...
@@ -1642,6 +1644,8 @@ void regmap_async_complete_cb(struct regmap_async *async, int ret)
struct
regmap
*
map
=
async
->
map
;
bool
wake
;
trace_regmap_async_io_complete
(
map
->
dev
);
spin_lock
(
&
map
->
async_lock
);
list_del
(
&
async
->
list
);
...
...
@@ -1688,6 +1692,8 @@ int regmap_async_complete(struct regmap *map)
if
(
!
map
->
bus
->
async_write
)
return
0
;
trace_regmap_async_complete_start
(
map
->
dev
);
wait_event
(
map
->
async_waitq
,
regmap_async_is_done
(
map
));
spin_lock_irqsave
(
&
map
->
async_lock
,
flags
);
...
...
@@ -1695,6 +1701,8 @@ int regmap_async_complete(struct regmap *map)
map
->
async_ret
=
0
;
spin_unlock_irqrestore
(
&
map
->
async_lock
,
flags
);
trace_regmap_async_complete_done
(
map
->
dev
);
return
ret
;
}
EXPORT_SYMBOL_GPL
(
regmap_async_complete
);
...
...
include/trace/events/regmap.h
View file @
b508c80c
...
...
@@ -175,6 +175,54 @@ DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
);
DECLARE_EVENT_CLASS
(
regmap_async
,
TP_PROTO
(
struct
device
*
dev
),
TP_ARGS
(
dev
),
TP_STRUCT__entry
(
__string
(
name
,
dev_name
(
dev
)
)
),
TP_fast_assign
(
__assign_str
(
name
,
dev_name
(
dev
));
),
TP_printk
(
"%s"
,
__get_str
(
name
))
);
DEFINE_EVENT
(
regmap_block
,
regmap_async_write_start
,
TP_PROTO
(
struct
device
*
dev
,
unsigned
int
reg
,
int
count
),
TP_ARGS
(
dev
,
reg
,
count
)
);
DEFINE_EVENT
(
regmap_async
,
regmap_async_io_complete
,
TP_PROTO
(
struct
device
*
dev
),
TP_ARGS
(
dev
)
);
DEFINE_EVENT
(
regmap_async
,
regmap_async_complete_start
,
TP_PROTO
(
struct
device
*
dev
),
TP_ARGS
(
dev
)
);
DEFINE_EVENT
(
regmap_async
,
regmap_async_complete_done
,
TP_PROTO
(
struct
device
*
dev
),
TP_ARGS
(
dev
)
);
#endif
/* _TRACE_REGMAP_H */
/* This part must be outside protection */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment