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


Quelle  wm8350-i2c.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * wm8350-i2c.c  --  Generic I2C driver for Wolfson WM8350 PMIC
 *
 * Copyright 2007, 2008 Wolfson Microelectronics PLC.
 *
 * Author: Liam Girdwood
 *         linux@wolfsonmicro.com
 */


#include <linux/err.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/mfd/wm8350/core.h>
#include <linux/regmap.h>
#include <linux/slab.h>

static int wm8350_i2c_probe(struct i2c_client *i2c)
{
 struct wm8350 *wm8350;
 struct wm8350_platform_data *pdata = dev_get_platdata(&i2c->dev);
 int ret = 0;

 wm8350 = devm_kzalloc(&i2c->dev, sizeof(struct wm8350), GFP_KERNEL);
 if (wm8350 == NULL)
  return -ENOMEM;

 wm8350->regmap = devm_regmap_init_i2c(i2c, &wm8350_regmap);
 if (IS_ERR(wm8350->regmap)) {
  ret = PTR_ERR(wm8350->regmap);
  dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
   ret);
  return ret;
 }

 i2c_set_clientdata(i2c, wm8350);
 wm8350->dev = &i2c->dev;

 return wm8350_device_init(wm8350, i2c->irq, pdata);
}

static const struct i2c_device_id wm8350_i2c_id[] = {
 { "wm8350" },
 { "wm8351" },
 { "wm8352" },
 { }
};

static struct i2c_driver wm8350_i2c_driver = {
 .driver = {
     .name = "wm8350",
     .suppress_bind_attrs = true,
 },
 .probe = wm8350_i2c_probe,
 .id_table = wm8350_i2c_id,
};

static int __init wm8350_i2c_init(void)
{
 return i2c_add_driver(&wm8350_i2c_driver);
}
/* init early so consumer devices can complete system boot */
subsys_initcall(wm8350_i2c_init);

Messung V0.5
C=94 H=92 G=92

¤ Dauer der Verarbeitung: 0.11 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