Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a63b8783
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
163
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a63b8783
编写于
10年前
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branches 'regmap/topic/ac97' and 'regmap/topic/headers' into regmap-next
上级
c6efe576
22853223
e39be3a3
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
134 addition
and
9 deletion
+134
-9
drivers/base/regmap/Kconfig
drivers/base/regmap/Kconfig
+4
-1
drivers/base/regmap/Makefile
drivers/base/regmap/Makefile
+1
-0
drivers/base/regmap/regcache-flat.c
drivers/base/regmap/regcache-flat.c
+1
-1
drivers/base/regmap/regcache-lzo.c
drivers/base/regmap/regcache-lzo.c
+1
-1
drivers/base/regmap/regcache-rbtree.c
drivers/base/regmap/regcache-rbtree.c
+2
-2
drivers/base/regmap/regcache.c
drivers/base/regmap/regcache.c
+4
-4
drivers/base/regmap/regmap-ac97.c
drivers/base/regmap/regmap-ac97.c
+114
-0
include/linux/regmap.h
include/linux/regmap.h
+7
-0
未找到文件。
drivers/base/regmap/Kconfig
浏览文件 @
a63b8783
...
...
@@ -3,12 +3,15 @@
# subsystems should select the appropriate symbols.
config REGMAP
default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_MMIO || REGMAP_IRQ)
default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_
AC97 || REGMAP_
MMIO || REGMAP_IRQ)
select LZO_COMPRESS
select LZO_DECOMPRESS
select IRQ_DOMAIN if REGMAP_IRQ
bool
config REGMAP_AC97
tristate
config REGMAP_I2C
tristate
depends on I2C
...
...
This diff is collapsed.
Click to expand it.
drivers/base/regmap/Makefile
浏览文件 @
a63b8783
obj-$(CONFIG_REGMAP)
+=
regmap.o regcache.o
obj-$(CONFIG_REGMAP)
+=
regcache-rbtree.o regcache-lzo.o regcache-flat.o
obj-$(CONFIG_DEBUG_FS)
+=
regmap-debugfs.o
obj-$(CONFIG_REGMAP_AC97)
+=
regmap-ac97.o
obj-$(CONFIG_REGMAP_I2C)
+=
regmap-i2c.o
obj-$(CONFIG_REGMAP_SPI)
+=
regmap-spi.o
obj-$(CONFIG_REGMAP_SPMI)
+=
regmap-spmi.o
...
...
This diff is collapsed.
Click to expand it.
drivers/base/regmap/regcache-flat.c
浏览文件 @
a63b8783
...
...
@@ -10,9 +10,9 @@
* published by the Free Software Foundation.
*/
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include "internal.h"
...
...
This diff is collapsed.
Click to expand it.
drivers/base/regmap/regcache-lzo.c
浏览文件 @
a63b8783
...
...
@@ -10,9 +10,9 @@
* published by the Free Software Foundation.
*/
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/lzo.h>
#include <linux/slab.h>
#include "internal.h"
...
...
This diff is collapsed.
Click to expand it.
drivers/base/regmap/regcache-rbtree.c
浏览文件 @
a63b8783
...
...
@@ -10,11 +10,11 @@
* published by the Free Software Foundation.
*/
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/rbtree.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include "internal.h"
...
...
This diff is collapsed.
Click to expand it.
drivers/base/regmap/regcache.c
浏览文件 @
a63b8783
...
...
@@ -10,12 +10,12 @@
* published by the Free Software Foundation.
*/
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/device.h>
#include <trace/events/regmap.h>
#include <linux/bsearch.h>
#include <linux/device.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/sort.h>
#include <trace/events/regmap.h>
#include "internal.h"
...
...
This diff is collapsed.
Click to expand it.
drivers/base/regmap/regmap-ac97.c
0 → 100644
浏览文件 @
a63b8783
/*
* Register map access API - AC'97 support
*
* 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/err.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/ac97_codec.h>
bool
regmap_ac97_default_volatile
(
struct
device
*
dev
,
unsigned
int
reg
)
{
switch
(
reg
)
{
case
AC97_RESET
:
case
AC97_POWERDOWN
:
case
AC97_INT_PAGING
:
case
AC97_EXTENDED_ID
:
case
AC97_EXTENDED_STATUS
:
case
AC97_EXTENDED_MID
:
case
AC97_EXTENDED_MSTATUS
:
case
AC97_GPIO_STATUS
:
case
AC97_MISC_AFE
:
case
AC97_VENDOR_ID1
:
case
AC97_VENDOR_ID2
:
case
AC97_CODEC_CLASS_REV
:
case
AC97_PCI_SVID
:
case
AC97_PCI_SID
:
case
AC97_FUNC_SELECT
:
case
AC97_FUNC_INFO
:
case
AC97_SENSE_INFO
:
return
true
;
default:
return
false
;
}
}
EXPORT_SYMBOL_GPL
(
regmap_ac97_default_volatile
);
static
int
regmap_ac97_reg_read
(
void
*
context
,
unsigned
int
reg
,
unsigned
int
*
val
)
{
struct
snd_ac97
*
ac97
=
context
;
*
val
=
ac97
->
bus
->
ops
->
read
(
ac97
,
reg
);
return
0
;
}
static
int
regmap_ac97_reg_write
(
void
*
context
,
unsigned
int
reg
,
unsigned
int
val
)
{
struct
snd_ac97
*
ac97
=
context
;
ac97
->
bus
->
ops
->
write
(
ac97
,
reg
,
val
);
return
0
;
}
static
const
struct
regmap_bus
ac97_regmap_bus
=
{
.
reg_write
=
regmap_ac97_reg_write
,
.
reg_read
=
regmap_ac97_reg_read
,
};
/**
* regmap_init_ac97(): Initialise AC'97 register map
*
* @ac97: Device that will be interacted with
* @config: Configuration for register map
*
* The return value will be an ERR_PTR() on error or a valid pointer to
* a struct regmap.
*/
struct
regmap
*
regmap_init_ac97
(
struct
snd_ac97
*
ac97
,
const
struct
regmap_config
*
config
)
{
return
regmap_init
(
&
ac97
->
dev
,
&
ac97_regmap_bus
,
ac97
,
config
);
}
EXPORT_SYMBOL_GPL
(
regmap_init_ac97
);
/**
* devm_regmap_init_ac97(): Initialise AC'97 register map
*
* @ac97: Device that will be interacted with
* @config: Configuration for register map
*
* The return value will be an ERR_PTR() on error or a valid pointer
* to a struct regmap. The regmap will be automatically freed by the
* device management code.
*/
struct
regmap
*
devm_regmap_init_ac97
(
struct
snd_ac97
*
ac97
,
const
struct
regmap_config
*
config
)
{
return
devm_regmap_init
(
&
ac97
->
dev
,
&
ac97_regmap_bus
,
ac97
,
config
);
}
EXPORT_SYMBOL_GPL
(
devm_regmap_init_ac97
);
MODULE_LICENSE
(
"GPL v2"
);
This diff is collapsed.
Click to expand it.
include/linux/regmap.h
浏览文件 @
a63b8783
...
...
@@ -27,6 +27,7 @@ struct spmi_device;
struct
regmap
;
struct
regmap_range_cfg
;
struct
regmap_field
;
struct
snd_ac97
;
/* An enum of all the supported cache types */
enum
regcache_type
{
...
...
@@ -340,6 +341,8 @@ struct regmap *regmap_init_spmi_ext(struct spmi_device *dev,
struct
regmap
*
regmap_init_mmio_clk
(
struct
device
*
dev
,
const
char
*
clk_id
,
void
__iomem
*
regs
,
const
struct
regmap_config
*
config
);
struct
regmap
*
regmap_init_ac97
(
struct
snd_ac97
*
ac97
,
const
struct
regmap_config
*
config
);
struct
regmap
*
devm_regmap_init
(
struct
device
*
dev
,
const
struct
regmap_bus
*
bus
,
...
...
@@ -356,6 +359,10 @@ struct regmap *devm_regmap_init_spmi_ext(struct spmi_device *dev,
struct
regmap
*
devm_regmap_init_mmio_clk
(
struct
device
*
dev
,
const
char
*
clk_id
,
void
__iomem
*
regs
,
const
struct
regmap_config
*
config
);
struct
regmap
*
devm_regmap_init_ac97
(
struct
snd_ac97
*
ac97
,
const
struct
regmap_config
*
config
);
bool
regmap_ac97_default_volatile
(
struct
device
*
dev
,
unsigned
int
reg
);
/**
* regmap_init_mmio(): Initialise register map
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部