@@ -31,7 +31,9 @@ Declare the I2C devices via devicetree
3131On platforms using devicetree, the declaration of I2C devices is done in
3232subnodes of the master controller.
3333
34- Example::
34+ Example:
35+
36+ .. code-block :: dts
3537
3638 i2c1: i2c@400a0000 {
3739 /* ... master properties skipped ... */
@@ -71,7 +73,9 @@ code. Instantiating I2C devices via board files is done with an array of
7173struct i2c_board_info which is registered by calling
7274i2c_register_board_info().
7375
74- Example (from omap2 h4)::
76+ Example (from omap2 h4):
77+
78+ .. code-block :: c
7579
7680 static struct i2c_board_info h4_i2c_board_info[] __initdata = {
7781 {
@@ -111,7 +115,9 @@ bus in advance, so the method 1 described above can't be used. Instead,
111115you can instantiate your I2C devices explicitly. This is done by filling
112116a struct i2c_board_info and calling i2c_new_client_device().
113117
114- Example (from the sfe4001 network driver)::
118+ Example (from the sfe4001 network driver):
119+
120+ .. code-block :: c
115121
116122 static struct i2c_board_info sfe4001_hwmon_info = {
117123 I2C_BOARD_INFO("max6647", 0x4e),
@@ -136,7 +142,9 @@ it may have different addresses from one board to the next (manufacturer
136142changing its design without notice). In this case, you can call
137143i2c_new_scanned_device() instead of i2c_new_client_device().
138144
139- Example (from the nxp OHCI driver)::
145+ Example (from the nxp OHCI driver):
146+
147+ .. code-block :: c
140148
141149 static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
142150
0 commit comments