Lines Matching refs:sio

93 	struct f7188x_sio *sio;
292 struct f7188x_sio *sio = bank->data->sio;
295 err = superio_enter(sio->addr);
298 superio_select(sio->addr, sio->device);
300 dir = superio_inb(sio->addr, f7188x_gpio_dir(bank->regbase));
302 superio_exit(sio->addr);
304 if (f7188x_gpio_dir_invert(sio->type))
317 struct f7188x_sio *sio = bank->data->sio;
320 err = superio_enter(sio->addr);
323 superio_select(sio->addr, sio->device);
325 dir = superio_inb(sio->addr, f7188x_gpio_dir(bank->regbase));
327 if (f7188x_gpio_dir_invert(sio->type))
331 superio_outb(sio->addr, f7188x_gpio_dir(bank->regbase), dir);
333 superio_exit(sio->addr);
342 struct f7188x_sio *sio = bank->data->sio;
345 err = superio_enter(sio->addr);
348 superio_select(sio->addr, sio->device);
350 dir = superio_inb(sio->addr, f7188x_gpio_dir(bank->regbase));
352 if (f7188x_gpio_data_single(sio->type) || dir)
353 data = superio_inb(sio->addr, f7188x_gpio_data_out(bank->regbase));
355 data = superio_inb(sio->addr, f7188x_gpio_data_in(bank->regbase));
357 superio_exit(sio->addr);
367 struct f7188x_sio *sio = bank->data->sio;
370 err = superio_enter(sio->addr);
373 superio_select(sio->addr, sio->device);
375 data_out = superio_inb(sio->addr, f7188x_gpio_data_out(bank->regbase));
380 superio_outb(sio->addr, f7188x_gpio_data_out(bank->regbase), data_out);
382 dir = superio_inb(sio->addr, f7188x_gpio_dir(bank->regbase));
383 if (f7188x_gpio_dir_invert(sio->type))
387 superio_outb(sio->addr, f7188x_gpio_dir(bank->regbase), dir);
389 superio_exit(sio->addr);
398 struct f7188x_sio *sio = bank->data->sio;
401 err = superio_enter(sio->addr);
404 superio_select(sio->addr, sio->device);
406 data_out = superio_inb(sio->addr, f7188x_gpio_data_out(bank->regbase));
411 superio_outb(sio->addr, f7188x_gpio_data_out(bank->regbase), data_out);
413 superio_exit(sio->addr);
422 struct f7188x_sio *sio = bank->data->sio;
429 err = superio_enter(sio->addr);
432 superio_select(sio->addr, sio->device);
434 data = superio_inb(sio->addr, f7188x_gpio_out_mode(bank->regbase));
439 superio_outb(sio->addr, f7188x_gpio_out_mode(bank->regbase), data);
441 superio_exit(sio->addr);
453 struct f7188x_sio *sio = dev_get_platdata(&pdev->dev);
460 switch (sio->type) {
500 data->sio = sio;
523 static int __init f7188x_find(int addr, struct f7188x_sio *sio)
535 sio->device = SIO_LD_GPIO_FINTEK;
539 sio->type = f71869;
542 sio->type = f71869a;
545 sio->type = f71882fg;
548 sio->type = f71889a;
551 sio->type = f71889f;
554 sio->type = f81866;
557 sio->type = f81804;
560 sio->type = f81865;
563 sio->device = SIO_LD_GPIO_NUVOTON;
564 sio->type = nct6126d;
572 if (sio->type != nct6126d) {
580 sio->addr = addr;
583 pr_info("Found %s at %#x\n", f7188x_names[sio->type], (unsigned int)addr);
584 if (sio->type != nct6126d)
595 f7188x_gpio_device_add(const struct f7188x_sio *sio)
604 sio, sizeof(*sio));
640 struct f7188x_sio sio;
642 if (f7188x_find(0x2e, &sio) &&
643 f7188x_find(0x4e, &sio))
648 err = f7188x_gpio_device_add(&sio);