Lines Matching refs:sio
76 struct f7188x_sio *sio; member
261 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_get_direction() local
264 err = superio_enter(sio->addr); in f7188x_gpio_get_direction()
267 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_get_direction()
269 dir = superio_inb(sio->addr, gpio_dir(bank->regbase)); in f7188x_gpio_get_direction()
271 superio_exit(sio->addr); in f7188x_gpio_get_direction()
283 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_direction_in() local
286 err = superio_enter(sio->addr); in f7188x_gpio_direction_in()
289 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_direction_in()
291 dir = superio_inb(sio->addr, gpio_dir(bank->regbase)); in f7188x_gpio_direction_in()
293 superio_outb(sio->addr, gpio_dir(bank->regbase), dir); in f7188x_gpio_direction_in()
295 superio_exit(sio->addr); in f7188x_gpio_direction_in()
304 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_get() local
307 err = superio_enter(sio->addr); in f7188x_gpio_get()
310 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_get()
312 dir = superio_inb(sio->addr, gpio_dir(bank->regbase)); in f7188x_gpio_get()
315 data = superio_inb(sio->addr, gpio_data_out(bank->regbase)); in f7188x_gpio_get()
317 data = superio_inb(sio->addr, gpio_data_in(bank->regbase)); in f7188x_gpio_get()
319 superio_exit(sio->addr); in f7188x_gpio_get()
329 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_direction_out() local
332 err = superio_enter(sio->addr); in f7188x_gpio_direction_out()
335 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_direction_out()
337 data_out = superio_inb(sio->addr, gpio_data_out(bank->regbase)); in f7188x_gpio_direction_out()
342 superio_outb(sio->addr, gpio_data_out(bank->regbase), data_out); in f7188x_gpio_direction_out()
344 dir = superio_inb(sio->addr, gpio_dir(bank->regbase)); in f7188x_gpio_direction_out()
346 superio_outb(sio->addr, gpio_dir(bank->regbase), dir); in f7188x_gpio_direction_out()
348 superio_exit(sio->addr); in f7188x_gpio_direction_out()
357 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_set() local
360 err = superio_enter(sio->addr); in f7188x_gpio_set()
363 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_set()
365 data_out = superio_inb(sio->addr, gpio_data_out(bank->regbase)); in f7188x_gpio_set()
370 superio_outb(sio->addr, gpio_data_out(bank->regbase), data_out); in f7188x_gpio_set()
372 superio_exit(sio->addr); in f7188x_gpio_set()
381 struct f7188x_sio *sio = bank->data->sio; in f7188x_gpio_set_config() local
388 err = superio_enter(sio->addr); in f7188x_gpio_set_config()
391 superio_select(sio->addr, SIO_LD_GPIO); in f7188x_gpio_set_config()
393 data = superio_inb(sio->addr, gpio_out_mode(bank->regbase)); in f7188x_gpio_set_config()
398 superio_outb(sio->addr, gpio_out_mode(bank->regbase), data); in f7188x_gpio_set_config()
400 superio_exit(sio->addr); in f7188x_gpio_set_config()
412 struct f7188x_sio *sio = dev_get_platdata(&pdev->dev); in f7188x_gpio_probe() local
419 switch (sio->type) { in f7188x_gpio_probe()
455 data->sio = sio; in f7188x_gpio_probe()
478 static int __init f7188x_find(int addr, struct f7188x_sio *sio) in f7188x_find() argument
497 sio->type = f71869; in f7188x_find()
500 sio->type = f71869a; in f7188x_find()
503 sio->type = f71882fg; in f7188x_find()
506 sio->type = f71889a; in f7188x_find()
509 sio->type = f71889f; in f7188x_find()
512 sio->type = f81866; in f7188x_find()
515 sio->type = f81804; in f7188x_find()
518 sio->type = f81865; in f7188x_find()
524 sio->addr = addr; in f7188x_find()
528 f7188x_names[sio->type], in f7188x_find()
540 f7188x_gpio_device_add(const struct f7188x_sio *sio) in f7188x_gpio_device_add() argument
549 sio, sizeof(*sio)); in f7188x_gpio_device_add()
585 struct f7188x_sio sio; in f7188x_gpio_init() local
587 if (f7188x_find(0x2e, &sio) && in f7188x_gpio_init()
588 f7188x_find(0x4e, &sio)) in f7188x_gpio_init()
593 err = f7188x_gpio_device_add(&sio); in f7188x_gpio_init()