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
2b0f61e2
Commit
2b0f61e2
authored
Jul 17, 2020
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regmap/for-5.8' into regmap-linus
parents
11ba4688
299632e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
25 deletions
+31
-25
drivers/base/regmap/Kconfig
drivers/base/regmap/Kconfig
+1
-1
drivers/base/regmap/regmap-debugfs.c
drivers/base/regmap/regmap-debugfs.c
+29
-23
drivers/base/regmap/regmap.c
drivers/base/regmap/regmap.c
+1
-1
No files found.
drivers/base/regmap/Kconfig
View file @
2b0f61e2
...
...
@@ -4,7 +4,7 @@
# subsystems should select the appropriate symbols.
config REGMAP
default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SCCB || REGMAP_I3C)
default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_S
OUNDWIRE || REGMAP_S
CCB || REGMAP_I3C)
select IRQ_DOMAIN if REGMAP_IRQ
bool
...
...
drivers/base/regmap/regmap-debugfs.c
View file @
2b0f61e2
...
...
@@ -463,29 +463,31 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
{
struct
regmap
*
map
=
container_of
(
file
->
private_data
,
struct
regmap
,
cache_only
);
ssize_t
result
;
bool
was_enabled
,
require_sync
=
false
;
bool
new_val
,
require_sync
=
false
;
int
err
;
map
->
lock
(
map
->
lock_arg
);
err
=
kstrtobool_from_user
(
user_buf
,
count
,
&
new_val
);
/* Ignore malforned data like debugfs_write_file_bool() */
if
(
err
)
return
count
;
was_enabled
=
map
->
cache_only
;
err
=
debugfs_file_get
(
file
->
f_path
.
dentry
);
if
(
err
)
return
err
;
result
=
debugfs_write_file_bool
(
file
,
user_buf
,
count
,
ppos
);
if
(
result
<
0
)
{
map
->
unlock
(
map
->
lock_arg
);
return
result
;
}
map
->
lock
(
map
->
lock_arg
);
if
(
map
->
cache_only
&&
!
was_enabled
)
{
if
(
new_val
&&
!
map
->
cache_only
)
{
dev_warn
(
map
->
dev
,
"debugfs cache_only=Y forced
\n
"
);
add_taint
(
TAINT_USER
,
LOCKDEP_STILL_OK
);
}
else
if
(
!
map
->
cache_only
&&
was_enabled
)
{
}
else
if
(
!
new_val
&&
map
->
cache_only
)
{
dev_warn
(
map
->
dev
,
"debugfs cache_only=N forced: syncing cache
\n
"
);
require_sync
=
true
;
}
map
->
cache_only
=
new_val
;
map
->
unlock
(
map
->
lock_arg
);
debugfs_file_put
(
file
->
f_path
.
dentry
);
if
(
require_sync
)
{
err
=
regcache_sync
(
map
);
...
...
@@ -493,7 +495,7 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
dev_err
(
map
->
dev
,
"Failed to sync cache %d
\n
"
,
err
);
}
return
resul
t
;
return
coun
t
;
}
static
const
struct
file_operations
regmap_cache_only_fops
=
{
...
...
@@ -508,28 +510,32 @@ static ssize_t regmap_cache_bypass_write_file(struct file *file,
{
struct
regmap
*
map
=
container_of
(
file
->
private_data
,
struct
regmap
,
cache_bypass
);
ssize_t
result
;
bool
was_enabled
;
bool
new_val
;
int
err
;
map
->
lock
(
map
->
lock_arg
);
err
=
kstrtobool_from_user
(
user_buf
,
count
,
&
new_val
);
/* Ignore malforned data like debugfs_write_file_bool() */
if
(
err
)
return
count
;
was_enabled
=
map
->
cache_bypass
;
err
=
debugfs_file_get
(
file
->
f_path
.
dentry
);
if
(
err
)
return
err
;
result
=
debugfs_write_file_bool
(
file
,
user_buf
,
count
,
ppos
);
if
(
result
<
0
)
goto
out
;
map
->
lock
(
map
->
lock_arg
);
if
(
map
->
cache_bypass
&&
!
was_enabled
)
{
if
(
new_val
&&
!
map
->
cache_bypass
)
{
dev_warn
(
map
->
dev
,
"debugfs cache_bypass=Y forced
\n
"
);
add_taint
(
TAINT_USER
,
LOCKDEP_STILL_OK
);
}
else
if
(
!
map
->
cache_bypass
&&
was_enabled
)
{
}
else
if
(
!
new_val
&&
map
->
cache_bypass
)
{
dev_warn
(
map
->
dev
,
"debugfs cache_bypass=N forced
\n
"
);
}
map
->
cache_bypass
=
new_val
;
out:
map
->
unlock
(
map
->
lock_arg
);
debugfs_file_put
(
file
->
f_path
.
dentry
);
return
resul
t
;
return
coun
t
;
}
static
const
struct
file_operations
regmap_cache_bypass_fops
=
{
...
...
drivers/base/regmap/regmap.c
View file @
2b0f61e2
...
...
@@ -1364,7 +1364,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data)
/* If the user didn't specify a name match any */
if
(
data
)
return
(
*
r
)
->
name
==
data
;
return
!
strcmp
((
*
r
)
->
name
,
data
)
;
else
return
1
;
}
...
...
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