Lines Matching refs:g

461 		       struct r9a06g032_gate *g, int on)  in r9a06g032_clk_gate_set()  argument
465 WARN_ON(!g->gate); in r9a06g032_clk_gate_set()
468 clk_rdesc_set(clocks, g->gate, on); in r9a06g032_clk_gate_set()
470 if (g->reset) in r9a06g032_clk_gate_set()
471 clk_rdesc_set(clocks, g->reset, 1); in r9a06g032_clk_gate_set()
481 if (g->ready || g->midle) { in r9a06g032_clk_gate_set()
483 if (g->ready) in r9a06g032_clk_gate_set()
484 clk_rdesc_set(clocks, g->ready, on); in r9a06g032_clk_gate_set()
486 if (g->midle) in r9a06g032_clk_gate_set()
487 clk_rdesc_set(clocks, g->midle, !on); in r9a06g032_clk_gate_set()
495 struct r9a06g032_clk_gate *g = to_r9a06g032_gate(hw); in r9a06g032_clk_gate_enable() local
497 r9a06g032_clk_gate_set(g->clocks, &g->gate, 1); in r9a06g032_clk_gate_enable()
503 struct r9a06g032_clk_gate *g = to_r9a06g032_gate(hw); in r9a06g032_clk_gate_disable() local
505 r9a06g032_clk_gate_set(g->clocks, &g->gate, 0); in r9a06g032_clk_gate_disable()
510 struct r9a06g032_clk_gate *g = to_r9a06g032_gate(hw); in r9a06g032_clk_gate_is_enabled() local
513 if (g->gate.reset && !clk_rdesc_get(g->clocks, g->gate.reset)) in r9a06g032_clk_gate_is_enabled()
516 return clk_rdesc_get(g->clocks, g->gate.gate); in r9a06g032_clk_gate_is_enabled()
531 struct r9a06g032_clk_gate *g; in r9a06g032_register_gate() local
534 g = kzalloc(sizeof(*g), GFP_KERNEL); in r9a06g032_register_gate()
535 if (!g) in r9a06g032_register_gate()
544 g->clocks = clocks; in r9a06g032_register_gate()
545 g->index = desc->index; in r9a06g032_register_gate()
546 g->gate = desc->gate; in r9a06g032_register_gate()
547 g->hw.init = &init; in r9a06g032_register_gate()
554 if (r9a06g032_clk_gate_is_enabled(&g->hw)) { in r9a06g032_register_gate()
559 clk = clk_register(NULL, &g->hw); in r9a06g032_register_gate()
561 kfree(g); in r9a06g032_register_gate()
786 struct r9a06g032_clk_bitsel *g; in r9a06g032_register_bitsel() local
791 g = kzalloc(sizeof(*g), GFP_KERNEL); in r9a06g032_register_bitsel()
792 if (!g) in r9a06g032_register_bitsel()
804 g->clocks = clocks; in r9a06g032_register_bitsel()
805 g->index = desc->index; in r9a06g032_register_bitsel()
806 g->selector = desc->dual.sel; in r9a06g032_register_bitsel()
807 g->hw.init = &init; in r9a06g032_register_bitsel()
809 clk = clk_register(NULL, &g->hw); in r9a06g032_register_bitsel()
811 kfree(g); in r9a06g032_register_bitsel()
829 r9a06g032_clk_dualgate_setenable(struct r9a06g032_clk_dualgate *g, int enable) in r9a06g032_clk_dualgate_setenable() argument
831 u8 sel_bit = clk_rdesc_get(g->clocks, g->selector); in r9a06g032_clk_dualgate_setenable()
834 r9a06g032_clk_gate_set(g->clocks, &g->gate[!sel_bit], 0); in r9a06g032_clk_dualgate_setenable()
835 r9a06g032_clk_gate_set(g->clocks, &g->gate[sel_bit], enable); in r9a06g032_clk_dualgate_setenable()
858 struct r9a06g032_clk_dualgate *g = to_clk_dualgate(hw); in r9a06g032_clk_dualgate_is_enabled() local
859 u8 sel_bit = clk_rdesc_get(g->clocks, g->selector); in r9a06g032_clk_dualgate_is_enabled()
861 return clk_rdesc_get(g->clocks, g->gate[sel_bit].gate); in r9a06g032_clk_dualgate_is_enabled()
876 struct r9a06g032_clk_dualgate *g; in r9a06g032_register_dualgate() local
881 g = kzalloc(sizeof(*g), GFP_KERNEL); in r9a06g032_register_dualgate()
882 if (!g) in r9a06g032_register_dualgate()
884 g->clocks = clocks; in r9a06g032_register_dualgate()
885 g->index = desc->index; in r9a06g032_register_dualgate()
886 g->selector = sel; in r9a06g032_register_dualgate()
887 g->gate[0].gate = desc->dual.g1; in r9a06g032_register_dualgate()
888 g->gate[0].reset = desc->dual.r1; in r9a06g032_register_dualgate()
889 g->gate[1].gate = desc->dual.g2; in r9a06g032_register_dualgate()
890 g->gate[1].reset = desc->dual.r2; in r9a06g032_register_dualgate()
897 g->hw.init = &init; in r9a06g032_register_dualgate()
903 if (r9a06g032_clk_dualgate_is_enabled(&g->hw)) { in r9a06g032_register_dualgate()
908 clk = clk_register(NULL, &g->hw); in r9a06g032_register_dualgate()
910 kfree(g); in r9a06g032_register_dualgate()