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
e1700574
Commit
e1700574
authored
Mar 12, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i2c: get i2c-ali15x3 driver to actually bind to a PCI device.
parent
d25e3ba0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
+9
-23
drivers/i2c/busses/i2c-ali15x3.c
drivers/i2c/busses/i2c-ali15x3.c
+9
-23
No files found.
drivers/i2c/busses/i2c-ali15x3.c
View file @
e1700574
...
@@ -135,32 +135,11 @@ static int ali15x3_transaction(void);
...
@@ -135,32 +135,11 @@ static int ali15x3_transaction(void);
static
unsigned
short
ali15x3_smba
=
0
;
static
unsigned
short
ali15x3_smba
=
0
;
/* Detect whether a ALI15X3 can be found, and initialize it, where necessary.
int
ali15x3_setup
(
struct
pci_dev
*
ALI15X3_dev
)
Note the differences between kernels with the old PCI BIOS interface and
newer kernels with the real PCI interface. In compat.h some things are
defined to make the transition easier. */
int
ali15x3_setup
(
void
)
{
{
u16
a
;
u16
a
;
unsigned
char
temp
;
unsigned
char
temp
;
struct
pci_dev
*
ALI15X3_dev
;
/* First check whether we can access PCI at all */
if
(
pci_present
()
==
0
)
{
printk
(
"i2c-ali15x3.o: Error: No PCI-bus found!
\n
"
);
return
-
ENODEV
;
}
/* Look for the ALI15X3, M7101 device */
ALI15X3_dev
=
NULL
;
ALI15X3_dev
=
pci_find_device
(
PCI_VENDOR_ID_AL
,
PCI_DEVICE_ID_AL_M7101
,
ALI15X3_dev
);
if
(
ALI15X3_dev
==
NULL
)
{
printk
(
"i2c-ali15x3.o: Error: Can't detect ali15x3!
\n
"
);
return
-
ENODEV
;
}
/* Check the following things:
/* Check the following things:
- SMB I/O address is initialized
- SMB I/O address is initialized
- Device is enabled
- Device is enabled
...
@@ -534,12 +513,18 @@ static struct i2c_adapter ali15x3_adapter = {
...
@@ -534,12 +513,18 @@ static struct i2c_adapter ali15x3_adapter = {
static
struct
pci_device_id
ali15x3_ids
[]
__devinitdata
=
{
static
struct
pci_device_id
ali15x3_ids
[]
__devinitdata
=
{
{
.
vendor
=
PCI_VENDOR_ID_AL
,
.
device
=
PCI_DEVICE_ID_AL_M7101
,
.
subvendor
=
PCI_ANY_ID
,
.
subdevice
=
PCI_ANY_ID
,
},
{
0
,
}
{
0
,
}
};
};
static
int
__devinit
ali15x3_probe
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
static
int
__devinit
ali15x3_probe
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
{
if
(
ali15x3_setup
())
{
if
(
ali15x3_setup
(
dev
))
{
printk
printk
(
"i2c-ali15x3.o: ALI15X3 not detected, module not inserted.
\n
"
);
(
"i2c-ali15x3.o: ALI15X3 not detected, module not inserted.
\n
"
);
...
@@ -549,6 +534,7 @@ static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_
...
@@ -549,6 +534,7 @@ static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_
sprintf
(
ali15x3_adapter
.
name
,
"SMBus ALI15X3 adapter at %04x"
,
sprintf
(
ali15x3_adapter
.
name
,
"SMBus ALI15X3 adapter at %04x"
,
ali15x3_smba
);
ali15x3_smba
);
i2c_add_adapter
(
&
ali15x3_adapter
);
i2c_add_adapter
(
&
ali15x3_adapter
);
return
0
;
}
}
static
void
__devexit
ali15x3_remove
(
struct
pci_dev
*
dev
)
static
void
__devexit
ali15x3_remove
(
struct
pci_dev
*
dev
)
...
...
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