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
94126645
Commit
94126645
authored
Sep 19, 2023
by
Wolfram Sang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'i2c/for-current' into i2c/for-mergewindow
parents
c1ac8903
2409205a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
drivers/i2c/busses/i2c-designware-common.c
drivers/i2c/busses/i2c-designware-common.c
+17
-0
drivers/i2c/busses/i2c-designware-core.h
drivers/i2c/busses/i2c-designware-core.h
+3
-0
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-i801.c
+1
-0
No files found.
drivers/i2c/busses/i2c-designware-common.c
View file @
94126645
...
...
@@ -441,8 +441,25 @@ int i2c_dw_set_sda_hold(struct dw_i2c_dev *dev)
void
__i2c_dw_disable
(
struct
dw_i2c_dev
*
dev
)
{
unsigned
int
raw_intr_stats
;
unsigned
int
enable
;
int
timeout
=
100
;
bool
abort_needed
;
unsigned
int
status
;
int
ret
;
regmap_read
(
dev
->
map
,
DW_IC_RAW_INTR_STAT
,
&
raw_intr_stats
);
regmap_read
(
dev
->
map
,
DW_IC_ENABLE
,
&
enable
);
abort_needed
=
raw_intr_stats
&
DW_IC_INTR_MST_ON_HOLD
;
if
(
abort_needed
)
{
regmap_write
(
dev
->
map
,
DW_IC_ENABLE
,
enable
|
DW_IC_ENABLE_ABORT
);
ret
=
regmap_read_poll_timeout
(
dev
->
map
,
DW_IC_ENABLE
,
enable
,
!
(
enable
&
DW_IC_ENABLE_ABORT
),
10
,
100
);
if
(
ret
)
dev_err
(
dev
->
dev
,
"timeout while trying to abort current transfer
\n
"
);
}
do
{
__i2c_dw_disable_nowait
(
dev
);
...
...
drivers/i2c/busses/i2c-designware-core.h
View file @
94126645
...
...
@@ -98,6 +98,7 @@
#define DW_IC_INTR_START_DET BIT(10)
#define DW_IC_INTR_GEN_CALL BIT(11)
#define DW_IC_INTR_RESTART_DET BIT(12)
#define DW_IC_INTR_MST_ON_HOLD BIT(13)
#define DW_IC_INTR_DEFAULT_MASK (DW_IC_INTR_RX_FULL | \
DW_IC_INTR_TX_ABRT | \
...
...
@@ -108,6 +109,8 @@
DW_IC_INTR_RX_UNDER | \
DW_IC_INTR_RD_REQ)
#define DW_IC_ENABLE_ABORT BIT(1)
#define DW_IC_STATUS_ACTIVITY BIT(0)
#define DW_IC_STATUS_TFE BIT(2)
#define DW_IC_STATUS_RFNE BIT(3)
...
...
drivers/i2c/busses/i2c-i801.c
View file @
94126645
...
...
@@ -1753,6 +1753,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
"SMBus I801 adapter at %04lx"
,
priv
->
smba
);
err
=
i2c_add_adapter
(
&
priv
->
adapter
);
if
(
err
)
{
platform_device_unregister
(
priv
->
tco_pdev
);
i801_acpi_remove
(
priv
);
return
err
;
}
...
...
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