Lines Matching +full:spi +full:- +full:base
1 // SPDX-License-Identifier: GPL-2.0-only
3 // CS35L56 HDA audio driver SPI binding
10 #include <linux/spi/spi.h>
14 static int cs35l56_hda_spi_probe(struct spi_device *spi) in cs35l56_hda_spi_probe() argument
19 cs35l56 = devm_kzalloc(&spi->dev, sizeof(*cs35l56), GFP_KERNEL); in cs35l56_hda_spi_probe()
21 return -ENOMEM; in cs35l56_hda_spi_probe()
23 cs35l56->base.dev = &spi->dev; in cs35l56_hda_spi_probe()
26 cs35l56->base.can_hibernate = true; in cs35l56_hda_spi_probe()
28 cs35l56->base.regmap = devm_regmap_init_spi(spi, &cs35l56_regmap_spi); in cs35l56_hda_spi_probe()
29 if (IS_ERR(cs35l56->base.regmap)) { in cs35l56_hda_spi_probe()
30 ret = PTR_ERR(cs35l56->base.regmap); in cs35l56_hda_spi_probe()
31 dev_err(cs35l56->base.dev, "Failed to allocate register map: %d\n", in cs35l56_hda_spi_probe()
36 ret = cs35l56_hda_common_probe(cs35l56, spi_get_chipselect(spi, 0)); in cs35l56_hda_spi_probe()
39 ret = cs35l56_irq_request(&cs35l56->base, spi->irq); in cs35l56_hda_spi_probe()
41 cs35l56_hda_remove(cs35l56->base.dev); in cs35l56_hda_spi_probe()
46 static void cs35l56_hda_spi_remove(struct spi_device *spi) in cs35l56_hda_spi_remove() argument
48 cs35l56_hda_remove(&spi->dev); in cs35l56_hda_spi_remove()
52 { "cs35l56-hda", 0 },
58 .name = "cs35l56-hda",
67 MODULE_DESCRIPTION("HDA CS35L56 SPI driver");