Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  bmi160_spi.c

  Sprache: C
 

// SPDX-License-Identifier: GPL-2.0
/*
 * BMI160 - Bosch IMU, SPI bits
 *
 * Copyright (c) 2016, Intel Corporation.
 *
 */

#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>

#include "bmi160.h"

static int bmi160_spi_probe(struct spi_device *spi)
{
 struct regmap *regmap;
 const struct spi_device_id *id = spi_get_device_id(spi);
 const char *name;

 regmap = devm_regmap_init_spi(spi, &bmi160_regmap_config);
 if (IS_ERR(regmap)) {
  dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
   regmap);
  return PTR_ERR(regmap);
 }

 if (id)
  name = id->name;
 else
  name = dev_name(&spi->dev);

 return bmi160_core_probe(&spi->dev, regmap, name, true);
}

static const struct spi_device_id bmi160_spi_id[] = {
 {"bmi120"0},
 {"bmi160"0},
 { }
};
MODULE_DEVICE_TABLE(spi, bmi160_spi_id);

static const struct acpi_device_id bmi160_acpi_match[] = {
 {"BMI0120"0},
 {"BMI0160"0},
 { }
};
MODULE_DEVICE_TABLE(acpi, bmi160_acpi_match);

static const struct of_device_id bmi160_of_match[] = {
 { .compatible = "bosch,bmi120" },
 { .compatible = "bosch,bmi160" },
 { }
};
MODULE_DEVICE_TABLE(of, bmi160_of_match);

static struct spi_driver bmi160_spi_driver = {
 .probe  = bmi160_spi_probe,
 .id_table = bmi160_spi_id,
 .driver = {
  .acpi_match_table = bmi160_acpi_match,
  .of_match_table  = bmi160_of_match,
  .name   = "bmi160_spi",
  .pm   = pm_ptr(&bmi160_core_pm_ops),
 },
};
module_spi_driver(bmi160_spi_driver);

MODULE_AUTHOR("Daniel Baluta <daniel.baluta@intel.com");
MODULE_DESCRIPTION("Bosch BMI160 SPI driver");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS("IIO_BMI160");

Messung V0.5 in Prozent
C=95 H=95 G=94

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=655579