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
0472fea5
Commit
0472fea5
authored
Dec 29, 2002
by
Christoph Hellwig
Committed by
Linus Torvalds
Dec 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] check_region remove for drivers/i2c/
Trying to get the i2c code in shape at some point..
parent
f66a7c41
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
60 deletions
+40
-60
drivers/i2c/i2c-adap-ite.c
drivers/i2c/i2c-adap-ite.c
+11
-13
drivers/i2c/i2c-elektor.c
drivers/i2c/i2c-elektor.c
+4
-4
drivers/i2c/i2c-elv.c
drivers/i2c/i2c-elv.c
+22
-25
drivers/i2c/i2c-frodo.c
drivers/i2c/i2c-frodo.c
+0
-7
drivers/i2c/i2c-philips-par.c
drivers/i2c/i2c-philips-par.c
+2
-11
drivers/i2c/i2c-proc.c
drivers/i2c/i2c-proc.c
+1
-0
No files found.
drivers/i2c/i2c-adap-ite.c
View file @
0472fea5
...
...
@@ -160,19 +160,17 @@ static void iic_ite_handler(int this_irq, void *dev_id, struct pt_regs *regs)
*/
static
int
iic_hw_resrc_init
(
void
)
{
if
(
check_region
(
gpi
.
iic_base
,
ITE_IIC_IO_SIZE
)
<
0
)
{
if
(
!
request_region
(
gpi
.
iic_base
,
ITE_IIC_IO_SIZE
,
"i2c"
))
return
-
ENODEV
;
}
else
{
request_region
(
gpi
.
iic_base
,
ITE_IIC_IO_SIZE
,
"i2c (i2c bus adapter)"
);
}
if
(
gpi
.
iic_irq
>
0
)
{
if
(
request_irq
(
gpi
.
iic_irq
,
iic_ite_handler
,
0
,
"ITE IIC"
,
0
)
<
0
)
{
if
(
gpi
.
iic_irq
<=
0
)
return
0
;
if
(
request_irq
(
gpi
.
iic_irq
,
iic_ite_handler
,
0
,
"ITE IIC"
,
0
)
<
0
)
gpi
.
iic_irq
=
0
;
}
else
DEB3
(
printk
(
"Enabled IIC IRQ %d
\n
"
,
gpi
.
iic_irq
));
else
enable_irq
(
gpi
.
iic_irq
);
}
return
0
;
}
...
...
drivers/i2c/i2c-elektor.c
View file @
0472fea5
...
...
@@ -142,11 +142,11 @@ static void pcf_isa_handler(int this_irq, void *dev_id, struct pt_regs *regs) {
static
int
pcf_isa_init
(
void
)
{
if
(
!
mmapped
)
{
if
(
check_region
(
base
,
2
)
<
0
)
{
printk
(
KERN_ERR
"i2c-elektor.o: requested I/O region (0x%X:2) is in use.
\n
"
,
base
);
if
(
!
request_region
(
base
,
2
,
"i2c (isa bus adapter)"
))
printk
(
KERN_ERR
"i2c-elektor.o: requested I/O region (0x%X:2) "
"is in use.
\n
"
,
base
);
return
-
ENODEV
;
}
else
{
request_region
(
base
,
2
,
"i2c (isa bus adapter)"
);
}
}
if
(
irq
>
0
)
{
...
...
drivers/i2c/i2c-elv.c
View file @
0472fea5
...
...
@@ -88,34 +88,31 @@ static int bit_elv_getsda(void *data)
static
int
bit_elv_init
(
void
)
{
if
(
check_region
(
base
,(
base
==
0x3bc
)
?
3
:
8
)
<
0
)
{
if
(
!
request_region
(
base
,
(
base
==
0x3bc
)
?
3
:
8
,
"i2c (ELV adapter)"
))
return
-
ENODEV
;
}
else
{
/* test for ELV adap. */
if
(
inb
(
base
+
1
)
&
0x80
)
{
/* BUSY should be high */
DEBINIT
(
printk
(
KERN_DEBUG
"i2c-elv.o: Busy was low.
\n
"
));
return
-
ENODEV
;
}
else
{
goto
fail
;
}
outb
(
0x0c
,
base
+
2
);
/* SLCT auf low */
udelay
(
400
);
if
(
!
(
inb
(
base
+
1
)
&&
0x10
)
)
{
if
(
!
(
inb
(
base
+
1
)
&&
0x10
)
)
{
outb
(
0x04
,
base
+
2
);
DEBINIT
(
printk
(
KERN_DEBUG
"i2c-elv.o: Select was high.
\n
"
));
return
-
ENODEV
;
goto
fail
;
}
}
request_region
(
base
,(
base
==
0x3bc
)
?
3
:
8
,
"i2c (ELV adapter)"
);
PortData
=
0
;
bit_elv_setsda
((
void
*
)
base
,
1
);
bit_elv_setscl
((
void
*
)
base
,
1
);
}
return
0
;
}
static
void
__exit
bit_elv_exit
(
void
)
{
re
lease_region
(
base
,
(
base
==
0x3bc
)
?
3
:
8
)
;
fail:
release_region
(
base
,
(
base
==
0x3bc
)
?
3
:
8
);
re
turn
-
ENODEV
;
}
static
int
bit_elv_reg
(
struct
i2c_client
*
client
)
...
...
drivers/i2c/i2c-frodo.c
View file @
0472fea5
...
...
@@ -96,8 +96,6 @@ static int __init i2c_frodo_init (void)
return
(
i2c_bit_add_bus
(
&
frodo_ops
));
}
EXPORT_NO_SYMBOLS
;
static
void
__exit
i2c_frodo_exit
(
void
)
{
i2c_bit_del_bus
(
&
frodo_ops
);
...
...
@@ -105,12 +103,7 @@ static void __exit i2c_frodo_exit (void)
MODULE_AUTHOR
(
"Abraham van der Merwe <abraham@2d3d.co.za>"
);
MODULE_DESCRIPTION
(
"I2C-Bus adapter routines for Frodo"
);
#ifdef MODULE_LICENSE
MODULE_LICENSE
(
"GPL"
);
#endif
/* #ifdef MODULE_LICENSE */
EXPORT_NO_SYMBOLS
;
module_init
(
i2c_frodo_init
);
module_exit
(
i2c_frodo_exit
);
...
...
drivers/i2c/i2c-philips-par.c
View file @
0472fea5
...
...
@@ -297,14 +297,5 @@ MODULE_LICENSE("GPL");
MODULE_PARM
(
type
,
"i"
);
#ifdef MODULE
int
init_module
(
void
)
{
return
i2c_bitlp_init
();
}
void
cleanup_module
(
void
)
{
i2c_bitlp_exit
();
}
#endif
module_init
(
i2c_bitlp_init
);
module_exit
(
i2c_bitlp_exit
);
drivers/i2c/i2c-proc.c
View file @
0472fea5
...
...
@@ -648,6 +648,7 @@ int i2c_detect(struct i2c_adapter *adapter,
I2C_FUNC_SMBUS_QUICK
))
return
-
1
;
for
(
addr
=
0x00
;
addr
<=
(
is_isa
?
0xffff
:
0x7f
);
addr
++
)
{
/* XXX: WTF is going on here??? */
if
((
is_isa
&&
check_region
(
addr
,
1
))
||
(
!
is_isa
&&
i2c_check_addr
(
adapter
,
addr
)))
continue
;
...
...
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