Lines Matching +full:spi +full:- +full:based
1 // SPDX-License-Identifier: GPL-2.0-only
3 * SPI access driver for TI TPS65912x PMICs
5 * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/
8 * Based on the TPS65218 driver and the previous TPS65912 driver by
14 #include <linux/spi/spi.h>
24 static int tps65912_spi_probe(struct spi_device *spi) in tps65912_spi_probe() argument
28 tps = devm_kzalloc(&spi->dev, sizeof(*tps), GFP_KERNEL); in tps65912_spi_probe()
30 return -ENOMEM; in tps65912_spi_probe()
32 spi_set_drvdata(spi, tps); in tps65912_spi_probe()
33 tps->dev = &spi->dev; in tps65912_spi_probe()
34 tps->irq = spi->irq; in tps65912_spi_probe()
36 tps->regmap = devm_regmap_init_spi(spi, &tps65912_regmap_config); in tps65912_spi_probe()
37 if (IS_ERR(tps->regmap)) { in tps65912_spi_probe()
38 dev_err(tps->dev, "Failed to initialize register map\n"); in tps65912_spi_probe()
39 return PTR_ERR(tps->regmap); in tps65912_spi_probe()
49 MODULE_DEVICE_TABLE(spi, tps65912_spi_id_table);
62 MODULE_DESCRIPTION("TPS65912x SPI Interface Driver");