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
16 const struct spi_device_id *id = spi_get_device_id(spi); in cs35l56_hda_spi_probe()
20 cs35l56 = devm_kzalloc(&spi->dev, sizeof(*cs35l56), GFP_KERNEL); in cs35l56_hda_spi_probe()
22 return -ENOMEM; in cs35l56_hda_spi_probe()
24 cs35l56->base.dev = &spi->dev; in cs35l56_hda_spi_probe()
25 ret = cs35l56_init_config_for_spi(&cs35l56->base, spi); in cs35l56_hda_spi_probe()
30 cs35l56->base.can_hibernate = true; in cs35l56_hda_spi_probe()
32 cs35l56->base.regmap = devm_regmap_init_spi(spi, &cs35l56_regmap_spi); in cs35l56_hda_spi_probe()
33 if (IS_ERR(cs35l56->base.regmap)) { in cs35l56_hda_spi_probe()
34 ret = PTR_ERR(cs35l56->base.regmap); in cs35l56_hda_spi_probe()
35 dev_err(cs35l56->base.dev, "Failed to allocate register map: %d\n", in cs35l56_hda_spi_probe()
40 ret = cs35l56_hda_common_probe(cs35l56, id->driver_data, spi_get_chipselect(spi, 0)); in cs35l56_hda_spi_probe()
43 ret = cs35l56_irq_request(&cs35l56->base, spi->irq); in cs35l56_hda_spi_probe()
45 cs35l56_hda_remove(cs35l56->base.dev); in cs35l56_hda_spi_probe()
50 static void cs35l56_hda_spi_remove(struct spi_device *spi) in cs35l56_hda_spi_remove() argument
52 cs35l56_hda_remove(&spi->dev); in cs35l56_hda_spi_remove()
56 { "cs35l54-hda", 0x3554 },
57 { "cs35l56-hda", 0x3556 },
58 { "cs35l57-hda", 0x3557 },
72 .name = "cs35l56-hda",
82 MODULE_DESCRIPTION("HDA CS35L56 SPI driver");