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


Quelle  cs530x-i2c.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0
//
// CS530x CODEC driver
//
// Copyright (C) 2024 Cirrus Logic, Inc. and
//                    Cirrus Logic International Semiconductor Ltd.

#include <linux/device.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/regmap.h>

#include "cs530x.h"

static const struct of_device_id cs530x_of_match[] = {
 {
  .compatible = "cirrus,cs5302",
  .data = (void *)CS5302,
 }, {
  .compatible = "cirrus,cs5304",
  .data = (void *)CS5304,
 }, {
  .compatible = "cirrus,cs5308",
  .data = (void *)CS5308,
 },
 {}
};
MODULE_DEVICE_TABLE(of, cs530x_of_match);

static const struct i2c_device_id cs530x_i2c_id[] = {
 { "cs5302", CS5302 },
 { "cs5304", CS5304 },
 { "cs5308", CS5308 },
 { }
};
MODULE_DEVICE_TABLE(i2c, cs530x_i2c_id);

static int cs530x_i2c_probe(struct i2c_client *client)
{
 struct cs530x_priv *cs530x;

 cs530x = devm_kzalloc(&client->dev, sizeof(*cs530x), GFP_KERNEL);
 if (!cs530x)
  return -ENOMEM;

 i2c_set_clientdata(client, cs530x);

 cs530x->regmap = devm_regmap_init_i2c(client, &cs530x_regmap);
 if (IS_ERR(cs530x->regmap))
  return dev_err_probe(&client->dev, PTR_ERR(cs530x->regmap),
         "Failed to allocate register map\n");

 cs530x->devtype = (uintptr_t)i2c_get_match_data(client);
 cs530x->dev = &client->dev;

 return cs530x_probe(cs530x);
}

static struct i2c_driver cs530x_i2c_driver = {
 .driver = {
  .name = "cs530x",
  .of_match_table = cs530x_of_match,
 },
 .probe = cs530x_i2c_probe,
 .id_table = cs530x_i2c_id,
};
module_i2c_driver(cs530x_i2c_driver);

MODULE_DESCRIPTION("I2C CS530X driver");
MODULE_IMPORT_NS("SND_SOC_CS530X");
MODULE_AUTHOR("Paul Handrigan, Cirrus Logic Inc, ");
MODULE_LICENSE("GPL");

Messung V0.5
C=95 H=97 G=95

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge