Commit 2bf34a1c authored by R.Marek@sh.cvut.cz's avatar R.Marek@sh.cvut.cz Committed by Greg Kroah-Hartman

[PATCH] I2C: documentation update 1/3

This patch just changes the extension of Documentation/i2c/chips/smsc47b397.txt
to none - to conform with naming in i2c subsystem directory.
Signed-off-by: default avatarRudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 72cd7995
...@@ -72,20 +72,20 @@ To program the configuration registers, the following sequence must be followed: ...@@ -72,20 +72,20 @@ To program the configuration registers, the following sequence must be followed:
Enter Configuration Mode Enter Configuration Mode
To place the chip into the Configuration State The config key (0x55) is written To place the chip into the Configuration State The config key (0x55) is written
to the CONFIG PORT (0x2E). to the CONFIG PORT (0x2E).
Configuration Mode Configuration Mode
In configuration mode, the INDEX PORT is located at the CONFIG PORT address and In configuration mode, the INDEX PORT is located at the CONFIG PORT address and
the DATA PORT is at INDEX PORT address + 1. the DATA PORT is at INDEX PORT address + 1.
The desired configuration registers are accessed in two steps: The desired configuration registers are accessed in two steps:
a. Write the index of the Logical Device Number Configuration Register a. Write the index of the Logical Device Number Configuration Register
(i.e., 0x07) to the INDEX PORT and then write the number of the (i.e., 0x07) to the INDEX PORT and then write the number of the
desired logical device to the DATA PORT. desired logical device to the DATA PORT.
b. Write the address of the desired configuration register within the b. Write the address of the desired configuration register within the
logical device to the INDEX PORT and then write or read the config- logical device to the INDEX PORT and then write or read the config-
uration register through the DATA PORT. uration register through the DATA PORT.
Note: If accessing the Global Configuration Registers, step (a) is not required. Note: If accessing the Global Configuration Registers, step (a) is not required.
...@@ -96,18 +96,18 @@ The chip returns to the RUN State. (This is important). ...@@ -96,18 +96,18 @@ The chip returns to the RUN State. (This is important).
Programming Example Programming Example
The following is an example of how to read the SIO Device ID located at 0x20 The following is an example of how to read the SIO Device ID located at 0x20
; ENTER CONFIGURATION MODE ; ENTER CONFIGURATION MODE
MOV DX,02EH MOV DX,02EH
MOV AX,055H MOV AX,055H
OUT DX,AL OUT DX,AL
; GLOBAL CONFIGURATION REGISTER ; GLOBAL CONFIGURATION REGISTER
MOV DX,02EH MOV DX,02EH
MOV AL,20H MOV AL,20H
OUT DX,AL OUT DX,AL
; READ THE DATA ; READ THE DATA
MOV DX,02FH MOV DX,02FH
IN AL,DX IN AL,DX
; EXIT CONFIGURATION MODE ; EXIT CONFIGURATION MODE
MOV DX,02EH MOV DX,02EH
MOV AX,0AAH MOV AX,0AAH
OUT DX,AL OUT DX,AL
...@@ -122,12 +122,12 @@ Obtaining the HWM Base Address. ...@@ -122,12 +122,12 @@ Obtaining the HWM Base Address.
The following is an example of how to read the HWM Base Address located in The following is an example of how to read the HWM Base Address located in
Logical Device 8. Logical Device 8.
; ENTER CONFIGURATION MODE ; ENTER CONFIGURATION MODE
MOV DX,02EH MOV DX,02EH
MOV AX,055H MOV AX,055H
OUT DX,AL OUT DX,AL
; CONFIGURE REGISTER CRE0, ; CONFIGURE REGISTER CRE0,
; LOGICAL DEVICE 8 ; LOGICAL DEVICE 8
MOV DX,02EH MOV DX,02EH
MOV AL,07H MOV AL,07H
OUT DX,AL ;Point to LD# Config Reg OUT DX,AL ;Point to LD# Config Reg
...@@ -135,12 +135,12 @@ MOV DX,02FH ...@@ -135,12 +135,12 @@ MOV DX,02FH
MOV AL, 08H MOV AL, 08H
OUT DX,AL;Point to Logical Device 8 OUT DX,AL;Point to Logical Device 8
; ;
MOV DX,02EH MOV DX,02EH
MOV AL,60H MOV AL,60H
OUT DX,AL ; Point to HWM Base Addr MSB OUT DX,AL ; Point to HWM Base Addr MSB
MOV DX,02FH MOV DX,02FH
IN AL,DX ; Get MSB of HWM Base Addr IN AL,DX ; Get MSB of HWM Base Addr
; EXIT CONFIGURATION MODE ; EXIT CONFIGURATION MODE
MOV DX,02EH MOV DX,02EH
MOV AX,0AAH MOV AX,0AAH
OUT DX,AL OUT DX,AL
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment