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(&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 clk_prepare_enable(gsbi->hclk); in gsbi_probe()
187 writel_relaxed((gsbi->mode << GSBI_PROTOCOL_SHIFT) | gsbi->crci, in gsbi_probe()
199 if (gsbi->mode == GSBI_PROT_SPI) in gsbi_probe()
200 regmap_update_bits(gsbi->tcsr, in gsbi_probe()
203 regmap_update_bits(gsbi->tcsr, in gsbi_probe()
212 platform_set_drvdata(pdev, gsbi); in gsbi_probe()
216 clk_disable_unprepare(gsbi->hclk); in gsbi_probe()
222 struct gsbi_info *gsbi = platform_get_drvdata(pdev); in gsbi_remove() local
224 clk_disable_unprepare(gsbi->hclk); in gsbi_remove()