Lines Matching refs:socket

128 #define rl_misc(socket)		((socket)->private[0])
129 #define rl_ctl(socket) ((socket)->private[1])
130 #define rl_io(socket) ((socket)->private[2])
131 #define rl_mem(socket) ((socket)->private[3])
132 #define rl_config(socket) ((socket)->private[4])
137 struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
139 reg = config_readb(socket, RL5C4XX_MISC_CONTROL);
146 config_writeb(socket, RL5C4XX_MISC_CONTROL, reg);
149 static void ricoh_set_zv(struct yenta_socket *socket)
151 if(socket->dev->vendor == PCI_VENDOR_ID_RICOH)
153 switch(socket->dev->device)
157 socket->socket.zoom_video = ricoh_zoom_video;
163 static void ricoh_set_clkrun(struct yenta_socket *socket, bool quiet)
171 if (socket->dev->device != PCI_DEVICE_ID_RICOH_RL5C476 &&
172 socket->dev->device != PCI_DEVICE_ID_RICOH_RL5C478)
175 if (socket->dev->revision < 0x80)
178 misc3 = config_readw(socket, RL5C4XX_MISC3);
181 dev_dbg(&socket->dev->dev,
185 dev_info(&socket->dev->dev,
188 config_writew(socket, RL5C4XX_MISC3, misc3);
192 static void ricoh_save_state(struct yenta_socket *socket)
194 rl_misc(socket) = config_readw(socket, RL5C4XX_MISC);
195 rl_ctl(socket) = config_readw(socket, RL5C4XX_16BIT_CTL);
196 rl_io(socket) = config_readw(socket, RL5C4XX_16BIT_IO_0);
197 rl_mem(socket) = config_readw(socket, RL5C4XX_16BIT_MEM_0);
198 rl_config(socket) = config_readw(socket, RL5C4XX_CONFIG);
201 static void ricoh_restore_state(struct yenta_socket *socket)
203 config_writew(socket, RL5C4XX_MISC, rl_misc(socket));
204 config_writew(socket, RL5C4XX_16BIT_CTL, rl_ctl(socket));
205 config_writew(socket, RL5C4XX_16BIT_IO_0, rl_io(socket));
206 config_writew(socket, RL5C4XX_16BIT_MEM_0, rl_mem(socket));
207 config_writew(socket, RL5C4XX_CONFIG, rl_config(socket));
208 ricoh_set_clkrun(socket, true);
215 static int ricoh_override(struct yenta_socket *socket)
219 config = config_readw(socket, RL5C4XX_CONFIG);
224 if(socket->dev->device < PCI_DEVICE_ID_RICOH_RL5C475) {
230 config_writew(socket, RL5C4XX_16BIT_CTL, ctl);
231 config_writew(socket, RL5C4XX_CONFIG, config);
233 ricoh_set_zv(socket);
234 ricoh_set_clkrun(socket, false);