Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
828fa1e6
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
828fa1e6
编写于
8月 21, 2013
作者:
S
Samuel Ortiz
浏览文件
操作
浏览文件
下载
差异文件
Merge tag 'mfd-lee-3.12-1' of
git://git.linaro.org/people/ljones/mfd
Signed-off-by:
N
Samuel Ortiz
<
sameo@linux.intel.com
>
上级
09fd8678
8a105ca2
变更
71
隐藏空白更改
内联
并排
Showing
71 changed file
with
235 addition
and
153 deletion
+235
-153
Documentation/devicetree/bindings/mfd/s2mps11.txt
Documentation/devicetree/bindings/mfd/s2mps11.txt
+20
-0
Documentation/devicetree/bindings/regulator/palmas-pmic.txt
Documentation/devicetree/bindings/regulator/palmas-pmic.txt
+5
-0
drivers/mfd/88pm800.c
drivers/mfd/88pm800.c
+1
-1
drivers/mfd/88pm805.c
drivers/mfd/88pm805.c
+1
-1
drivers/mfd/88pm860x-core.c
drivers/mfd/88pm860x-core.c
+1
-1
drivers/mfd/aat2870-core.c
drivers/mfd/aat2870-core.c
+1
-1
drivers/mfd/ab3100-core.c
drivers/mfd/ab3100-core.c
+1
-1
drivers/mfd/ab8500-gpadc.c
drivers/mfd/ab8500-gpadc.c
+4
-0
drivers/mfd/adp5520.c
drivers/mfd/adp5520.c
+1
-1
drivers/mfd/arizona-core.c
drivers/mfd/arizona-core.c
+1
-1
drivers/mfd/as3711.c
drivers/mfd/as3711.c
+1
-1
drivers/mfd/asic3.c
drivers/mfd/asic3.c
+1
-1
drivers/mfd/da903x.c
drivers/mfd/da903x.c
+1
-1
drivers/mfd/da9052-core.c
drivers/mfd/da9052-core.c
+1
-1
drivers/mfd/da9055-core.c
drivers/mfd/da9055-core.c
+1
-1
drivers/mfd/dm355evm_msp.c
drivers/mfd/dm355evm_msp.c
+2
-2
drivers/mfd/ezx-pcap.c
drivers/mfd/ezx-pcap.c
+3
-3
drivers/mfd/htc-egpio.c
drivers/mfd/htc-egpio.c
+1
-1
drivers/mfd/htc-i2cpld.c
drivers/mfd/htc-i2cpld.c
+5
-5
drivers/mfd/htc-pasic3.c
drivers/mfd/htc-pasic3.c
+1
-1
drivers/mfd/intel_msic.c
drivers/mfd/intel_msic.c
+2
-2
drivers/mfd/kempld-core.c
drivers/mfd/kempld-core.c
+24
-6
drivers/mfd/lm3533-core.c
drivers/mfd/lm3533-core.c
+4
-4
drivers/mfd/lp8788.c
drivers/mfd/lp8788.c
+1
-1
drivers/mfd/lpc_ich.c
drivers/mfd/lpc_ich.c
+1
-1
drivers/mfd/max77686.c
drivers/mfd/max77686.c
+1
-1
drivers/mfd/max77693.c
drivers/mfd/max77693.c
+1
-1
drivers/mfd/max8925-i2c.c
drivers/mfd/max8925-i2c.c
+1
-1
drivers/mfd/max8997.c
drivers/mfd/max8997.c
+7
-11
drivers/mfd/max8998.c
drivers/mfd/max8998.c
+3
-4
drivers/mfd/mcp-sa11x0.c
drivers/mfd/mcp-sa11x0.c
+1
-1
drivers/mfd/menelaus.c
drivers/mfd/menelaus.c
+9
-13
drivers/mfd/mfd-core.c
drivers/mfd/mfd-core.c
+2
-0
drivers/mfd/omap-usb-host.c
drivers/mfd/omap-usb-host.c
+2
-2
drivers/mfd/palmas.c
drivers/mfd/palmas.c
+31
-2
drivers/mfd/pcf50633-adc.c
drivers/mfd/pcf50633-adc.c
+1
-2
drivers/mfd/pcf50633-core.c
drivers/mfd/pcf50633-core.c
+1
-1
drivers/mfd/pm8921-core.c
drivers/mfd/pm8921-core.c
+5
-9
drivers/mfd/rc5t583.c
drivers/mfd/rc5t583.c
+1
-1
drivers/mfd/sec-core.c
drivers/mfd/sec-core.c
+4
-2
drivers/mfd/si476x-i2c.c
drivers/mfd/si476x-i2c.c
+1
-1
drivers/mfd/sm501.c
drivers/mfd/sm501.c
+3
-3
drivers/mfd/sta2x11-mfd.c
drivers/mfd/sta2x11-mfd.c
+2
-2
drivers/mfd/stmpe.c
drivers/mfd/stmpe.c
+2
-1
drivers/mfd/t7l66xb.c
drivers/mfd/t7l66xb.c
+4
-4
drivers/mfd/tc3589x.c
drivers/mfd/tc3589x.c
+1
-1
drivers/mfd/tc6387xb.c
drivers/mfd/tc6387xb.c
+3
-3
drivers/mfd/tc6393xb.c
drivers/mfd/tc6393xb.c
+4
-4
drivers/mfd/ti-ssp.c
drivers/mfd/ti-ssp.c
+1
-1
drivers/mfd/ti_am335x_tscadc.c
drivers/mfd/ti_am335x_tscadc.c
+4
-4
drivers/mfd/tps6105x.c
drivers/mfd/tps6105x.c
+1
-1
drivers/mfd/tps65010.c
drivers/mfd/tps65010.c
+11
-13
drivers/mfd/tps65090.c
drivers/mfd/tps65090.c
+1
-1
drivers/mfd/tps6586x.c
drivers/mfd/tps6586x.c
+1
-1
drivers/mfd/tps65912-core.c
drivers/mfd/tps65912-core.c
+1
-1
drivers/mfd/tps80031.c
drivers/mfd/tps80031.c
+1
-1
drivers/mfd/twl-core.c
drivers/mfd/twl-core.c
+1
-1
drivers/mfd/twl4030-audio.c
drivers/mfd/twl4030-audio.c
+1
-1
drivers/mfd/twl4030-madc.c
drivers/mfd/twl4030-madc.c
+1
-1
drivers/mfd/twl4030-power.c
drivers/mfd/twl4030-power.c
+4
-4
drivers/mfd/ucb1400_core.c
drivers/mfd/ucb1400_core.c
+1
-1
drivers/mfd/ucb1x00-core.c
drivers/mfd/ucb1x00-core.c
+4
-2
drivers/mfd/wl1273-core.c
drivers/mfd/wl1273-core.c
+2
-6
drivers/mfd/wm5110-tables.c
drivers/mfd/wm5110-tables.c
+18
-0
drivers/mfd/wm831x-core.c
drivers/mfd/wm831x-core.c
+1
-1
drivers/mfd/wm831x-irq.c
drivers/mfd/wm831x-irq.c
+1
-1
drivers/mfd/wm831x-spi.c
drivers/mfd/wm831x-spi.c
+0
-1
drivers/mfd/wm8350-i2c.c
drivers/mfd/wm8350-i2c.c
+2
-1
drivers/mfd/wm8400-core.c
drivers/mfd/wm8400-core.c
+1
-1
drivers/mfd/wm8994-irq.c
drivers/mfd/wm8994-irq.c
+1
-1
include/linux/mfd/palmas.h
include/linux/mfd/palmas.h
+1
-0
未找到文件。
Documentation/devicetree/bindings/mfd/s2mps11.txt
浏览文件 @
828fa1e6
...
...
@@ -16,6 +16,21 @@ Optional properties:
- interrupts: Interrupt specifiers for interrupt sources.
Optional nodes:
- clocks: s2mps11 provides three(AP/CP/BT) buffered 32.768 KHz outputs, so to
register these as clocks with common clock framework instantiate a sub-node
named "clocks". It uses the common clock binding documented in :
[Documentation/devicetree/bindings/clock/clock-bindings.txt]
- #clock-cells: should be 1.
- The following is the list of clocks generated by the controller. Each clock
is assigned an identifier and client nodes use this identifier to specify
the clock which they consume.
Clock ID
----------------------
32KhzAP 0
32KhzCP 1
32KhzBT 2
- regulators: The regulators of s2mps11 that have to be instantiated should be
included in a sub-node named 'regulators'. Regulator nodes included in this
sub-node should be of the format as listed below.
...
...
@@ -55,6 +70,11 @@ Example:
compatible = "samsung,s2mps11-pmic";
reg = <0x66>;
s2m_osc: clocks{
#clock-cells = 1;
clock-output-names = "xx", "yy", "zz";
};
regulators {
ldo1_reg: LDO1 {
regulator-name = "VDD_ABB_3.3V";
...
...
Documentation/devicetree/bindings/regulator/palmas-pmic.txt
浏览文件 @
828fa1e6
...
...
@@ -37,6 +37,9 @@ Optional nodes:
ti,smps-range - OTP has the wrong range set for the hardware so override
0 - low range, 1 - high range.
- ti,system-power-controller: Telling whether or not this pmic is controlling
the system power.
Example:
#include <dt-bindings/interrupt-controller/irq.h>
...
...
@@ -49,6 +52,8 @@ pmic {
ti,ldo6-vibrator;
ti,system-power-controller;
regulators {
smps12_reg : smps12 {
regulator-name = "smps12";
...
...
drivers/mfd/88pm800.c
浏览文件 @
828fa1e6
...
...
@@ -541,7 +541,7 @@ static int pm800_probe(struct i2c_client *client,
{
int
ret
=
0
;
struct
pm80x_chip
*
chip
;
struct
pm80x_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
pm80x_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
pm80x_subchip
*
subchip
;
ret
=
pm80x_init
(
client
);
...
...
drivers/mfd/88pm805.c
浏览文件 @
828fa1e6
...
...
@@ -227,7 +227,7 @@ static int pm805_probe(struct i2c_client *client,
{
int
ret
=
0
;
struct
pm80x_chip
*
chip
;
struct
pm80x_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
pm80x_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
ret
=
pm80x_init
(
client
);
if
(
ret
)
{
...
...
drivers/mfd/88pm860x-core.c
浏览文件 @
828fa1e6
...
...
@@ -1130,7 +1130,7 @@ static int pm860x_dt_init(struct device_node *np,
static
int
pm860x_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
pm860x_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
pm860x_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
device_node
*
node
=
client
->
dev
.
of_node
;
struct
pm860x_chip
*
chip
;
int
ret
;
...
...
drivers/mfd/aat2870-core.c
浏览文件 @
828fa1e6
...
...
@@ -363,7 +363,7 @@ static inline void aat2870_uninit_debugfs(struct aat2870_data *aat2870)
static
int
aat2870_i2c_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
aat2870_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
aat2870_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
aat2870_data
*
aat2870
;
int
i
,
j
;
int
ret
=
0
;
...
...
drivers/mfd/ab3100-core.c
浏览文件 @
828fa1e6
...
...
@@ -854,7 +854,7 @@ static int ab3100_probe(struct i2c_client *client,
{
struct
ab3100
*
ab3100
;
struct
ab3100_platform_data
*
ab3100_plf_data
=
client
->
dev
.
platform_data
;
dev_get_platdata
(
&
client
->
dev
)
;
int
err
;
int
i
;
...
...
drivers/mfd/ab8500-gpadc.c
浏览文件 @
828fa1e6
...
...
@@ -867,6 +867,7 @@ static void ab8500_gpadc_read_calibration_data(struct ab8500_gpadc *gpadc)
gpadc
->
cal_data
[
ADC_INPUT_VBAT
].
offset
);
}
#ifdef CONFIG_PM_RUNTIME
static
int
ab8500_gpadc_runtime_suspend
(
struct
device
*
dev
)
{
struct
ab8500_gpadc
*
gpadc
=
dev_get_drvdata
(
dev
);
...
...
@@ -885,7 +886,9 @@ static int ab8500_gpadc_runtime_resume(struct device *dev)
dev_err
(
dev
,
"Failed to enable vtvout LDO: %d
\n
"
,
ret
);
return
ret
;
}
#endif
#ifdef CONFIG_PM_SLEEP
static
int
ab8500_gpadc_suspend
(
struct
device
*
dev
)
{
struct
ab8500_gpadc
*
gpadc
=
dev_get_drvdata
(
dev
);
...
...
@@ -913,6 +916,7 @@ static int ab8500_gpadc_resume(struct device *dev)
mutex_unlock
(
&
gpadc
->
ab8500_gpadc_lock
);
return
ret
;
}
#endif
static
int
ab8500_gpadc_probe
(
struct
platform_device
*
pdev
)
{
...
...
drivers/mfd/adp5520.c
浏览文件 @
828fa1e6
...
...
@@ -207,7 +207,7 @@ static int adp5520_remove_subdevs(struct adp5520_chip *chip)
static
int
adp5520_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
adp5520_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
adp5520_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
platform_device
*
pdev
;
struct
adp5520_chip
*
chip
;
int
ret
;
...
...
drivers/mfd/arizona-core.c
浏览文件 @
828fa1e6
...
...
@@ -438,9 +438,9 @@ static int arizona_runtime_suspend(struct device *dev)
}
}
regulator_disable
(
arizona
->
dcvdd
);
regcache_cache_only
(
arizona
->
regmap
,
true
);
regcache_mark_dirty
(
arizona
->
regmap
);
regulator_disable
(
arizona
->
dcvdd
);
return
0
;
}
...
...
drivers/mfd/as3711.c
浏览文件 @
828fa1e6
...
...
@@ -129,7 +129,7 @@ static int as3711_i2c_probe(struct i2c_client *client,
int
ret
;
if
(
!
client
->
dev
.
of_node
)
{
pdata
=
client
->
dev
.
platform_data
;
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
!
pdata
)
dev_dbg
(
&
client
->
dev
,
"Platform data not found
\n
"
);
}
else
{
...
...
drivers/mfd/asic3.c
浏览文件 @
828fa1e6
...
...
@@ -952,7 +952,7 @@ static void asic3_mfd_remove(struct platform_device *pdev)
/* Core */
static
int
__init
asic3_probe
(
struct
platform_device
*
pdev
)
{
struct
asic3_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
asic3_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
asic3
*
asic
;
struct
resource
*
mem
;
unsigned
long
clksel
;
...
...
drivers/mfd/da903x.c
浏览文件 @
828fa1e6
...
...
@@ -494,7 +494,7 @@ static int da903x_add_subdevs(struct da903x_chip *chip,
static
int
da903x_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
da903x_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
da903x_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
da903x_chip
*
chip
;
unsigned
int
tmp
;
int
ret
;
...
...
drivers/mfd/da9052-core.c
浏览文件 @
828fa1e6
...
...
@@ -534,7 +534,7 @@ EXPORT_SYMBOL_GPL(da9052_regmap_config);
int
da9052_device_init
(
struct
da9052
*
da9052
,
u8
chip_id
)
{
struct
da9052_pdata
*
pdata
=
d
a9052
->
dev
->
platform_data
;
struct
da9052_pdata
*
pdata
=
d
ev_get_platdata
(
da9052
->
dev
)
;
int
ret
;
mutex_init
(
&
da9052
->
auxadc_lock
);
...
...
drivers/mfd/da9055-core.c
浏览文件 @
828fa1e6
...
...
@@ -379,7 +379,7 @@ static struct regmap_irq_chip da9055_regmap_irq_chip = {
int
da9055_device_init
(
struct
da9055
*
da9055
)
{
struct
da9055_pdata
*
pdata
=
d
a9055
->
dev
->
platform_data
;
struct
da9055_pdata
*
pdata
=
d
ev_get_platdata
(
da9055
->
dev
)
;
int
ret
;
uint8_t
clear_events
[
3
]
=
{
0xFF
,
0xFF
,
0xFF
};
...
...
drivers/mfd/dm355evm_msp.c
浏览文件 @
828fa1e6
...
...
@@ -315,8 +315,8 @@ static int add_children(struct i2c_client *client)
}
/* MMC/SD inputs -- right after the last config input */
if
(
client
->
dev
.
platform_data
)
{
void
(
*
mmcsd_setup
)(
unsigned
)
=
client
->
dev
.
platform_data
;
if
(
dev_get_platdata
(
&
client
->
dev
)
)
{
void
(
*
mmcsd_setup
)(
unsigned
)
=
dev_get_platdata
(
&
client
->
dev
)
;
mmcsd_setup
(
dm355evm_msp_gpio
.
base
+
8
+
5
);
}
...
...
drivers/mfd/ezx-pcap.c
浏览文件 @
828fa1e6
...
...
@@ -177,7 +177,7 @@ static void pcap_msr_work(struct work_struct *work)
static
void
pcap_isr_work
(
struct
work_struct
*
work
)
{
struct
pcap_chip
*
pcap
=
container_of
(
work
,
struct
pcap_chip
,
isr_work
);
struct
pcap_platform_data
*
pdata
=
pcap
->
spi
->
dev
.
platform_data
;
struct
pcap_platform_data
*
pdata
=
dev_get_platdata
(
&
pcap
->
spi
->
dev
)
;
u32
msr
,
isr
,
int_sel
,
service
;
int
irq
;
...
...
@@ -394,7 +394,7 @@ static int pcap_add_subdev(struct pcap_chip *pcap,
static
int
ezx_pcap_remove
(
struct
spi_device
*
spi
)
{
struct
pcap_chip
*
pcap
=
spi_get_drvdata
(
spi
);
struct
pcap_platform_data
*
pdata
=
spi
->
dev
.
platform_data
;
struct
pcap_platform_data
*
pdata
=
dev_get_platdata
(
&
spi
->
dev
)
;
int
i
,
adc_irq
;
/* remove all registered subdevs */
...
...
@@ -420,7 +420,7 @@ static int ezx_pcap_remove(struct spi_device *spi)
static
int
ezx_pcap_probe
(
struct
spi_device
*
spi
)
{
struct
pcap_platform_data
*
pdata
=
spi
->
dev
.
platform_data
;
struct
pcap_platform_data
*
pdata
=
dev_get_platdata
(
&
spi
->
dev
)
;
struct
pcap_chip
*
pcap
;
int
i
,
adc_irq
;
int
ret
=
-
ENODEV
;
...
...
drivers/mfd/htc-egpio.c
浏览文件 @
828fa1e6
...
...
@@ -261,7 +261,7 @@ static void egpio_write_cache(struct egpio_info *ei)
static
int
__init
egpio_probe
(
struct
platform_device
*
pdev
)
{
struct
htc_egpio_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
htc_egpio_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
resource
*
res
;
struct
egpio_info
*
ei
;
struct
gpio_chip
*
chip
;
...
...
drivers/mfd/htc-i2cpld.c
浏览文件 @
828fa1e6
...
...
@@ -340,7 +340,7 @@ static int htcpld_setup_chip_irq(
int
ret
=
0
;
/* Get the platform and driver data */
pdata
=
dev
->
platform_data
;
pdata
=
dev
_get_platdata
(
dev
)
;
htcpld
=
platform_get_drvdata
(
pdev
);
chip
=
&
htcpld
->
chip
[
chip_index
];
plat_chip_data
=
&
pdata
->
chip
[
chip_index
];
...
...
@@ -375,7 +375,7 @@ static int htcpld_register_chip_i2c(
struct
i2c_board_info
info
;
/* Get the platform and driver data */
pdata
=
dev
->
platform_data
;
pdata
=
dev
_get_platdata
(
dev
)
;
htcpld
=
platform_get_drvdata
(
pdev
);
chip
=
&
htcpld
->
chip
[
chip_index
];
plat_chip_data
=
&
pdata
->
chip
[
chip_index
];
...
...
@@ -447,7 +447,7 @@ static int htcpld_register_chip_gpio(
int
ret
=
0
;
/* Get the platform and driver data */
pdata
=
dev
->
platform_data
;
pdata
=
dev
_get_platdata
(
dev
)
;
htcpld
=
platform_get_drvdata
(
pdev
);
chip
=
&
htcpld
->
chip
[
chip_index
];
plat_chip_data
=
&
pdata
->
chip
[
chip_index
];
...
...
@@ -509,7 +509,7 @@ static int htcpld_setup_chips(struct platform_device *pdev)
int
i
;
/* Get the platform and driver data */
pdata
=
dev
->
platform_data
;
pdata
=
dev
_get_platdata
(
dev
)
;
htcpld
=
platform_get_drvdata
(
pdev
);
/* Setup each chip's output GPIOs */
...
...
@@ -574,7 +574,7 @@ static int htcpld_core_probe(struct platform_device *pdev)
if
(
!
dev
)
return
-
ENODEV
;
pdata
=
dev
->
platform_data
;
pdata
=
dev
_get_platdata
(
dev
)
;
if
(
!
pdata
)
{
dev_warn
(
dev
,
"Platform data not found for htcpld core!
\n
"
);
return
-
ENXIO
;
...
...
drivers/mfd/htc-pasic3.c
浏览文件 @
828fa1e6
...
...
@@ -126,7 +126,7 @@ static struct mfd_cell ds1wm_cell __initdata = {
static
int
__init
pasic3_probe
(
struct
platform_device
*
pdev
)
{
struct
pasic3_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
pasic3_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
device
*
dev
=
&
pdev
->
dev
;
struct
pasic3_data
*
asic
;
struct
resource
*
r
;
...
...
drivers/mfd/intel_msic.c
浏览文件 @
828fa1e6
...
...
@@ -310,7 +310,7 @@ EXPORT_SYMBOL_GPL(intel_msic_irq_read);
static
int
intel_msic_init_devices
(
struct
intel_msic
*
msic
)
{
struct
platform_device
*
pdev
=
msic
->
pdev
;
struct
intel_msic_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
intel_msic_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
int
ret
,
i
;
if
(
pdata
->
gpio
)
{
...
...
@@ -372,7 +372,7 @@ static void intel_msic_remove_devices(struct intel_msic *msic)
static
int
intel_msic_probe
(
struct
platform_device
*
pdev
)
{
struct
intel_msic_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
intel_msic_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
intel_msic
*
msic
;
struct
resource
*
res
;
u8
id0
,
id1
;
...
...
drivers/mfd/kempld-core.c
浏览文件 @
828fa1e6
...
...
@@ -258,7 +258,7 @@ EXPORT_SYMBOL_GPL(kempld_write32);
*/
void
kempld_get_mutex
(
struct
kempld_device_data
*
pld
)
{
struct
kempld_platform_data
*
pdata
=
pld
->
dev
->
platform_data
;
struct
kempld_platform_data
*
pdata
=
dev_get_platdata
(
pld
->
dev
)
;
mutex_lock
(
&
pld
->
lock
);
pdata
->
get_hardware_mutex
(
pld
);
...
...
@@ -271,7 +271,7 @@ EXPORT_SYMBOL_GPL(kempld_get_mutex);
*/
void
kempld_release_mutex
(
struct
kempld_device_data
*
pld
)
{
struct
kempld_platform_data
*
pdata
=
pld
->
dev
->
platform_data
;
struct
kempld_platform_data
*
pdata
=
dev_get_platdata
(
pld
->
dev
)
;
pdata
->
release_hardware_mutex
(
pld
);
mutex_unlock
(
&
pld
->
lock
);
...
...
@@ -288,7 +288,7 @@ EXPORT_SYMBOL_GPL(kempld_release_mutex);
*/
static
int
kempld_get_info
(
struct
kempld_device_data
*
pld
)
{
struct
kempld_platform_data
*
pdata
=
pld
->
dev
->
platform_data
;
struct
kempld_platform_data
*
pdata
=
dev_get_platdata
(
pld
->
dev
)
;
return
pdata
->
get_info
(
pld
);
}
...
...
@@ -302,7 +302,7 @@ static int kempld_get_info(struct kempld_device_data *pld)
*/
static
int
kempld_register_cells
(
struct
kempld_device_data
*
pld
)
{
struct
kempld_platform_data
*
pdata
=
pld
->
dev
->
platform_data
;
struct
kempld_platform_data
*
pdata
=
dev_get_platdata
(
pld
->
dev
)
;
return
pdata
->
register_cells
(
pld
);
}
...
...
@@ -357,7 +357,7 @@ static int kempld_detect_device(struct kempld_device_data *pld)
static
int
kempld_probe
(
struct
platform_device
*
pdev
)
{
struct
kempld_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
kempld_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
device
*
dev
=
&
pdev
->
dev
;
struct
kempld_device_data
*
pld
;
struct
resource
*
ioport
;
...
...
@@ -394,7 +394,7 @@ static int kempld_probe(struct platform_device *pdev)
static
int
kempld_remove
(
struct
platform_device
*
pdev
)
{
struct
kempld_device_data
*
pld
=
platform_get_drvdata
(
pdev
);
struct
kempld_platform_data
*
pdata
=
pld
->
dev
->
platform_data
;
struct
kempld_platform_data
*
pdata
=
dev_get_platdata
(
pld
->
dev
)
;
mfd_remove_devices
(
&
pdev
->
dev
);
pdata
->
release_hardware_mutex
(
pld
);
...
...
@@ -412,6 +412,15 @@ static struct platform_driver kempld_driver = {
};
static
struct
dmi_system_id
__initdata
kempld_dmi_table
[]
=
{
{
.
ident
=
"BHL6"
,
.
matches
=
{
DMI_MATCH
(
DMI_BOARD_VENDOR
,
"Kontron"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"COMe-bHL6"
),
},
.
driver_data
=
(
void
*
)
&
kempld_platform_data_generic
,
.
callback
=
kempld_create_platform_device
,
},
{
.
ident
=
"CCR2"
,
.
matches
=
{
...
...
@@ -596,6 +605,15 @@ static struct dmi_system_id __initdata kempld_dmi_table[] = {
.
driver_data
=
(
void
*
)
&
kempld_platform_data_generic
,
.
callback
=
kempld_create_platform_device
,
},
{
.
ident
=
"UTH6"
,
.
matches
=
{
DMI_MATCH
(
DMI_BOARD_VENDOR
,
"Kontron"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"COMe-cTH6"
),
},
.
driver_data
=
(
void
*
)
&
kempld_platform_data_generic
,
.
callback
=
kempld_create_platform_device
,
},
{}
};
MODULE_DEVICE_TABLE
(
dmi
,
kempld_dmi_table
);
...
...
drivers/mfd/lm3533-core.c
浏览文件 @
828fa1e6
...
...
@@ -384,7 +384,7 @@ static struct attribute_group lm3533_attribute_group = {
static
int
lm3533_device_als_init
(
struct
lm3533
*
lm3533
)
{
struct
lm3533_platform_data
*
pdata
=
lm3533
->
dev
->
platform_data
;
struct
lm3533_platform_data
*
pdata
=
dev_get_platdata
(
lm3533
->
dev
)
;
int
ret
;
if
(
!
pdata
->
als
)
...
...
@@ -407,7 +407,7 @@ static int lm3533_device_als_init(struct lm3533 *lm3533)
static
int
lm3533_device_bl_init
(
struct
lm3533
*
lm3533
)
{
struct
lm3533_platform_data
*
pdata
=
lm3533
->
dev
->
platform_data
;
struct
lm3533_platform_data
*
pdata
=
dev_get_platdata
(
lm3533
->
dev
)
;
int
i
;
int
ret
;
...
...
@@ -436,7 +436,7 @@ static int lm3533_device_bl_init(struct lm3533 *lm3533)
static
int
lm3533_device_led_init
(
struct
lm3533
*
lm3533
)
{
struct
lm3533_platform_data
*
pdata
=
lm3533
->
dev
->
platform_data
;
struct
lm3533_platform_data
*
pdata
=
dev_get_platdata
(
lm3533
->
dev
)
;
int
i
;
int
ret
;
...
...
@@ -481,7 +481,7 @@ static int lm3533_device_setup(struct lm3533 *lm3533,
static
int
lm3533_device_init
(
struct
lm3533
*
lm3533
)
{
struct
lm3533_platform_data
*
pdata
=
lm3533
->
dev
->
platform_data
;
struct
lm3533_platform_data
*
pdata
=
dev_get_platdata
(
lm3533
->
dev
)
;
int
ret
;
dev_dbg
(
lm3533
->
dev
,
"%s
\n
"
,
__func__
);
...
...
drivers/mfd/lp8788.c
浏览文件 @
828fa1e6
...
...
@@ -173,7 +173,7 @@ static const struct regmap_config lp8788_regmap_config = {
static
int
lp8788_probe
(
struct
i2c_client
*
cl
,
const
struct
i2c_device_id
*
id
)
{
struct
lp8788
*
lp
;
struct
lp8788_platform_data
*
pdata
=
cl
->
dev
.
platform_data
;
struct
lp8788_platform_data
*
pdata
=
dev_get_platdata
(
&
cl
->
dev
)
;
int
ret
;
lp
=
devm_kzalloc
(
&
cl
->
dev
,
sizeof
(
struct
lp8788
),
GFP_KERNEL
);
...
...
drivers/mfd/lpc_ich.c
浏览文件 @
828fa1e6
...
...
@@ -213,7 +213,7 @@ enum lpc_chipsets {
LPC_COLETO
,
/* Coleto Creek */
};
struct
lpc_ich_info
lpc_chipset_info
[]
=
{
st
atic
st
ruct
lpc_ich_info
lpc_chipset_info
[]
=
{
[
LPC_ICH
]
=
{
.
name
=
"ICH"
,
.
iTCO_version
=
1
,
...
...
drivers/mfd/max77686.c
浏览文件 @
828fa1e6
...
...
@@ -77,7 +77,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
max77686_dev
*
max77686
=
NULL
;
struct
max77686_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
max77686_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
unsigned
int
data
;
int
ret
=
0
;
...
...
drivers/mfd/max77693.c
浏览文件 @
828fa1e6
...
...
@@ -110,7 +110,7 @@ static int max77693_i2c_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
max77693_dev
*
max77693
;
struct
max77693_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
max77693_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
u8
reg_data
;
int
ret
=
0
;
...
...
drivers/mfd/max8925-i2c.c
浏览文件 @
828fa1e6
...
...
@@ -151,7 +151,7 @@ static int max8925_dt_init(struct device_node *np, struct device *dev,
static
int
max8925_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
max8925_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
max8925_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
static
struct
max8925_chip
*
chip
;
struct
device_node
*
node
=
client
->
dev
.
of_node
;
...
...
drivers/mfd/max8997.c
浏览文件 @
828fa1e6
...
...
@@ -51,7 +51,7 @@ static struct mfd_cell max8997_devs[] = {
#ifdef CONFIG_OF
static
struct
of_device_id
max8997_pmic_dt_match
[]
=
{
{
.
compatible
=
"maxim,max8997-pmic"
,
.
data
=
TYPE_MAX8997
},
{
.
compatible
=
"maxim,max8997-pmic"
,
.
data
=
(
void
*
)
TYPE_MAX8997
},
{},
};
#endif
...
...
@@ -188,10 +188,11 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
max8997_dev
*
max8997
;
struct
max8997_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
max8997_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
int
ret
=
0
;
max8997
=
kzalloc
(
sizeof
(
struct
max8997_dev
),
GFP_KERNEL
);
max8997
=
devm_kzalloc
(
&
i2c
->
dev
,
sizeof
(
struct
max8997_dev
),
GFP_KERNEL
);
if
(
max8997
==
NULL
)
return
-
ENOMEM
;
...
...
@@ -203,14 +204,12 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
if
(
max8997
->
dev
->
of_node
)
{
pdata
=
max8997_i2c_parse_dt_pdata
(
max8997
->
dev
);
if
(
IS_ERR
(
pdata
))
{
ret
=
PTR_ERR
(
pdata
);
goto
err
;
}
if
(
IS_ERR
(
pdata
))
return
PTR_ERR
(
pdata
);
}
if
(
!
pdata
)
goto
err
;
return
ret
;
max8997
->
pdata
=
pdata
;
max8997
->
ono
=
pdata
->
ono
;
...
...
@@ -250,8 +249,6 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
i2c_unregister_device
(
max8997
->
muic
);
i2c_unregister_device
(
max8997
->
haptic
);
i2c_unregister_device
(
max8997
->
rtc
);
err:
kfree
(
max8997
);
return
ret
;
}
...
...
@@ -263,7 +260,6 @@ static int max8997_i2c_remove(struct i2c_client *i2c)
i2c_unregister_device
(
max8997
->
muic
);
i2c_unregister_device
(
max8997
->
haptic
);
i2c_unregister_device
(
max8997
->
rtc
);
kfree
(
max8997
);
return
0
;
}
...
...
drivers/mfd/max8998.c
浏览文件 @
828fa1e6
...
...
@@ -184,11 +184,12 @@ static inline int max8998_i2c_get_driver_data(struct i2c_client *i2c,
static
int
max8998_i2c_probe
(
struct
i2c_client
*
i2c
,
const
struct
i2c_device_id
*
id
)
{
struct
max8998_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
max8998_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
struct
max8998_dev
*
max8998
;
int
ret
=
0
;
max8998
=
kzalloc
(
sizeof
(
struct
max8998_dev
),
GFP_KERNEL
);
max8998
=
devm_kzalloc
(
&
i2c
->
dev
,
sizeof
(
struct
max8998_dev
),
GFP_KERNEL
);
if
(
max8998
==
NULL
)
return
-
ENOMEM
;
...
...
@@ -246,7 +247,6 @@ static int max8998_i2c_probe(struct i2c_client *i2c,
mfd_remove_devices
(
max8998
->
dev
);
max8998_irq_exit
(
max8998
);
i2c_unregister_device
(
max8998
->
rtc
);
kfree
(
max8998
);
return
ret
;
}
...
...
@@ -257,7 +257,6 @@ static int max8998_i2c_remove(struct i2c_client *i2c)
mfd_remove_devices
(
max8998
->
dev
);
max8998_irq_exit
(
max8998
);
i2c_unregister_device
(
max8998
->
rtc
);
kfree
(
max8998
);
return
0
;
}
...
...
drivers/mfd/mcp-sa11x0.c
浏览文件 @
828fa1e6
...
...
@@ -156,7 +156,7 @@ static struct mcp_ops mcp_sa11x0 = {
static
int
mcp_sa11x0_probe
(
struct
platform_device
*
dev
)
{
struct
mcp_plat_data
*
data
=
dev
->
dev
.
platform_data
;
struct
mcp_plat_data
*
data
=
dev
_get_platdata
(
&
dev
->
dev
)
;
struct
resource
*
mem0
,
*
mem1
;
struct
mcp_sa11x0
*
m
;
struct
mcp
*
mcp
;
...
...
drivers/mfd/menelaus.c
浏览文件 @
828fa1e6
...
...
@@ -442,7 +442,7 @@ void menelaus_unregister_mmc_callback(void)
menelaus_remove_irq_work
(
MENELAUS_MMC_S2D1_IRQ
);
the_menelaus
->
mmc_callback
=
NULL
;
the_menelaus
->
mmc_callback_data
=
0
;
the_menelaus
->
mmc_callback_data
=
NULL
;
}
EXPORT_SYMBOL
(
menelaus_unregister_mmc_callback
);
...
...
@@ -466,7 +466,7 @@ static int menelaus_set_voltage(const struct menelaus_vtg *vtg, int mV,
struct
i2c_client
*
c
=
the_menelaus
->
client
;
mutex_lock
(
&
the_menelaus
->
lock
);
if
(
vtg
==
0
)
if
(
!
vtg
)
goto
set_voltage
;
ret
=
menelaus_read_reg
(
vtg
->
vtg_reg
);
...
...
@@ -1189,7 +1189,7 @@ static int menelaus_probe(struct i2c_client *client,
int
rev
=
0
,
val
;
int
err
=
0
;
struct
menelaus_platform_data
*
menelaus_pdata
=
client
->
dev
.
platform_data
;
dev_get_platdata
(
&
client
->
dev
)
;
if
(
the_menelaus
)
{
dev_dbg
(
&
client
->
dev
,
"only one %s for now
\n
"
,
...
...
@@ -1197,7 +1197,7 @@ static int menelaus_probe(struct i2c_client *client,
return
-
ENODEV
;
}
menelaus
=
kzalloc
(
sizeof
*
menelaus
,
GFP_KERNEL
);
menelaus
=
devm_kzalloc
(
&
client
->
dev
,
sizeof
(
*
menelaus
)
,
GFP_KERNEL
);
if
(
!
menelaus
)
return
-
ENOMEM
;
...
...
@@ -1210,8 +1210,7 @@ static int menelaus_probe(struct i2c_client *client,
rev
=
menelaus_read_reg
(
MENELAUS_REV
);
if
(
rev
<
0
)
{
pr_err
(
DRIVER_NAME
": device not found"
);
err
=
-
ENODEV
;
goto
fail1
;
return
-
ENODEV
;
}
/* Ack and disable all Menelaus interrupts */
...
...
@@ -1231,7 +1230,7 @@ static int menelaus_probe(struct i2c_client *client,
if
(
err
)
{
dev_dbg
(
&
client
->
dev
,
"can't get IRQ %d, err %d
\n
"
,
client
->
irq
,
err
);
goto
fail1
;
return
err
;
}
}
...
...
@@ -1242,7 +1241,7 @@ static int menelaus_probe(struct i2c_client *client,
val
=
menelaus_read_reg
(
MENELAUS_VCORE_CTRL1
);
if
(
val
<
0
)
goto
fail
2
;
goto
fail
;
if
(
val
&
(
1
<<
7
))
menelaus
->
vcore_hw_mode
=
1
;
else
...
...
@@ -1251,17 +1250,15 @@ static int menelaus_probe(struct i2c_client *client,
if
(
menelaus_pdata
!=
NULL
&&
menelaus_pdata
->
late_init
!=
NULL
)
{
err
=
menelaus_pdata
->
late_init
(
&
client
->
dev
);
if
(
err
<
0
)
goto
fail
2
;
goto
fail
;
}
menelaus_rtc_init
(
menelaus
);
return
0
;
fail
2
:
fail:
free_irq
(
client
->
irq
,
menelaus
);
flush_work
(
&
menelaus
->
work
);
fail1:
kfree
(
menelaus
);
return
err
;
}
...
...
@@ -1271,7 +1268,6 @@ static int __exit menelaus_remove(struct i2c_client *client)
free_irq
(
client
->
irq
,
menelaus
);
flush_work
(
&
menelaus
->
work
);
kfree
(
menelaus
);
the_menelaus
=
NULL
;
return
0
;
}
...
...
drivers/mfd/mfd-core.c
浏览文件 @
828fa1e6
...
...
@@ -96,6 +96,8 @@ static int mfd_add_device(struct device *parent, int id,
pdev
->
dev
.
parent
=
parent
;
pdev
->
dev
.
type
=
&
mfd_dev_type
;
pdev
->
dev
.
dma_mask
=
parent
->
dma_mask
;
pdev
->
dev
.
dma_parms
=
parent
->
dma_parms
;
if
(
parent
->
of_node
&&
cell
->
of_compatible
)
{
for_each_child_of_node
(
parent
->
of_node
,
np
)
{
...
...
drivers/mfd/omap-usb-host.c
浏览文件 @
828fa1e6
...
...
@@ -232,7 +232,7 @@ static struct platform_device *omap_usbhs_alloc_child(const char *name,
static
int
omap_usbhs_alloc_children
(
struct
platform_device
*
pdev
)
{
struct
device
*
dev
=
&
pdev
->
dev
;
struct
usbhs_omap_platform_data
*
pdata
=
dev
->
platform_data
;
struct
usbhs_omap_platform_data
*
pdata
=
dev
_get_platdata
(
dev
)
;
struct
platform_device
*
ehci
;
struct
platform_device
*
ohci
;
struct
resource
*
res
;
...
...
@@ -571,7 +571,7 @@ static struct of_device_id usbhs_child_match_table[] = {
static
int
usbhs_omap_probe
(
struct
platform_device
*
pdev
)
{
struct
device
*
dev
=
&
pdev
->
dev
;
struct
usbhs_omap_platform_data
*
pdata
=
dev
->
platform_data
;
struct
usbhs_omap_platform_data
*
pdata
=
dev
_get_platdata
(
dev
)
;
struct
usbhs_hcd_omap
*
omap
;
struct
resource
*
res
;
int
ret
=
0
;
...
...
drivers/mfd/palmas.c
浏览文件 @
828fa1e6
...
...
@@ -326,6 +326,32 @@ static void palmas_dt_to_pdata(struct i2c_client *i2c,
PALMAS_POWER_CTRL_ENABLE2_MASK
;
if
(
i2c
->
irq
)
palmas_set_pdata_irq_flag
(
i2c
,
pdata
);
pdata
->
pm_off
=
of_property_read_bool
(
node
,
"ti,system-power-controller"
);
}
static
struct
palmas
*
palmas_dev
;
static
void
palmas_power_off
(
void
)
{
unsigned
int
addr
;
int
ret
,
slave
;
if
(
!
palmas_dev
)
return
;
slave
=
PALMAS_BASE_TO_SLAVE
(
PALMAS_PMU_CONTROL_BASE
);
addr
=
PALMAS_BASE_TO_REG
(
PALMAS_PMU_CONTROL_BASE
,
PALMAS_DEV_CTRL
);
ret
=
regmap_update_bits
(
palmas_dev
->
regmap
[
slave
],
addr
,
PALMAS_DEV_CTRL_DEV_ON
,
0
);
if
(
ret
)
pr_err
(
"%s: Unable to write to DEV_CTRL_DEV_ON: %d
\n
"
,
__func__
,
ret
);
}
static
unsigned
int
palmas_features
=
PALMAS_PMIC_FEATURE_SMPS10_BOOST
;
...
...
@@ -520,10 +546,13 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
*/
if
(
node
)
{
ret
=
of_platform_populate
(
node
,
NULL
,
NULL
,
&
i2c
->
dev
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
goto
err_irq
;
else
}
else
if
(
pdata
->
pm_off
&&
!
pm_power_off
)
{
palmas_dev
=
palmas
;
pm_power_off
=
palmas_power_off
;
return
ret
;
}
}
return
ret
;
...
...
drivers/mfd/pcf50633-adc.c
浏览文件 @
828fa1e6
...
...
@@ -203,7 +203,7 @@ static int pcf50633_adc_probe(struct platform_device *pdev)
{
struct
pcf50633_adc
*
adc
;
adc
=
kzalloc
(
sizeof
(
*
adc
),
GFP_KERNEL
);
adc
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
*
adc
),
GFP_KERNEL
);
if
(
!
adc
)
return
-
ENOMEM
;
...
...
@@ -236,7 +236,6 @@ static int pcf50633_adc_remove(struct platform_device *pdev)
kfree
(
adc
->
queue
[
i
]);
mutex_unlock
(
&
adc
->
queue_mutex
);
kfree
(
adc
);
return
0
;
}
...
...
drivers/mfd/pcf50633-core.c
浏览文件 @
828fa1e6
...
...
@@ -195,7 +195,7 @@ static int pcf50633_probe(struct i2c_client *client,
const
struct
i2c_device_id
*
ids
)
{
struct
pcf50633
*
pcf
;
struct
pcf50633_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
pcf50633_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
int
i
,
ret
;
int
version
,
variant
;
...
...
drivers/mfd/pm8921-core.c
浏览文件 @
828fa1e6
...
...
@@ -14,6 +14,7 @@
#define pr_fmt(fmt) "%s: " fmt, __func__
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/err.h>
...
...
@@ -106,7 +107,7 @@ static int pm8921_add_subdevices(const struct pm8921_platform_data
static
int
pm8921_probe
(
struct
platform_device
*
pdev
)
{
const
struct
pm8921_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
const
struct
pm8921_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
pm8921
*
pmic
;
int
rc
;
u8
val
;
...
...
@@ -117,7 +118,7 @@ static int pm8921_probe(struct platform_device *pdev)
return
-
EINVAL
;
}
pmic
=
kzalloc
(
sizeof
(
struct
pm8921
),
GFP_KERNEL
);
pmic
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
struct
pm8921
),
GFP_KERNEL
);
if
(
!
pmic
)
{
pr_err
(
"Cannot alloc pm8921 struct
\n
"
);
return
-
ENOMEM
;
...
...
@@ -127,7 +128,7 @@ static int pm8921_probe(struct platform_device *pdev)
rc
=
ssbi_read
(
pdev
->
dev
.
parent
,
REG_HWREV
,
&
val
,
sizeof
(
val
));
if
(
rc
)
{
pr_err
(
"Failed to read hw rev reg %d:rc=%d
\n
"
,
REG_HWREV
,
rc
);
goto
err_read_rev
;
return
rc
;
}
pr_info
(
"PMIC revision 1: %02X
\n
"
,
val
);
rev
=
val
;
...
...
@@ -137,7 +138,7 @@ static int pm8921_probe(struct platform_device *pdev)
if
(
rc
)
{
pr_err
(
"Failed to read hw rev 2 reg %d:rc=%d
\n
"
,
REG_HWREV_2
,
rc
);
goto
err_read_rev
;
return
rc
;
}
pr_info
(
"PMIC revision 2: %02X
\n
"
,
val
);
rev
|=
val
<<
BITS_PER_BYTE
;
...
...
@@ -159,9 +160,6 @@ static int pm8921_probe(struct platform_device *pdev)
err:
mfd_remove_devices
(
pmic
->
dev
);
platform_set_drvdata
(
pdev
,
NULL
);
err_read_rev:
kfree
(
pmic
);
return
rc
;
}
...
...
@@ -179,8 +177,6 @@ static int pm8921_remove(struct platform_device *pdev)
pm8xxx_irq_exit
(
pmic
->
irq_chip
);
pmic
->
irq_chip
=
NULL
;
}
platform_set_drvdata
(
pdev
,
NULL
);
kfree
(
pmic
);
return
0
;
}
...
...
drivers/mfd/rc5t583.c
浏览文件 @
828fa1e6
...
...
@@ -250,7 +250,7 @@ static int rc5t583_i2c_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
rc5t583
*
rc5t583
;
struct
rc5t583_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
rc5t583_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
int
ret
;
bool
irq_init_success
=
false
;
...
...
drivers/mfd/sec-core.c
浏览文件 @
828fa1e6
...
...
@@ -61,7 +61,9 @@ static struct mfd_cell s5m8767_devs[] = {
static
struct
mfd_cell
s2mps11_devs
[]
=
{
{
.
name
=
"s2mps11-pmic"
,
},
},
{
.
name
=
"s2mps11-clk"
,
}
};
#ifdef CONFIG_OF
...
...
@@ -216,7 +218,7 @@ static inline int sec_i2c_get_driver_data(struct i2c_client *i2c,
static
int
sec_pmic_probe
(
struct
i2c_client
*
i2c
,
const
struct
i2c_device_id
*
id
)
{
struct
sec_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
sec_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
const
struct
regmap_config
*
regmap
;
struct
sec_pmic_dev
*
sec_pmic
;
int
ret
;
...
...
drivers/mfd/si476x-i2c.c
浏览文件 @
828fa1e6
...
...
@@ -718,7 +718,7 @@ static int si476x_core_probe(struct i2c_client *client,
atomic_set
(
&
core
->
is_alive
,
0
);
core
->
power_state
=
SI476X_POWER_DOWN
;
pdata
=
client
->
dev
.
platform_data
;
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
pdata
)
{
memcpy
(
&
core
->
power_up_parameters
,
&
pdata
->
power_up_parameters
,
...
...
drivers/mfd/sm501.c
浏览文件 @
828fa1e6
...
...
@@ -840,7 +840,7 @@ static int sm501_register_uart(struct sm501_devdata *sm, int devices)
if
(
!
pdev
)
return
-
ENOMEM
;
uart_data
=
pdev
->
dev
.
platform_data
;
uart_data
=
dev_get_platdata
(
&
pdev
->
dev
)
;
if
(
devices
&
SM501_USE_UART0
)
{
sm501_setup_uart_data
(
sm
,
uart_data
++
,
0x30000
);
...
...
@@ -1167,7 +1167,7 @@ static int sm501_register_gpio_i2c_instance(struct sm501_devdata *sm,
if
(
!
pdev
)
return
-
ENOMEM
;
icd
=
pdev
->
dev
.
platform_data
;
icd
=
dev_get_platdata
(
&
pdev
->
dev
)
;
/* We keep the pin_sda and pin_scl fields relative in case the
* same platform data is passed to >1 SM501.
...
...
@@ -1403,7 +1403,7 @@ static int sm501_plat_probe(struct platform_device *dev)
sm
->
dev
=
&
dev
->
dev
;
sm
->
pdev_id
=
dev
->
id
;
sm
->
platdata
=
dev
->
dev
.
platform_data
;
sm
->
platdata
=
dev
_get_platdata
(
&
dev
->
dev
)
;
ret
=
platform_get_irq
(
dev
,
0
);
if
(
ret
<
0
)
{
...
...
drivers/mfd/sta2x11-mfd.c
浏览文件 @
828fa1e6
...
...
@@ -133,7 +133,7 @@ int sta2x11_mfd_get_regs_data(struct platform_device *dev,
void
__iomem
**
regs
,
spinlock_t
**
lock
)
{
struct
pci_dev
*
pdev
=
*
(
struct
pci_dev
**
)
(
dev
->
dev
.
platform_data
);
struct
pci_dev
*
pdev
=
*
(
struct
pci_dev
**
)
dev_get_platdata
(
&
dev
->
dev
);
struct
sta2x11_mfd
*
mfd
;
if
(
!
pdev
)
...
...
@@ -312,7 +312,7 @@ static int sta2x11_mfd_platform_probe(struct platform_device *dev,
const
char
*
name
=
sta2x11_mfd_names
[
index
];
struct
regmap_config
*
regmap_config
=
sta2x11_mfd_regmap_configs
[
index
];
pdev
=
dev
->
dev
.
platform_data
;
pdev
=
dev
_get_platdata
(
&
dev
->
dev
)
;
mfd
=
sta2x11_mfd_find
(
*
pdev
);
if
(
!
mfd
)
return
-
ENODEV
;
...
...
drivers/mfd/stmpe.c
浏览文件 @
828fa1e6
...
...
@@ -1106,7 +1106,8 @@ static int stmpe_devices_init(struct stmpe *stmpe)
return
ret
;
}
void
stmpe_of_probe
(
struct
stmpe_platform_data
*
pdata
,
struct
device_node
*
np
)
static
void
stmpe_of_probe
(
struct
stmpe_platform_data
*
pdata
,
struct
device_node
*
np
)
{
struct
device_node
*
child
;
...
...
drivers/mfd/t7l66xb.c
浏览文件 @
828fa1e6
...
...
@@ -281,7 +281,7 @@ static void t7l66xb_detach_irq(struct platform_device *dev)
static
int
t7l66xb_suspend
(
struct
platform_device
*
dev
,
pm_message_t
state
)
{
struct
t7l66xb
*
t7l66xb
=
platform_get_drvdata
(
dev
);
struct
t7l66xb_platform_data
*
pdata
=
dev
->
dev
.
platform_data
;
struct
t7l66xb_platform_data
*
pdata
=
dev
_get_platdata
(
&
dev
->
dev
)
;
if
(
pdata
&&
pdata
->
suspend
)
pdata
->
suspend
(
dev
);
...
...
@@ -293,7 +293,7 @@ static int t7l66xb_suspend(struct platform_device *dev, pm_message_t state)
static
int
t7l66xb_resume
(
struct
platform_device
*
dev
)
{
struct
t7l66xb
*
t7l66xb
=
platform_get_drvdata
(
dev
);
struct
t7l66xb_platform_data
*
pdata
=
dev
->
dev
.
platform_data
;
struct
t7l66xb_platform_data
*
pdata
=
dev
_get_platdata
(
&
dev
->
dev
)
;
clk_enable
(
t7l66xb
->
clk48m
);
if
(
pdata
&&
pdata
->
resume
)
...
...
@@ -313,7 +313,7 @@ static int t7l66xb_resume(struct platform_device *dev)
static
int
t7l66xb_probe
(
struct
platform_device
*
dev
)
{
struct
t7l66xb_platform_data
*
pdata
=
dev
->
dev
.
platform_data
;
struct
t7l66xb_platform_data
*
pdata
=
dev
_get_platdata
(
&
dev
->
dev
)
;
struct
t7l66xb
*
t7l66xb
;
struct
resource
*
iomem
,
*
rscr
;
int
ret
;
...
...
@@ -409,7 +409,7 @@ static int t7l66xb_probe(struct platform_device *dev)
static
int
t7l66xb_remove
(
struct
platform_device
*
dev
)
{
struct
t7l66xb_platform_data
*
pdata
=
dev
->
dev
.
platform_data
;
struct
t7l66xb_platform_data
*
pdata
=
dev
_get_platdata
(
&
dev
->
dev
)
;
struct
t7l66xb
*
t7l66xb
=
platform_get_drvdata
(
dev
);
int
ret
;
...
...
drivers/mfd/tc3589x.c
浏览文件 @
828fa1e6
...
...
@@ -325,7 +325,7 @@ static int tc3589x_of_probe(struct device_node *np,
static
int
tc3589x_probe
(
struct
i2c_client
*
i2c
,
const
struct
i2c_device_id
*
id
)
{
struct
tc3589x_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
tc3589x_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
struct
device_node
*
np
=
i2c
->
dev
.
of_node
;
struct
tc3589x
*
tc3589x
;
int
ret
;
...
...
drivers/mfd/tc6387xb.c
浏览文件 @
828fa1e6
...
...
@@ -48,7 +48,7 @@ static struct resource tc6387xb_mmc_resources[] = {
static
int
tc6387xb_suspend
(
struct
platform_device
*
dev
,
pm_message_t
state
)
{
struct
tc6387xb
*
tc6387xb
=
platform_get_drvdata
(
dev
);
struct
tc6387xb_platform_data
*
pdata
=
dev
->
dev
.
platform_data
;
struct
tc6387xb_platform_data
*
pdata
=
dev
_get_platdata
(
&
dev
->
dev
)
;
if
(
pdata
&&
pdata
->
suspend
)
pdata
->
suspend
(
dev
);
...
...
@@ -60,7 +60,7 @@ static int tc6387xb_suspend(struct platform_device *dev, pm_message_t state)
static
int
tc6387xb_resume
(
struct
platform_device
*
dev
)
{
struct
tc6387xb
*
tc6387xb
=
platform_get_drvdata
(
dev
);
struct
tc6387xb_platform_data
*
pdata
=
dev
->
dev
.
platform_data
;
struct
tc6387xb_platform_data
*
pdata
=
dev
_get_platdata
(
&
dev
->
dev
)
;
clk_enable
(
tc6387xb
->
clk32k
);
if
(
pdata
&&
pdata
->
resume
)
...
...
@@ -140,7 +140,7 @@ static struct mfd_cell tc6387xb_cells[] = {
static
int
tc6387xb_probe
(
struct
platform_device
*
dev
)
{
struct
tc6387xb_platform_data
*
pdata
=
dev
->
dev
.
platform_data
;
struct
tc6387xb_platform_data
*
pdata
=
dev
_get_platdata
(
&
dev
->
dev
)
;
struct
resource
*
iomem
,
*
rscr
;
struct
clk
*
clk32k
;
struct
tc6387xb
*
tc6387xb
;
...
...
drivers/mfd/tc6393xb.c
浏览文件 @
828fa1e6
...
...
@@ -604,7 +604,7 @@ static void tc6393xb_detach_irq(struct platform_device *dev)
static
int
tc6393xb_probe
(
struct
platform_device
*
dev
)
{
struct
tc6393xb_platform_data
*
tcpd
=
dev
->
dev
.
platform_data
;
struct
tc6393xb_platform_data
*
tcpd
=
dev
_get_platdata
(
&
dev
->
dev
)
;
struct
tc6393xb
*
tc6393xb
;
struct
resource
*
iomem
,
*
rscr
;
int
ret
,
temp
;
...
...
@@ -733,7 +733,7 @@ static int tc6393xb_probe(struct platform_device *dev)
static
int
tc6393xb_remove
(
struct
platform_device
*
dev
)
{
struct
tc6393xb_platform_data
*
tcpd
=
dev
->
dev
.
platform_data
;
struct
tc6393xb_platform_data
*
tcpd
=
dev
_get_platdata
(
&
dev
->
dev
)
;
struct
tc6393xb
*
tc6393xb
=
platform_get_drvdata
(
dev
);
int
ret
;
...
...
@@ -765,7 +765,7 @@ static int tc6393xb_remove(struct platform_device *dev)
#ifdef CONFIG_PM
static
int
tc6393xb_suspend
(
struct
platform_device
*
dev
,
pm_message_t
state
)
{
struct
tc6393xb_platform_data
*
tcpd
=
dev
->
dev
.
platform_data
;
struct
tc6393xb_platform_data
*
tcpd
=
dev
_get_platdata
(
&
dev
->
dev
)
;
struct
tc6393xb
*
tc6393xb
=
platform_get_drvdata
(
dev
);
int
i
,
ret
;
...
...
@@ -788,7 +788,7 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
static
int
tc6393xb_resume
(
struct
platform_device
*
dev
)
{
struct
tc6393xb_platform_data
*
tcpd
=
dev
->
dev
.
platform_data
;
struct
tc6393xb_platform_data
*
tcpd
=
dev
_get_platdata
(
&
dev
->
dev
)
;
struct
tc6393xb
*
tc6393xb
=
platform_get_drvdata
(
dev
);
int
ret
;
int
i
;
...
...
drivers/mfd/ti-ssp.c
浏览文件 @
828fa1e6
...
...
@@ -318,7 +318,7 @@ static irqreturn_t ti_ssp_interrupt(int irq, void *dev_data)
static
int
ti_ssp_probe
(
struct
platform_device
*
pdev
)
{
static
struct
ti_ssp
*
ssp
;
const
struct
ti_ssp_data
*
pdata
=
pdev
->
dev
.
platform_data
;
const
struct
ti_ssp_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
int
error
=
0
,
prediv
=
0xff
,
id
;
unsigned
long
sysclk
;
struct
device
*
dev
=
&
pdev
->
dev
;
...
...
drivers/mfd/ti_am335x_tscadc.c
浏览文件 @
828fa1e6
...
...
@@ -57,20 +57,20 @@ EXPORT_SYMBOL_GPL(am335x_tsc_se_update);
void
am335x_tsc_se_set
(
struct
ti_tscadc_dev
*
tsadc
,
u32
val
)
{
spin_lock
(
&
tsadc
->
reg_lock
);
tsadc
->
reg_se_cache
=
tscadc_readl
(
tsadc
,
REG_SE
);
tsadc
->
reg_se_cache
|=
val
;
spin_unlock
(
&
tsadc
->
reg_lock
);
am335x_tsc_se_update
(
tsadc
);
spin_unlock
(
&
tsadc
->
reg_lock
);
}
EXPORT_SYMBOL_GPL
(
am335x_tsc_se_set
);
void
am335x_tsc_se_clr
(
struct
ti_tscadc_dev
*
tsadc
,
u32
val
)
{
spin_lock
(
&
tsadc
->
reg_lock
);
tsadc
->
reg_se_cache
=
tscadc_readl
(
tsadc
,
REG_SE
);
tsadc
->
reg_se_cache
&=
~
val
;
spin_unlock
(
&
tsadc
->
reg_lock
);
am335x_tsc_se_update
(
tsadc
);
spin_unlock
(
&
tsadc
->
reg_lock
);
}
EXPORT_SYMBOL_GPL
(
am335x_tsc_se_clr
);
...
...
drivers/mfd/tps6105x.c
浏览文件 @
828fa1e6
...
...
@@ -147,7 +147,7 @@ static int tps6105x_probe(struct i2c_client *client,
i2c_set_clientdata
(
client
,
tps6105x
);
tps6105x
->
client
=
client
;
pdata
=
client
->
dev
.
platform_data
;
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
tps6105x
->
pdata
=
pdata
;
mutex_init
(
&
tps6105x
->
lock
);
...
...
drivers/mfd/tps65010.c
浏览文件 @
828fa1e6
...
...
@@ -242,8 +242,8 @@ static int dbg_show(struct seq_file *s, void *_)
seq_printf
(
s
,
"mask2 %s
\n
"
,
buf
);
/* ignore ackint2 */
schedule_delayed_work
(
&
tps
->
work
,
POWER_POLL_DELAY
);
queue_delayed_work
(
system_power_efficient_wq
,
&
tps
->
work
,
POWER_POLL_DELAY
);
/* VMAIN voltage, enable lowpower, etc */
value
=
i2c_smbus_read_byte_data
(
tps
->
client
,
TPS_VDCDC1
);
...
...
@@ -400,7 +400,8 @@ static void tps65010_interrupt(struct tps65010 *tps)
&&
(
tps
->
chgstatus
&
(
TPS_CHG_USB
|
TPS_CHG_AC
)))
poll
=
1
;
if
(
poll
)
schedule_delayed_work
(
&
tps
->
work
,
POWER_POLL_DELAY
);
queue_delayed_work
(
system_power_efficient_wq
,
&
tps
->
work
,
POWER_POLL_DELAY
);
/* also potentially gpio-in rise or fall */
}
...
...
@@ -448,7 +449,7 @@ static irqreturn_t tps65010_irq(int irq, void *_tps)
disable_irq_nosync
(
irq
);
set_bit
(
FLAG_IRQ_ENABLE
,
&
tps
->
flags
);
schedule_delayed_work
(
&
tps
->
work
,
0
);
queue_delayed_work
(
system_power_efficient_wq
,
&
tps
->
work
,
0
);
return
IRQ_HANDLED
;
}
...
...
@@ -517,7 +518,7 @@ static struct tps65010 *the_tps;
static
int
__exit
tps65010_remove
(
struct
i2c_client
*
client
)
{
struct
tps65010
*
tps
=
i2c_get_clientdata
(
client
);
struct
tps65010_board
*
board
=
client
->
dev
.
platform_data
;
struct
tps65010_board
*
board
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
board
&&
board
->
teardown
)
{
int
status
=
board
->
teardown
(
client
,
board
->
context
);
...
...
@@ -529,7 +530,6 @@ static int __exit tps65010_remove(struct i2c_client *client)
free_irq
(
client
->
irq
,
tps
);
cancel_delayed_work_sync
(
&
tps
->
work
);
debugfs_remove
(
tps
->
file
);
kfree
(
tps
);
the_tps
=
NULL
;
return
0
;
}
...
...
@@ -539,7 +539,7 @@ static int tps65010_probe(struct i2c_client *client,
{
struct
tps65010
*
tps
;
int
status
;
struct
tps65010_board
*
board
=
client
->
dev
.
platform_data
;
struct
tps65010_board
*
board
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
the_tps
)
{
dev_dbg
(
&
client
->
dev
,
"only one tps6501x chip allowed
\n
"
);
...
...
@@ -549,7 +549,7 @@ static int tps65010_probe(struct i2c_client *client,
if
(
!
i2c_check_functionality
(
client
->
adapter
,
I2C_FUNC_SMBUS_BYTE_DATA
))
return
-
EINVAL
;
tps
=
kzalloc
(
sizeof
*
tps
,
GFP_KERNEL
);
tps
=
devm_kzalloc
(
&
client
->
dev
,
sizeof
(
*
tps
)
,
GFP_KERNEL
);
if
(
!
tps
)
return
-
ENOMEM
;
...
...
@@ -567,7 +567,7 @@ static int tps65010_probe(struct i2c_client *client,
if
(
status
<
0
)
{
dev_dbg
(
&
client
->
dev
,
"can't get IRQ %d, err %d
\n
"
,
client
->
irq
,
status
);
goto
fail1
;
return
status
;
}
/* annoying race here, ideally we'd have an option
* to claim the irq now and enable it later.
...
...
@@ -667,9 +667,6 @@ static int tps65010_probe(struct i2c_client *client,
}
return
0
;
fail1:
kfree
(
tps
);
return
status
;
}
static
const
struct
i2c_device_id
tps65010_id
[]
=
{
...
...
@@ -718,7 +715,8 @@ int tps65010_set_vbus_draw(unsigned mA)
&&
test_and_set_bit
(
FLAG_VBUS_CHANGED
,
&
the_tps
->
flags
))
{
/* gadget drivers call this in_irq() */
schedule_delayed_work
(
&
the_tps
->
work
,
0
);
queue_delayed_work
(
system_power_efficient_wq
,
&
the_tps
->
work
,
0
);
}
local_irq_restore
(
flags
);
...
...
drivers/mfd/tps65090.c
浏览文件 @
828fa1e6
...
...
@@ -172,7 +172,7 @@ MODULE_DEVICE_TABLE(of, tps65090_of_match);
static
int
tps65090_i2c_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
tps65090_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
tps65090_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
int
irq_base
=
0
;
struct
tps65090
*
tps65090
;
int
ret
;
...
...
drivers/mfd/tps6586x.c
浏览文件 @
828fa1e6
...
...
@@ -462,7 +462,7 @@ static void tps6586x_power_off(void)
static
int
tps6586x_i2c_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
tps6586x_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
tps6586x_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
tps6586x
*
tps6586x
;
int
ret
;
...
...
drivers/mfd/tps65912-core.c
浏览文件 @
828fa1e6
...
...
@@ -123,7 +123,7 @@ EXPORT_SYMBOL_GPL(tps65912_reg_write);
int
tps65912_device_init
(
struct
tps65912
*
tps65912
)
{
struct
tps65912_board
*
pmic_plat_data
=
tps65912
->
dev
->
platform_data
;
struct
tps65912_board
*
pmic_plat_data
=
dev_get_platdata
(
tps65912
->
dev
)
;
struct
tps65912_platform_data
*
init_data
;
int
ret
,
dcdc_avs
,
value
;
...
...
drivers/mfd/tps80031.c
浏览文件 @
828fa1e6
...
...
@@ -418,7 +418,7 @@ static const struct regmap_config tps80031_regmap_configs[] = {
static
int
tps80031_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
tps80031_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
tps80031_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
tps80031
*
tps80031
;
int
ret
;
uint8_t
es_version
;
...
...
drivers/mfd/twl-core.c
浏览文件 @
828fa1e6
...
...
@@ -1137,7 +1137,7 @@ static int twl_remove(struct i2c_client *client)
static
int
twl_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
twl4030_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
twl4030_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
device_node
*
node
=
client
->
dev
.
of_node
;
struct
platform_device
*
pdev
;
struct
regmap_config
*
twl_regmap_config
;
...
...
drivers/mfd/twl4030-audio.c
浏览文件 @
828fa1e6
...
...
@@ -187,7 +187,7 @@ static bool twl4030_audio_has_vibra(struct twl4030_audio_data *pdata,
static
int
twl4030_audio_probe
(
struct
platform_device
*
pdev
)
{
struct
twl4030_audio
*
audio
;
struct
twl4030_audio_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
twl4030_audio_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
device_node
*
node
=
pdev
->
dev
.
of_node
;
struct
mfd_cell
*
cell
=
NULL
;
int
ret
,
childs
=
0
;
...
...
drivers/mfd/twl4030-madc.c
浏览文件 @
828fa1e6
...
...
@@ -701,7 +701,7 @@ static int twl4030_madc_set_power(struct twl4030_madc_data *madc, int on)
static
int
twl4030_madc_probe
(
struct
platform_device
*
pdev
)
{
struct
twl4030_madc_data
*
madc
;
struct
twl4030_madc_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
twl4030_madc_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
int
ret
;
u8
regval
;
...
...
drivers/mfd/twl4030-power.c
浏览文件 @
828fa1e6
...
...
@@ -493,7 +493,7 @@ int twl4030_remove_script(u8 flags)
return
err
;
}
int
twl4030_power_configure_scripts
(
struct
twl4030_power_data
*
pdata
)
static
int
twl4030_power_configure_scripts
(
struct
twl4030_power_data
*
pdata
)
{
int
err
;
int
i
;
...
...
@@ -509,7 +509,7 @@ int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
return
0
;
}
int
twl4030_power_configure_resources
(
struct
twl4030_power_data
*
pdata
)
static
int
twl4030_power_configure_resources
(
struct
twl4030_power_data
*
pdata
)
{
struct
twl4030_resconfig
*
resconfig
=
pdata
->
resource_config
;
int
err
;
...
...
@@ -553,9 +553,9 @@ static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
return
false
;
}
int
twl4030_power_probe
(
struct
platform_device
*
pdev
)
static
int
twl4030_power_probe
(
struct
platform_device
*
pdev
)
{
struct
twl4030_power_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
twl4030_power_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
device_node
*
node
=
pdev
->
dev
.
of_node
;
int
err
=
0
;
int
err2
=
0
;
...
...
drivers/mfd/ucb1400_core.c
浏览文件 @
828fa1e6
...
...
@@ -52,7 +52,7 @@ static int ucb1400_core_probe(struct device *dev)
struct
ucb1400_ts
ucb_ts
;
struct
ucb1400_gpio
ucb_gpio
;
struct
snd_ac97
*
ac97
;
struct
ucb1400_pdata
*
pdata
=
dev
->
platform_data
;
struct
ucb1400_pdata
*
pdata
=
dev
_get_platdata
(
dev
)
;
memset
(
&
ucb_ts
,
0
,
sizeof
(
ucb_ts
));
memset
(
&
ucb_gpio
,
0
,
sizeof
(
ucb_gpio
));
...
...
drivers/mfd/ucb1x00-core.c
浏览文件 @
828fa1e6
...
...
@@ -669,9 +669,10 @@ void ucb1x00_unregister_driver(struct ucb1x00_driver *drv)
mutex_unlock
(
&
ucb1x00_mutex
);
}
#ifdef CONFIG_PM_SLEEP
static
int
ucb1x00_suspend
(
struct
device
*
dev
)
{
struct
ucb1x00_plat_data
*
pdata
=
dev
->
platform_data
;
struct
ucb1x00_plat_data
*
pdata
=
dev
_get_platdata
(
dev
)
;
struct
ucb1x00
*
ucb
=
dev_get_drvdata
(
dev
);
struct
ucb1x00_dev
*
udev
;
...
...
@@ -703,7 +704,7 @@ static int ucb1x00_suspend(struct device *dev)
static
int
ucb1x00_resume
(
struct
device
*
dev
)
{
struct
ucb1x00_plat_data
*
pdata
=
dev
->
platform_data
;
struct
ucb1x00_plat_data
*
pdata
=
dev
_get_platdata
(
dev
)
;
struct
ucb1x00
*
ucb
=
dev_get_drvdata
(
dev
);
struct
ucb1x00_dev
*
udev
;
...
...
@@ -736,6 +737,7 @@ static int ucb1x00_resume(struct device *dev)
mutex_unlock
(
&
ucb1x00_mutex
);
return
0
;
}
#endif
static
const
struct
dev_pm_ops
ucb1x00_pm_ops
=
{
SET_SYSTEM_SLEEP_PM_OPS
(
ucb1x00_suspend
,
ucb1x00_resume
)
...
...
drivers/mfd/wl1273-core.c
浏览文件 @
828fa1e6
...
...
@@ -172,12 +172,9 @@ static int wl1273_fm_set_volume(struct wl1273_core *core, unsigned int volume)
static
int
wl1273_core_remove
(
struct
i2c_client
*
client
)
{
struct
wl1273_core
*
core
=
i2c_get_clientdata
(
client
);
dev_dbg
(
&
client
->
dev
,
"%s
\n
"
,
__func__
);
mfd_remove_devices
(
&
client
->
dev
);
kfree
(
core
);
return
0
;
}
...
...
@@ -185,7 +182,7 @@ static int wl1273_core_remove(struct i2c_client *client)
static
int
wl1273_core_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
wl1273_fm_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
wl1273_fm_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
wl1273_core
*
core
;
struct
mfd_cell
*
cell
;
int
children
=
0
;
...
...
@@ -203,7 +200,7 @@ static int wl1273_core_probe(struct i2c_client *client,
return
-
EINVAL
;
}
core
=
kzalloc
(
sizeof
(
*
core
),
GFP_KERNEL
);
core
=
devm_kzalloc
(
&
client
->
dev
,
sizeof
(
*
core
),
GFP_KERNEL
);
if
(
!
core
)
return
-
ENOMEM
;
...
...
@@ -249,7 +246,6 @@ static int wl1273_core_probe(struct i2c_client *client,
err:
pdata
->
free_resources
();
kfree
(
core
);
dev_dbg
(
&
client
->
dev
,
"%s
\n
"
,
__func__
);
...
...
drivers/mfd/wm5110-tables.c
浏览文件 @
828fa1e6
...
...
@@ -468,12 +468,14 @@ static const struct reg_default wm5110_reg_default[] = {
{
0x00000176
,
0x0000
},
/* R374 - FLL1 Control 6 */
{
0x00000177
,
0x0281
},
/* R375 - FLL1 Loop Filter Test 1 */
{
0x00000178
,
0x0000
},
/* R376 - FLL1 NCO Test 0 */
{
0x00000179
,
0x0000
},
/* R376 - FLL1 Control 7 */
{
0x00000181
,
0x0000
},
/* R385 - FLL1 Synchroniser 1 */
{
0x00000182
,
0x0000
},
/* R386 - FLL1 Synchroniser 2 */
{
0x00000183
,
0x0000
},
/* R387 - FLL1 Synchroniser 3 */
{
0x00000184
,
0x0000
},
/* R388 - FLL1 Synchroniser 4 */
{
0x00000185
,
0x0000
},
/* R389 - FLL1 Synchroniser 5 */
{
0x00000186
,
0x0000
},
/* R390 - FLL1 Synchroniser 6 */
{
0x00000187
,
0x0001
},
/* R390 - FLL1 Synchroniser 7 */
{
0x00000189
,
0x0000
},
/* R393 - FLL1 Spread Spectrum */
{
0x0000018A
,
0x0004
},
/* R394 - FLL1 GPIO Clock */
{
0x00000191
,
0x0000
},
/* R401 - FLL2 Control 1 */
...
...
@@ -484,12 +486,14 @@ static const struct reg_default wm5110_reg_default[] = {
{
0x00000196
,
0x0000
},
/* R406 - FLL2 Control 6 */
{
0x00000197
,
0x0000
},
/* R407 - FLL2 Loop Filter Test 1 */
{
0x00000198
,
0x0000
},
/* R408 - FLL2 NCO Test 0 */
{
0x00000199
,
0x0000
},
/* R408 - FLL2 Control 7 */
{
0x000001A1
,
0x0000
},
/* R417 - FLL2 Synchroniser 1 */
{
0x000001A2
,
0x0000
},
/* R418 - FLL2 Synchroniser 2 */
{
0x000001A3
,
0x0000
},
/* R419 - FLL2 Synchroniser 3 */
{
0x000001A4
,
0x0000
},
/* R420 - FLL2 Synchroniser 4 */
{
0x000001A5
,
0x0000
},
/* R421 - FLL2 Synchroniser 5 */
{
0x000001A6
,
0x0000
},
/* R422 - FLL2 Synchroniser 6 */
{
0x000001A7
,
0x0001
},
/* R422 - FLL2 Synchroniser 7 */
{
0x000001A9
,
0x0000
},
/* R425 - FLL2 Spread Spectrum */
{
0x000001AA
,
0x0004
},
/* R426 - FLL2 GPIO Clock */
{
0x00000200
,
0x0006
},
/* R512 - Mic Charge Pump 1 */
...
...
@@ -503,6 +507,11 @@ static const struct reg_default wm5110_reg_default[] = {
{
0x0000029C
,
0x0000
},
/* R668 - Headphone Detect 2 */
{
0x000002A3
,
0x1102
},
/* R675 - Mic Detect 1 */
{
0x000002A4
,
0x009F
},
/* R676 - Mic Detect 2 */
{
0x000002A5
,
0x0000
},
/* R677 - Mic Detect 3 */
{
0x000002A6
,
0x3737
},
/* R678 - Mic Detect Level 1 */
{
0x000002A7
,
0x372C
},
/* R679 - Mic Detect Level 2 */
{
0x000002A8
,
0x1422
},
/* R680 - Mic Detect Level 3 */
{
0x000002A9
,
0x300A
},
/* R681 - Mic Detect Level 4 */
{
0x000002C3
,
0x0000
},
/* R707 - Mic noise mix control 1 */
{
0x000002D3
,
0x0000
},
/* R723 - Jack detect analogue */
{
0x00000300
,
0x0000
},
/* R768 - Input Enables */
...
...
@@ -1392,6 +1401,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case
ARIZONA_FLL1_CONTROL_4
:
case
ARIZONA_FLL1_CONTROL_5
:
case
ARIZONA_FLL1_CONTROL_6
:
case
ARIZONA_FLL1_CONTROL_7
:
case
ARIZONA_FLL1_LOOP_FILTER_TEST_1
:
case
ARIZONA_FLL1_NCO_TEST_0
:
case
ARIZONA_FLL1_SYNCHRONISER_1
:
...
...
@@ -1400,6 +1410,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case
ARIZONA_FLL1_SYNCHRONISER_4
:
case
ARIZONA_FLL1_SYNCHRONISER_5
:
case
ARIZONA_FLL1_SYNCHRONISER_6
:
case
ARIZONA_FLL1_SYNCHRONISER_7
:
case
ARIZONA_FLL1_SPREAD_SPECTRUM
:
case
ARIZONA_FLL1_GPIO_CLOCK
:
case
ARIZONA_FLL2_CONTROL_1
:
...
...
@@ -1408,6 +1419,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case
ARIZONA_FLL2_CONTROL_4
:
case
ARIZONA_FLL2_CONTROL_5
:
case
ARIZONA_FLL2_CONTROL_6
:
case
ARIZONA_FLL2_CONTROL_7
:
case
ARIZONA_FLL2_LOOP_FILTER_TEST_1
:
case
ARIZONA_FLL2_NCO_TEST_0
:
case
ARIZONA_FLL2_SYNCHRONISER_1
:
...
...
@@ -1416,6 +1428,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case
ARIZONA_FLL2_SYNCHRONISER_4
:
case
ARIZONA_FLL2_SYNCHRONISER_5
:
case
ARIZONA_FLL2_SYNCHRONISER_6
:
case
ARIZONA_FLL2_SYNCHRONISER_7
:
case
ARIZONA_FLL2_SPREAD_SPECTRUM
:
case
ARIZONA_FLL2_GPIO_CLOCK
:
case
ARIZONA_MIC_CHARGE_PUMP_1
:
...
...
@@ -1430,6 +1443,10 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case
ARIZONA_MIC_DETECT_1
:
case
ARIZONA_MIC_DETECT_2
:
case
ARIZONA_MIC_DETECT_3
:
case
ARIZONA_MIC_DETECT_LEVEL_1
:
case
ARIZONA_MIC_DETECT_LEVEL_2
:
case
ARIZONA_MIC_DETECT_LEVEL_3
:
case
ARIZONA_MIC_DETECT_LEVEL_4
:
case
ARIZONA_MIC_NOISE_MIX_CONTROL_1
:
case
ARIZONA_JACK_DETECT_ANALOGUE
:
case
ARIZONA_INPUT_ENABLES
:
...
...
@@ -2332,6 +2349,7 @@ static bool wm5110_volatile_register(struct device *dev, unsigned int reg)
case
ARIZONA_IRQ_PIN_STATUS
:
case
ARIZONA_AOD_IRQ1
:
case
ARIZONA_AOD_IRQ2
:
case
ARIZONA_FX_CTRL2
:
case
ARIZONA_ASRC_STATUS
:
case
ARIZONA_DSP_STATUS
:
case
ARIZONA_DSP1_CONTROL_1
:
...
...
drivers/mfd/wm831x-core.c
浏览文件 @
828fa1e6
...
...
@@ -1618,7 +1618,7 @@ EXPORT_SYMBOL_GPL(wm831x_regmap_config);
*/
int
wm831x_device_init
(
struct
wm831x
*
wm831x
,
unsigned
long
id
,
int
irq
)
{
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
int
rev
,
wm831x_num
;
enum
wm831x_parent
parent
;
int
ret
,
i
;
...
...
drivers/mfd/wm831x-irq.c
浏览文件 @
828fa1e6
...
...
@@ -571,7 +571,7 @@ static struct irq_domain_ops wm831x_irq_domain_ops = {
int
wm831x_irq_init
(
struct
wm831x
*
wm831x
,
int
irq
)
{
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
irq_domain
*
domain
;
int
i
,
ret
,
irq_base
;
...
...
drivers/mfd/wm831x-spi.c
浏览文件 @
828fa1e6
...
...
@@ -34,7 +34,6 @@ static int wm831x_spi_probe(struct spi_device *spi)
if
(
wm831x
==
NULL
)
return
-
ENOMEM
;
spi
->
bits_per_word
=
16
;
spi
->
mode
=
SPI_MODE_0
;
spi_set_drvdata
(
spi
,
wm831x
);
...
...
drivers/mfd/wm8350-i2c.c
浏览文件 @
828fa1e6
...
...
@@ -27,6 +27,7 @@ static int wm8350_i2c_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
wm8350
*
wm8350
;
struct
wm8350_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
);
int
ret
=
0
;
wm8350
=
devm_kzalloc
(
&
i2c
->
dev
,
sizeof
(
struct
wm8350
),
GFP_KERNEL
);
...
...
@@ -44,7 +45,7 @@ static int wm8350_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata
(
i2c
,
wm8350
);
wm8350
->
dev
=
&
i2c
->
dev
;
return
wm8350_device_init
(
wm8350
,
i2c
->
irq
,
i2c
->
dev
.
platform_
data
);
return
wm8350_device_init
(
wm8350
,
i2c
->
irq
,
p
data
);
}
static
int
wm8350_i2c_remove
(
struct
i2c_client
*
i2c
)
...
...
drivers/mfd/wm8400-core.c
浏览文件 @
828fa1e6
...
...
@@ -178,7 +178,7 @@ static int wm8400_i2c_probe(struct i2c_client *i2c,
wm8400
->
dev
=
&
i2c
->
dev
;
i2c_set_clientdata
(
i2c
,
wm8400
);
ret
=
wm8400_init
(
wm8400
,
i2c
->
dev
.
platform_data
);
ret
=
wm8400_init
(
wm8400
,
dev_get_platdata
(
&
i2c
->
dev
)
);
if
(
ret
!=
0
)
goto
err
;
...
...
drivers/mfd/wm8994-irq.c
浏览文件 @
828fa1e6
...
...
@@ -193,7 +193,7 @@ int wm8994_irq_init(struct wm8994 *wm8994)
{
int
ret
;
unsigned
long
irqflags
;
struct
wm8994_pdata
*
pdata
=
wm8994
->
dev
->
platform_data
;
struct
wm8994_pdata
*
pdata
=
dev_get_platdata
(
wm8994
->
dev
)
;
if
(
!
wm8994
->
irq
)
{
dev_warn
(
wm8994
->
dev
,
...
...
include/linux/mfd/palmas.h
浏览文件 @
828fa1e6
...
...
@@ -302,6 +302,7 @@ struct palmas_platform_data {
*/
int
mux_from_pdata
;
u8
pad1
,
pad2
;
bool
pm_off
;
struct
palmas_pmic_platform_data
*
pmic_pdata
;
struct
palmas_gpadc_platform_data
*
gpadc_pdata
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录