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
Kirill Smelkov
linux
Commits
90b128ed
Commit
90b128ed
authored
Nov 11, 2013
by
Samuel Ortiz
Browse files
Options
Browse Files
Download
Plain Diff
Merge tag 'mfd-lee-3.13-3' of
git://git.linaro.org/people/ljones/mfd
mfd-lee-3.13-3 MFD patches due for v3.13 - 2nd round.
parents
5e90169c
9a46847a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
23 deletions
+38
-23
Documentation/devicetree/bindings/mfd/s2mps11.txt
Documentation/devicetree/bindings/mfd/s2mps11.txt
+7
-6
drivers/mfd/mfd-core.c
drivers/mfd/mfd-core.c
+17
-12
drivers/mfd/pm8921-core.c
drivers/mfd/pm8921-core.c
+5
-4
drivers/mfd/wm5110-tables.c
drivers/mfd/wm5110-tables.c
+8
-0
include/linux/mfd/core.h
include/linux/mfd/core.h
+1
-1
No files found.
Documentation/devicetree/bindings/mfd/s2mps11.txt
View file @
90b128ed
* Samsung S2MPS11 Voltage and Current Regulator
The Samsung S2MP
2
11 is a multi-function device which includes voltage and
The Samsung S2MP
S
11 is a multi-function device which includes voltage and
current regulators, RTC, charger controller and other sub-blocks. It is
interfaced to the host controller using a I2C interface. Each sub-block is
addressed by the host system using different I2C slave address.
interfaced to the host controller using a
n
I2C interface. Each sub-block is
addressed by the host system using different I2C slave address
es
.
Required properties:
- compatible: Should be "samsung,s2mps11-pmic".
...
...
@@ -43,7 +43,8 @@ sub-node should be of the format as listed below.
BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explictly
regulator-ramp-delay = <0> can be used for them to disable ramp delay.
In absence of regulator-ramp-delay property, default ramp delay will be used.
In the absence of the regulator-ramp-delay property, the default ramp
delay will be used.
NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set
for a particular group of BUCKs. So provide same regulator-ramp-delay<value>.
...
...
@@ -58,10 +59,10 @@ supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
as per the datasheet of s2mps11.
- LDOn
- valid values for n are 1 to
2
8
- valid values for n are 1 to
3
8
- Example: LDO0, LD01, LDO28
- BUCKn
- valid values for n are 1 to
9
.
- valid values for n are 1 to
10
.
- Example: BUCK1, BUCK2, BUCK9
Example:
...
...
drivers/mfd/mfd-core.c
View file @
90b128ed
...
...
@@ -63,7 +63,8 @@ int mfd_cell_disable(struct platform_device *pdev)
EXPORT_SYMBOL
(
mfd_cell_disable
);
static
int
mfd_platform_add_cell
(
struct
platform_device
*
pdev
,
const
struct
mfd_cell
*
cell
)
const
struct
mfd_cell
*
cell
,
atomic_t
*
usage_count
)
{
if
(
!
cell
)
return
0
;
...
...
@@ -72,11 +73,12 @@ static int mfd_platform_add_cell(struct platform_device *pdev,
if
(
!
pdev
->
mfd_cell
)
return
-
ENOMEM
;
pdev
->
mfd_cell
->
usage_count
=
usage_count
;
return
0
;
}
static
int
mfd_add_device
(
struct
device
*
parent
,
int
id
,
const
struct
mfd_cell
*
cell
,
const
struct
mfd_cell
*
cell
,
atomic_t
*
usage_count
,
struct
resource
*
mem_base
,
int
irq_base
,
struct
irq_domain
*
domain
)
{
...
...
@@ -115,7 +117,7 @@ static int mfd_add_device(struct device *parent, int id,
goto
fail_res
;
}
ret
=
mfd_platform_add_cell
(
pdev
,
cell
);
ret
=
mfd_platform_add_cell
(
pdev
,
cell
,
usage_count
);
if
(
ret
)
goto
fail_res
;
...
...
@@ -180,12 +182,12 @@ static int mfd_add_device(struct device *parent, int id,
}
int
mfd_add_devices
(
struct
device
*
parent
,
int
id
,
struct
mfd_cell
*
cells
,
int
n_devs
,
const
struct
mfd_cell
*
cells
,
int
n_devs
,
struct
resource
*
mem_base
,
int
irq_base
,
struct
irq_domain
*
domain
)
{
int
i
;
int
ret
=
0
;
int
ret
;
atomic_t
*
cnts
;
/* initialize reference counting for all cells */
...
...
@@ -195,16 +197,19 @@ int mfd_add_devices(struct device *parent, int id,
for
(
i
=
0
;
i
<
n_devs
;
i
++
)
{
atomic_set
(
&
cnts
[
i
],
0
);
cells
[
i
].
usage_count
=
&
cnts
[
i
];
ret
=
mfd_add_device
(
parent
,
id
,
cells
+
i
,
mem_base
,
ret
=
mfd_add_device
(
parent
,
id
,
cells
+
i
,
cnts
+
i
,
mem_base
,
irq_base
,
domain
);
if
(
ret
)
break
;
goto
fail
;
}
if
(
ret
)
mfd_remove_devices
(
parent
);
return
0
;
fail:
if
(
i
)
mfd_remove_devices
(
parent
);
else
kfree
(
cnts
);
return
ret
;
}
EXPORT_SYMBOL
(
mfd_add_devices
);
...
...
@@ -259,8 +264,8 @@ int mfd_clone_cell(const char *cell, const char **clones, size_t n_clones)
for
(
i
=
0
;
i
<
n_clones
;
i
++
)
{
cell_entry
.
name
=
clones
[
i
];
/* don't give up if a single call fails; just report error */
if
(
mfd_add_device
(
pdev
->
dev
.
parent
,
-
1
,
&
cell_entry
,
NULL
,
0
,
NULL
))
if
(
mfd_add_device
(
pdev
->
dev
.
parent
,
-
1
,
&
cell_entry
,
cell_entry
.
usage_count
,
NULL
,
0
,
NULL
))
dev_err
(
dev
,
"failed to create platform device '%s'
\n
"
,
clones
[
i
]);
}
...
...
drivers/mfd/pm8921-core.c
View file @
90b128ed
...
...
@@ -171,11 +171,12 @@ static int pm8921_remove(struct platform_device *pdev)
drvdata
=
platform_get_drvdata
(
pdev
);
if
(
drvdata
)
pmic
=
drvdata
->
pm_chip_data
;
if
(
pmic
)
if
(
pmic
)
{
mfd_remove_devices
(
pmic
->
dev
);
if
(
pmic
->
irq_chip
)
{
pm8xxx_irq_exit
(
pmic
->
irq_chip
);
pmic
->
irq_chip
=
NULL
;
if
(
pmic
->
irq_chip
)
{
pm8xxx_irq_exit
(
pmic
->
irq_chip
);
pmic
->
irq_chip
=
NULL
;
}
}
return
0
;
...
...
drivers/mfd/wm5110-tables.c
View file @
90b128ed
...
...
@@ -243,6 +243,12 @@ int wm5110_patch(struct arizona *arizona)
EXPORT_SYMBOL_GPL
(
wm5110_patch
);
static
const
struct
regmap_irq
wm5110_aod_irqs
[
ARIZONA_NUM_IRQ
]
=
{
[
ARIZONA_IRQ_MICD_CLAMP_FALL
]
=
{
.
mask
=
ARIZONA_MICD_CLAMP_FALL_EINT1
},
[
ARIZONA_IRQ_MICD_CLAMP_RISE
]
=
{
.
mask
=
ARIZONA_MICD_CLAMP_RISE_EINT1
},
[
ARIZONA_IRQ_GP5_FALL
]
=
{
.
mask
=
ARIZONA_GP5_FALL_EINT1
},
[
ARIZONA_IRQ_GP5_RISE
]
=
{
.
mask
=
ARIZONA_GP5_RISE_EINT1
},
[
ARIZONA_IRQ_JD_FALL
]
=
{
.
mask
=
ARIZONA_JD1_FALL_EINT1
},
...
...
@@ -505,6 +511,7 @@ static const struct reg_default wm5110_reg_default[] = {
{
0x00000293
,
0x0000
},
/* R659 - Accessory Detect Mode 1 */
{
0x0000029B
,
0x0020
},
/* R667 - Headphone Detect 1 */
{
0x0000029C
,
0x0000
},
/* R668 - Headphone Detect 2 */
{
0x000002A2
,
0x0000
},
/* R674 - Micd clamp control */
{
0x000002A3
,
0x1102
},
/* R675 - Mic Detect 1 */
{
0x000002A4
,
0x009F
},
/* R676 - Mic Detect 2 */
{
0x000002A5
,
0x0000
},
/* R677 - Mic Detect 3 */
...
...
@@ -1439,6 +1446,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case
ARIZONA_ACCESSORY_DETECT_MODE_1
:
case
ARIZONA_HEADPHONE_DETECT_1
:
case
ARIZONA_HEADPHONE_DETECT_2
:
case
ARIZONA_MICD_CLAMP_CONTROL
:
case
ARIZONA_MIC_DETECT_1
:
case
ARIZONA_MIC_DETECT_2
:
case
ARIZONA_MIC_DETECT_3
:
...
...
include/linux/mfd/core.h
View file @
90b128ed
...
...
@@ -98,7 +98,7 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
}
extern
int
mfd_add_devices
(
struct
device
*
parent
,
int
id
,
struct
mfd_cell
*
cells
,
int
n_devs
,
const
struct
mfd_cell
*
cells
,
int
n_devs
,
struct
resource
*
mem_base
,
int
irq_base
,
struct
irq_domain
*
irq_domain
);
...
...
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