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
615c4d9a
Commit
615c4d9a
authored
Apr 25, 2019
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'regmap-5.2' into regmap-next
parents
7fdc9fc8
37613fa5
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
118 additions
and
177 deletions
+118
-177
drivers/base/regmap/internal.h
drivers/base/regmap/internal.h
+1
-4
drivers/base/regmap/regcache-flat.c
drivers/base/regmap/regcache-flat.c
+7
-11
drivers/base/regmap/regcache-lzo.c
drivers/base/regmap/regcache-lzo.c
+7
-11
drivers/base/regmap/regcache-rbtree.c
drivers/base/regmap/regcache-rbtree.c
+7
-11
drivers/base/regmap/regcache.c
drivers/base/regmap/regcache.c
+7
-11
drivers/base/regmap/regmap-ac97.c
drivers/base/regmap/regmap-ac97.c
+5
-17
drivers/base/regmap/regmap-debugfs.c
drivers/base/regmap/regmap-debugfs.c
+31
-17
drivers/base/regmap/regmap-i2c.c
drivers/base/regmap/regmap-i2c.c
+7
-11
drivers/base/regmap/regmap-irq.c
drivers/base/regmap/regmap-irq.c
+7
-11
drivers/base/regmap/regmap-mmio.c
drivers/base/regmap/regmap-mmio.c
+5
-17
drivers/base/regmap/regmap-spi.c
drivers/base/regmap/regmap-spi.c
+7
-11
drivers/base/regmap/regmap-spmi.c
drivers/base/regmap/regmap-spmi.c
+10
-19
drivers/base/regmap/regmap-w1.c
drivers/base/regmap/regmap-w1.c
+6
-10
drivers/base/regmap/regmap.c
drivers/base/regmap/regmap.c
+11
-16
No files found.
drivers/base/regmap/internal.h
View file @
615c4d9a
/* SPDX-License-Identifier: GPL-2.0 */
/*
/*
* Register map access API internal header
* Register map access API internal header
*
*
* Copyright 2011 Wolfson Microelectronics plc
* Copyright 2011 Wolfson Microelectronics plc
*
*
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
* 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
#ifndef _REGMAP_INTERNAL_H
...
...
drivers/base/regmap/regcache-flat.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register cache access API - flat caching support
//
*
// Register cache access API - flat caching support
* Copyright 2012 Wolfson Microelectronics plc
//
*
// Copyright 2012 Wolfson Microelectronics plc
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
//
*
// 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.
*/
#include <linux/device.h>
#include <linux/device.h>
#include <linux/seq_file.h>
#include <linux/seq_file.h>
...
...
drivers/base/regmap/regcache-lzo.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register cache access API - LZO caching support
//
*
// Register cache access API - LZO caching support
* Copyright 2011 Wolfson Microelectronics plc
//
*
// Copyright 2011 Wolfson Microelectronics plc
* Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
//
*
// Author: Dimitris Papastamos <dp@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.
*/
#include <linux/device.h>
#include <linux/device.h>
#include <linux/lzo.h>
#include <linux/lzo.h>
...
...
drivers/base/regmap/regcache-rbtree.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register cache access API - rbtree caching support
//
*
// Register cache access API - rbtree caching support
* Copyright 2011 Wolfson Microelectronics plc
//
*
// Copyright 2011 Wolfson Microelectronics plc
* Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
//
*
// Author: Dimitris Papastamos <dp@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.
*/
#include <linux/debugfs.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/device.h>
...
...
drivers/base/regmap/regcache.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register cache access API
//
*
// Register cache access API
* Copyright 2011 Wolfson Microelectronics plc
//
*
// Copyright 2011 Wolfson Microelectronics plc
* Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
//
*
// Author: Dimitris Papastamos <dp@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.
*/
#include <linux/bsearch.h>
#include <linux/bsearch.h>
#include <linux/device.h>
#include <linux/device.h>
...
...
drivers/base/regmap/regmap-ac97.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register map access API - AC'97 support
//
*
// Register map access API - AC'97 support
* Copyright 2013 Linaro Ltd. All rights reserved.
//
*
// Copyright 2013 Linaro Ltd. All rights reserved.
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/err.h>
...
...
drivers/base/regmap/regmap-debugfs.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register map access API - debugfs
//
*
// Register map access API - debugfs
* Copyright 2011 Wolfson Microelectronics plc
//
*
// Copyright 2011 Wolfson Microelectronics plc
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
//
*
// 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.
*/
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/mutex.h>
...
@@ -195,6 +191,28 @@ static inline void regmap_calc_tot_len(struct regmap *map,
...
@@ -195,6 +191,28 @@ static inline void regmap_calc_tot_len(struct regmap *map,
}
}
}
}
static
int
regmap_next_readable_reg
(
struct
regmap
*
map
,
int
reg
)
{
struct
regmap_debugfs_off_cache
*
c
;
int
ret
=
-
EINVAL
;
if
(
regmap_printable
(
map
,
reg
+
map
->
reg_stride
))
{
ret
=
reg
+
map
->
reg_stride
;
}
else
{
mutex_lock
(
&
map
->
cache_lock
);
list_for_each_entry
(
c
,
&
map
->
debugfs_off_cache
,
list
)
{
if
(
reg
>
c
->
max_reg
)
continue
;
if
(
reg
<
c
->
base_reg
)
{
ret
=
c
->
base_reg
;
break
;
}
}
mutex_unlock
(
&
map
->
cache_lock
);
}
return
ret
;
}
static
ssize_t
regmap_read_debugfs
(
struct
regmap
*
map
,
unsigned
int
from
,
static
ssize_t
regmap_read_debugfs
(
struct
regmap
*
map
,
unsigned
int
from
,
unsigned
int
to
,
char
__user
*
user_buf
,
unsigned
int
to
,
char
__user
*
user_buf
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
...
@@ -218,12 +236,8 @@ static ssize_t regmap_read_debugfs(struct regmap *map, unsigned int from,
...
@@ -218,12 +236,8 @@ static ssize_t regmap_read_debugfs(struct regmap *map, unsigned int from,
/* Work out which register we're starting at */
/* Work out which register we're starting at */
start_reg
=
regmap_debugfs_get_dump_start
(
map
,
from
,
*
ppos
,
&
p
);
start_reg
=
regmap_debugfs_get_dump_start
(
map
,
from
,
*
ppos
,
&
p
);
for
(
i
=
start_reg
;
i
<=
to
;
i
+=
map
->
reg_stride
)
{
for
(
i
=
start_reg
;
i
>=
0
&&
i
<=
to
;
if
(
!
regmap_readable
(
map
,
i
)
&&
!
regmap_cached
(
map
,
i
))
i
=
regmap_next_readable_reg
(
map
,
i
))
{
continue
;
if
(
regmap_precious
(
map
,
i
))
continue
;
/* If we're in the region the user is trying to read */
/* If we're in the region the user is trying to read */
if
(
p
>=
*
ppos
)
{
if
(
p
>=
*
ppos
)
{
...
...
drivers/base/regmap/regmap-i2c.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register map access API - I2C support
//
*
// Register map access API - I2C support
* Copyright 2011 Wolfson Microelectronics plc
//
*
// Copyright 2011 Wolfson Microelectronics plc
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
//
*
// 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.
*/
#include <linux/regmap.h>
#include <linux/regmap.h>
#include <linux/i2c.h>
#include <linux/i2c.h>
...
...
drivers/base/regmap/regmap-irq.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* regmap based irq_chip
//
*
// regmap based irq_chip
* Copyright 2011 Wolfson Microelectronics plc
//
*
// Copyright 2011 Wolfson Microelectronics plc
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
//
*
// 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.
*/
#include <linux/device.h>
#include <linux/device.h>
#include <linux/export.h>
#include <linux/export.h>
...
...
drivers/base/regmap/regmap-mmio.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register map access API - MMIO support
//
*
// Register map access API - MMIO support
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
//
*
// Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/err.h>
...
...
drivers/base/regmap/regmap-spi.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register map access API - SPI support
//
*
// Register map access API - SPI support
* Copyright 2011 Wolfson Microelectronics plc
//
*
// Copyright 2011 Wolfson Microelectronics plc
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
//
*
// 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.
*/
#include <linux/regmap.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi.h>
...
...
drivers/base/regmap/regmap-spmi.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register map access API - SPMI support
//
*
// Register map access API - SPMI support
* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
//
*
// Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
* Based on regmap-i2c.c:
//
* Copyright 2011 Wolfson Microelectronics plc
// Based on regmap-i2c.c:
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
// 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 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include <linux/regmap.h>
#include <linux/regmap.h>
#include <linux/spmi.h>
#include <linux/spmi.h>
#include <linux/module.h>
#include <linux/module.h>
...
...
drivers/base/regmap/regmap-w1.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register map access API - W1 (1-Wire) support
//
*
// Register map access API - W1 (1-Wire) support
* Copyright (c) 2017 Radioavionica Corporation
//
* Author: Alex A. Mihaylov <minimumlaw@rambler.ru>
// Copyright (c) 2017 Radioavionica Corporation
*
// Author: Alex A. Mihaylov <minimumlaw@rambler.ru>
* 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
*/
#include <linux/regmap.h>
#include <linux/regmap.h>
#include <linux/module.h>
#include <linux/module.h>
...
...
drivers/base/regmap/regmap.c
View file @
615c4d9a
/*
// SPDX-License-Identifier: GPL-2.0
* Register map access API
//
*
// Register map access API
* Copyright 2011 Wolfson Microelectronics plc
//
*
// Copyright 2011 Wolfson Microelectronics plc
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
//
*
// 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.
*/
#include <linux/device.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/slab.h>
...
@@ -1493,11 +1489,10 @@ static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,
...
@@ -1493,11 +1489,10 @@ static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,
WARN_ON
(
!
map
->
bus
);
WARN_ON
(
!
map
->
bus
);
/* Check for unwritable registers before we start */
/* Check for unwritable registers before we start */
if
(
map
->
writeable_reg
)
for
(
i
=
0
;
i
<
val_len
/
map
->
format
.
val_bytes
;
i
++
)
for
(
i
=
0
;
i
<
val_len
/
map
->
format
.
val_bytes
;
i
++
)
if
(
!
regmap_writeable
(
map
,
if
(
!
map
->
writeable_reg
(
map
->
dev
,
reg
+
regmap_get_offset
(
map
,
i
)))
reg
+
regmap_get_offset
(
map
,
i
)))
return
-
EINVAL
;
return
-
EINVAL
;
if
(
!
map
->
cache_bypass
&&
map
->
format
.
parse_val
)
{
if
(
!
map
->
cache_bypass
&&
map
->
format
.
parse_val
)
{
unsigned
int
ival
;
unsigned
int
ival
;
...
...
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