Lines Matching full:gs

388 	struct tegra_hte_soc *gs;  in tegra_hte_line_xlate()  local
405 gs = gc->data; in tegra_hte_line_xlate()
406 if (!gs || !gs->prov_data) in tegra_hte_line_xlate()
423 if (gs->prov_data->type == HTE_TEGRA_TYPE_GPIO && !args) { in tegra_hte_line_xlate()
424 line_id = desc->attr.line_id - gpio_device_get_base(gs->gdev); in tegra_hte_line_xlate()
425 map = gs->prov_data->map; in tegra_hte_line_xlate()
426 map_sz = gs->prov_data->map_sz; in tegra_hte_line_xlate()
427 } else if (gs->prov_data->type == HTE_TEGRA_TYPE_GPIO && args) { in tegra_hte_line_xlate()
429 map = gs->prov_data->sec_map; in tegra_hte_line_xlate()
430 map_sz = gs->prov_data->sec_map_sz; in tegra_hte_line_xlate()
460 struct tegra_hte_soc *gs; in tegra_hte_en_dis_common() local
467 gs = chip->data; in tegra_hte_en_dis_common()
480 spin_lock(&gs->sl[slice].s_lock); in tegra_hte_en_dis_common()
482 if (test_bit(HTE_SUSPEND, &gs->sl[slice].flags)) { in tegra_hte_en_dis_common()
483 spin_unlock(&gs->sl[slice].s_lock); in tegra_hte_en_dis_common()
488 val = tegra_hte_readl(gs, reg); in tegra_hte_en_dis_common()
493 tegra_hte_writel(gs, reg, val); in tegra_hte_en_dis_common()
495 spin_unlock(&gs->sl[slice].s_lock); in tegra_hte_en_dis_common()
523 struct tegra_hte_soc *gs; in tegra_hte_request() local
529 gs = chip->data; in tegra_hte_request()
532 if (gs->prov_data->type == HTE_TEGRA_TYPE_GPIO) { in tegra_hte_request()
541 gs->line_data[line_id].data = attr->line_data; in tegra_hte_request()
542 gs->line_data[line_id].flags = attr->edge_flags; in tegra_hte_request()
551 struct tegra_hte_soc *gs; in tegra_hte_release() local
558 gs = chip->data; in tegra_hte_release()
561 if (gs->prov_data->type == HTE_TEGRA_TYPE_GPIO) { in tegra_hte_release()
563 gs->line_data[line_id].flags); in tegra_hte_release()
567 gs->line_data[line_id].data = NULL; in tegra_hte_release()
568 gs->line_data[line_id].flags = 0; in tegra_hte_release()
588 static int tegra_hte_get_level(struct tegra_hte_soc *gs, u32 line_id) in tegra_hte_get_level() argument
592 if (gs->prov_data->type == HTE_TEGRA_TYPE_GPIO) { in tegra_hte_get_level()
593 desc = gs->line_data[line_id].data; in tegra_hte_get_level()
601 static void tegra_hte_read_fifo(struct tegra_hte_soc *gs) in tegra_hte_read_fifo() argument
607 while ((tegra_hte_readl(gs, HTE_TESTATUS) >> in tegra_hte_read_fifo()
610 tsh = tegra_hte_readl(gs, HTE_TETSCH); in tegra_hte_read_fifo()
611 tsl = tegra_hte_readl(gs, HTE_TETSCL); in tegra_hte_read_fifo()
614 src = tegra_hte_readl(gs, HTE_TESRC); in tegra_hte_read_fifo()
618 pv = tegra_hte_readl(gs, HTE_TEPCV); in tegra_hte_read_fifo()
619 cv = tegra_hte_readl(gs, HTE_TECCV); in tegra_hte_read_fifo()
625 el.raw_level = tegra_hte_get_level(gs, line_id); in tegra_hte_read_fifo()
626 hte_push_ts_ns(gs->chip, line_id, &el); in tegra_hte_read_fifo()
629 tegra_hte_writel(gs, HTE_TECMD, HTE_TECMD_CMD_POP); in tegra_hte_read_fifo()
635 struct tegra_hte_soc *gs = dev_id; in tegra_hte_isr() local
638 tegra_hte_read_fifo(gs); in tegra_hte_isr()
674 struct tegra_hte_soc *gs = dev_get_drvdata(&pdev->dev); in tegra_gte_disable() local
676 tegra_hte_writel(gs, HTE_TECTRL, 0); in tegra_gte_disable()
818 struct tegra_hte_soc *gs = dev_get_drvdata(dev); in tegra_hte_resume_early() local
819 u32 slices = gs->chip->nlines / NV_LINES_IN_SLICE; in tegra_hte_resume_early()
822 tegra_hte_writel(gs, HTE_TECTRL, gs->conf_rval); in tegra_hte_resume_early()
825 spin_lock(&gs->sl[i].s_lock); in tegra_hte_resume_early()
826 tegra_hte_writel(gs, in tegra_hte_resume_early()
828 gs->sl[i].r_val); in tegra_hte_resume_early()
829 clear_bit(HTE_SUSPEND, &gs->sl[i].flags); in tegra_hte_resume_early()
830 spin_unlock(&gs->sl[i].s_lock); in tegra_hte_resume_early()
839 struct tegra_hte_soc *gs = dev_get_drvdata(dev); in tegra_hte_suspend_late() local
840 u32 slices = gs->chip->nlines / NV_LINES_IN_SLICE; in tegra_hte_suspend_late()
843 gs->conf_rval = tegra_hte_readl(gs, HTE_TECTRL); in tegra_hte_suspend_late()
845 spin_lock(&gs->sl[i].s_lock); in tegra_hte_suspend_late()
846 gs->sl[i].r_val = tegra_hte_readl(gs, in tegra_hte_suspend_late()
848 set_bit(HTE_SUSPEND, &gs->sl[i].flags); in tegra_hte_suspend_late()
849 spin_unlock(&gs->sl[i].s_lock); in tegra_hte_suspend_late()