Lines Matching refs:gen
33 #define rsnd_priv_to_gen(p) ((struct rsnd_gen *)(p)->gen)
34 #define rsnd_reg_name(gen, id) ((gen)->reg_name[id]) argument
62 struct rsnd_gen *gen, enum rsnd_reg reg) in rsnd_is_accessible_reg() argument
64 if (!gen->regs[reg]) { in rsnd_is_accessible_reg()
86 struct rsnd_gen *gen = rsnd_priv_to_gen(priv); in rsnd_mod_read() local
89 if (!rsnd_is_accessible_reg(priv, gen, reg)) in rsnd_mod_read()
92 regmap_fields_read(gen->regs[reg], rsnd_mod_id_cmd(mod), &val); in rsnd_mod_read()
96 rsnd_reg_name(gen, reg), reg, val); in rsnd_mod_read()
106 struct rsnd_gen *gen = rsnd_priv_to_gen(priv); in rsnd_mod_write() local
108 if (!rsnd_is_accessible_reg(priv, gen, reg)) in rsnd_mod_write()
111 regmap_fields_force_write(gen->regs[reg], rsnd_mod_id_cmd(mod), data); in rsnd_mod_write()
115 rsnd_reg_name(gen, reg), reg, data); in rsnd_mod_write()
123 struct rsnd_gen *gen = rsnd_priv_to_gen(priv); in rsnd_mod_bset() local
125 if (!rsnd_is_accessible_reg(priv, gen, reg)) in rsnd_mod_bset()
128 regmap_fields_force_update_bits(gen->regs[reg], in rsnd_mod_bset()
133 rsnd_reg_name(gen, reg), reg, data, mask); in rsnd_mod_bset()
139 struct rsnd_gen *gen = rsnd_priv_to_gen(priv); in rsnd_gen_get_phy_addr() local
141 return gen->res[reg_id]; in rsnd_gen_get_phy_addr()
147 struct rsnd_gen *gen = rsnd_priv_to_gen(priv); in rsnd_gen_get_base_addr() local
149 return gen->base[reg_id]; in rsnd_gen_get_base_addr()
163 struct rsnd_gen *gen = rsnd_priv_to_gen(priv); in _rsnd_gen_regmap_init() local
194 gen->base[reg_id] = base; in _rsnd_gen_regmap_init()
195 gen->regmap[reg_id] = regmap; in _rsnd_gen_regmap_init()
196 gen->res[reg_id] = res->start; in _rsnd_gen_regmap_init()
211 gen->regs[conf[i].idx] = regs; in _rsnd_gen_regmap_init()
212 gen->reg_name[conf[i].idx] = conf[i].reg_name; in _rsnd_gen_regmap_init()
472 struct rsnd_gen *gen; in rsnd_gen_probe() local
475 gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL); in rsnd_gen_probe()
476 if (!gen) in rsnd_gen_probe()
479 priv->gen = gen; in rsnd_gen_probe()