Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  cs42xx8-i2c.c

  Sprache: C
 

/*
 * Cirrus Logic CS42448/CS42888 Audio CODEC DAI I2C driver
 *
 * Copyright (C) 2014 Freescale Semiconductor, Inc.
 *
 * Author: Nicolin Chen <Guangyu.Chen@freescale.com>
 *
 * This file is licensed under the terms of the GNU General Public License
 * version 2. This program is licensed "as is" without any warranty of any
 * kind, whether express or implied.
 */


#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/pm_runtime.h>
#include <sound/soc.h>

#include "cs42xx8.h"

static int cs42xx8_i2c_probe(struct i2c_client *i2c)
{
 int ret;
 struct cs42xx8_driver_data *drvdata;

 drvdata = (struct cs42xx8_driver_data *)i2c_get_match_data(i2c);
 if (!drvdata)
  return dev_err_probe(&i2c->dev, -EINVAL,
         "failed to find driver data\n");

 ret = cs42xx8_probe(&i2c->dev,
  devm_regmap_init_i2c(i2c, &cs42xx8_regmap_config), drvdata);
 if (ret)
  return ret;

 pm_runtime_enable(&i2c->dev);
 pm_request_idle(&i2c->dev);

 return 0;
}

static void cs42xx8_i2c_remove(struct i2c_client *i2c)
{
 pm_runtime_disable(&i2c->dev);
}

static const struct of_device_id cs42xx8_of_match[] = {
 { .compatible = "cirrus,cs42448", .data = &cs42448_data, },
 { .compatible = "cirrus,cs42888", .data = &cs42888_data, },
 { /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, cs42xx8_of_match);

static const struct i2c_device_id cs42xx8_i2c_id[] = {
 {"cs42448", (kernel_ulong_t)&cs42448_data},
 {"cs42888", (kernel_ulong_t)&cs42888_data},
 {}
};
MODULE_DEVICE_TABLE(i2c, cs42xx8_i2c_id);

static struct i2c_driver cs42xx8_i2c_driver = {
 .driver = {
  .name = "cs42xx8",
  .pm = pm_ptr(&cs42xx8_pm),
  .of_match_table = cs42xx8_of_match,
 },
 .probe = cs42xx8_i2c_probe,
 .remove = cs42xx8_i2c_remove,
 .id_table = cs42xx8_i2c_id,
};

module_i2c_driver(cs42xx8_i2c_driver);

MODULE_DESCRIPTION("Cirrus Logic CS42448/CS42888 ALSA SoC Codec I2C Driver");
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_LICENSE("GPL");

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

¤ Dauer der Verarbeitung: 0.13 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=752002