Lines Matching refs:jz4740_codec
74 struct jz4740_codec {
82 static inline struct jz4740_codec *codec_to_jz4740(struct snd_soc_codec *codec)
84 return container_of(codec, struct jz4740_codec, codec);
90 struct jz4740_codec *jz4740_codec = codec_to_jz4740(codec);
91 return readl(jz4740_codec->base + (reg << 2));
97 struct jz4740_codec *jz4740_codec = codec_to_jz4740(codec);
99 jz4740_codec->reg_cache[reg] = val;
100 writel(val, jz4740_codec->base + (reg << 2));
381 struct jz4740_codec *jz4740_codec;
385 jz4740_codec = kzalloc(sizeof(*jz4740_codec), GFP_KERNEL);
386 if (!jz4740_codec)
403 jz4740_codec->base = ioremap(mem->start, resource_size(mem));
404 if (!jz4740_codec->base) {
409 jz4740_codec->mem = mem;
413 codec = &jz4740_codec->codec;
427 codec->reg_cache = jz4740_codec->reg_cache;
440 platform_set_drvdata(pdev, jz4740_codec);
461 iounmap(jz4740_codec->base);
465 kfree(jz4740_codec);
472 struct jz4740_codec *jz4740_codec = platform_get_drvdata(pdev);
473 struct resource *mem = jz4740_codec->mem;
476 snd_soc_unregister_codec(&jz4740_codec->codec);
478 iounmap(jz4740_codec->base);
482 kfree(jz4740_codec);