Lines Matching refs:gsbi
131 struct gsbi_info *gsbi; in gsbi_probe() local
136 gsbi = devm_kzalloc(&pdev->dev, sizeof(*gsbi), GFP_KERNEL); in gsbi_probe()
138 if (!gsbi) in gsbi_probe()
146 gsbi->tcsr = syscon_regmap_lookup_by_phandle(node, "syscon-tcsr"); in gsbi_probe()
148 if (!IS_ERR(gsbi->tcsr)) { in gsbi_probe()
171 if (of_property_read_u32(node, "qcom,mode", &gsbi->mode)) { in gsbi_probe()
177 of_property_read_u32(node, "qcom,crci", &gsbi->crci); in gsbi_probe()
180 gsbi->mode, gsbi->crci); in gsbi_probe()
181 gsbi->hclk = devm_clk_get_enabled(&pdev->dev, "iface"); in gsbi_probe()
182 if (IS_ERR(gsbi->hclk)) in gsbi_probe()
183 return PTR_ERR(gsbi->hclk); in gsbi_probe()
185 writel_relaxed((gsbi->mode << GSBI_PROTOCOL_SHIFT) | gsbi->crci, in gsbi_probe()
197 if (gsbi->mode == GSBI_PROT_SPI) in gsbi_probe()
198 regmap_update_bits(gsbi->tcsr, in gsbi_probe()
201 regmap_update_bits(gsbi->tcsr, in gsbi_probe()
210 platform_set_drvdata(pdev, gsbi); in gsbi_probe()
217 struct gsbi_info *gsbi = platform_get_drvdata(pdev); in gsbi_remove() local
219 clk_disable_unprepare(gsbi->hclk); in gsbi_remove()