Lines Matching +full:spi +full:- +full:based
1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8731.c -- WM8731 ALSA SoC Audio driver
6 * Copyright 2006-12 Wolfson Microelectronics, plc
10 * Based on wm8753.c by Liam Girdwood
13 #include <linux/spi/spi.h>
25 static int wm8731_spi_probe(struct spi_device *spi) in wm8731_spi_probe() argument
30 wm8731 = devm_kzalloc(&spi->dev, sizeof(*wm8731), GFP_KERNEL); in wm8731_spi_probe()
32 return -ENOMEM; in wm8731_spi_probe()
34 spi_set_drvdata(spi, wm8731); in wm8731_spi_probe()
36 wm8731->regmap = devm_regmap_init_spi(spi, &wm8731_regmap); in wm8731_spi_probe()
37 if (IS_ERR(wm8731->regmap)) { in wm8731_spi_probe()
38 ret = PTR_ERR(wm8731->regmap); in wm8731_spi_probe()
39 dev_err(&spi->dev, "Failed to allocate register map: %d\n", in wm8731_spi_probe()
44 return wm8731_init(&spi->dev, wm8731); in wm8731_spi_probe()
57 MODULE_DESCRIPTION("ASoC WM8731 driver - SPI");