Lines Matching refs:sio
66 struct f7188x_sio *sio; member
230 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_get_direction() local
233 err = superio_enter(sio->addr); in f7188x_gpio_get_direction()
236 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_get_direction()
238 dir = superio_inb(sio->addr, gpio_dir(bank->regbase)); in f7188x_gpio_get_direction()
240 superio_exit(sio->addr); in f7188x_gpio_get_direction()
249 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_direction_in() local
252 err = superio_enter(sio->addr); in f7188x_gpio_direction_in()
255 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_direction_in()
257 dir = superio_inb(sio->addr, gpio_dir(bank->regbase)); in f7188x_gpio_direction_in()
259 superio_outb(sio->addr, gpio_dir(bank->regbase), dir); in f7188x_gpio_direction_in()
261 superio_exit(sio->addr); in f7188x_gpio_direction_in()
270 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_get() local
273 err = superio_enter(sio->addr); in f7188x_gpio_get()
276 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_get()
278 dir = superio_inb(sio->addr, gpio_dir(bank->regbase)); in f7188x_gpio_get()
281 data = superio_inb(sio->addr, gpio_data_out(bank->regbase)); in f7188x_gpio_get()
283 data = superio_inb(sio->addr, gpio_data_in(bank->regbase)); in f7188x_gpio_get()
285 superio_exit(sio->addr); in f7188x_gpio_get()
295 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_direction_out() local
298 err = superio_enter(sio->addr); in f7188x_gpio_direction_out()
301 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_direction_out()
303 data_out = superio_inb(sio->addr, gpio_data_out(bank->regbase)); in f7188x_gpio_direction_out()
308 superio_outb(sio->addr, gpio_data_out(bank->regbase), data_out); in f7188x_gpio_direction_out()
310 dir = superio_inb(sio->addr, gpio_dir(bank->regbase)); in f7188x_gpio_direction_out()
312 superio_outb(sio->addr, gpio_dir(bank->regbase), dir); in f7188x_gpio_direction_out()
314 superio_exit(sio->addr); in f7188x_gpio_direction_out()
323 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_set() local
326 err = superio_enter(sio->addr); in f7188x_gpio_set()
329 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_set()
331 data_out = superio_inb(sio->addr, gpio_data_out(bank->regbase)); in f7188x_gpio_set()
336 superio_outb(sio->addr, gpio_data_out(bank->regbase), data_out); in f7188x_gpio_set()
338 superio_exit(sio->addr); in f7188x_gpio_set()
347 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_set_config() local
354 err = superio_enter(sio->addr); in f7188x_gpio_set_config()
357 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_set_config()
359 data = superio_inb(sio->addr, gpio_out_mode(bank->regbase)); in f7188x_gpio_set_config()
364 superio_outb(sio->addr, gpio_out_mode(bank->regbase), data); in f7188x_gpio_set_config()
366 superio_exit(sio->addr); in f7188x_gpio_set_config()
378 struct f7188x_sio *sio = dev_get_platdata(&pdev->dev); in f7188x_gpio_probe() local
385 switch (sio->type) { in f7188x_gpio_probe()
413 data->sio = sio; in f7188x_gpio_probe()
436 static int __init f7188x_find(int addr, struct f7188x_sio *sio) in f7188x_find() argument
455 sio->type = f71869; in f7188x_find()
458 sio->type = f71869a; in f7188x_find()
461 sio->type = f71882fg; in f7188x_find()
464 sio->type = f71889a; in f7188x_find()
467 sio->type = f71889f; in f7188x_find()
470 sio->type = f81866; in f7188x_find()
476 sio->addr = addr; in f7188x_find()
480 f7188x_names[sio->type], in f7188x_find()
492 f7188x_gpio_device_add(const struct f7188x_sio *sio) in f7188x_gpio_device_add() argument
501 sio, sizeof(*sio)); in f7188x_gpio_device_add()
537 struct f7188x_sio sio; in f7188x_gpio_init() local
539 if (f7188x_find(0x2e, &sio) && in f7188x_gpio_init()
540 f7188x_find(0x4e, &sio)) in f7188x_gpio_init()
545 err = f7188x_gpio_device_add(&sio); in f7188x_gpio_init()