~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/pci/hda/cs35l56_hda_i2c.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/pci/hda/cs35l56_hda_i2c.c (Version linux-6.12-rc7) and /sound/pci/hda/cs35l56_hda_i2c.c (Version linux-6.10.14)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 // SPDX-License-Identifier: GPL-2.0-only
  2 //                                                  2 //
  3 // CS35L56 HDA audio driver I2C binding             3 // CS35L56 HDA audio driver I2C binding
  4 //                                                  4 //
  5 // Copyright (C) 2023 Cirrus Logic, Inc. and        5 // Copyright (C) 2023 Cirrus Logic, Inc. and
  6 //                    Cirrus Logic Internation      6 //                    Cirrus Logic International Semiconductor Ltd.
  7                                                     7 
  8 #include <linux/i2c.h>                              8 #include <linux/i2c.h>
  9 #include <linux/module.h>                           9 #include <linux/module.h>
 10 #include <linux/regmap.h>                          10 #include <linux/regmap.h>
 11                                                    11 
 12 #include "cs35l56_hda.h"                           12 #include "cs35l56_hda.h"
 13                                                    13 
 14 static int cs35l56_hda_i2c_probe(struct i2c_cl     14 static int cs35l56_hda_i2c_probe(struct i2c_client *clt)
 15 {                                                  15 {
 16         const struct i2c_device_id *id = i2c_c     16         const struct i2c_device_id *id = i2c_client_get_device_id(clt);
 17         struct cs35l56_hda *cs35l56;               17         struct cs35l56_hda *cs35l56;
 18         int ret;                                   18         int ret;
 19                                                    19 
 20         cs35l56 = devm_kzalloc(&clt->dev, size     20         cs35l56 = devm_kzalloc(&clt->dev, sizeof(*cs35l56), GFP_KERNEL);
 21         if (!cs35l56)                              21         if (!cs35l56)
 22                 return -ENOMEM;                    22                 return -ENOMEM;
 23                                                    23 
 24         cs35l56->base.dev = &clt->dev;             24         cs35l56->base.dev = &clt->dev;
 25                                                    25 
 26 #ifdef CS35L56_WAKE_HOLD_TIME_US                   26 #ifdef CS35L56_WAKE_HOLD_TIME_US
 27         cs35l56->base.can_hibernate = true;        27         cs35l56->base.can_hibernate = true;
 28 #endif                                             28 #endif
 29         cs35l56->base.regmap = devm_regmap_ini     29         cs35l56->base.regmap = devm_regmap_init_i2c(clt, &cs35l56_regmap_i2c);
 30         if (IS_ERR(cs35l56->base.regmap)) {        30         if (IS_ERR(cs35l56->base.regmap)) {
 31                 ret = PTR_ERR(cs35l56->base.re     31                 ret = PTR_ERR(cs35l56->base.regmap);
 32                 dev_err(cs35l56->base.dev, "Fa     32                 dev_err(cs35l56->base.dev, "Failed to allocate register map: %d\n",
 33                         ret);                      33                         ret);
 34                 return ret;                        34                 return ret;
 35         }                                          35         }
 36                                                    36 
 37         ret = cs35l56_hda_common_probe(cs35l56     37         ret = cs35l56_hda_common_probe(cs35l56, id->driver_data, clt->addr);
 38         if (ret)                                   38         if (ret)
 39                 return ret;                        39                 return ret;
 40         ret = cs35l56_irq_request(&cs35l56->ba     40         ret = cs35l56_irq_request(&cs35l56->base, clt->irq);
 41         if (ret < 0)                               41         if (ret < 0)
 42                 cs35l56_hda_remove(cs35l56->ba     42                 cs35l56_hda_remove(cs35l56->base.dev);
 43                                                    43 
 44         return ret;                                44         return ret;
 45 }                                                  45 }
 46                                                    46 
 47 static void cs35l56_hda_i2c_remove(struct i2c_     47 static void cs35l56_hda_i2c_remove(struct i2c_client *clt)
 48 {                                                  48 {
 49         cs35l56_hda_remove(&clt->dev);             49         cs35l56_hda_remove(&clt->dev);
 50 }                                                  50 }
 51                                                    51 
 52 static const struct i2c_device_id cs35l56_hda_     52 static const struct i2c_device_id cs35l56_hda_i2c_id[] = {
 53         { "cs35l54-hda", 0x3554 },                 53         { "cs35l54-hda", 0x3554 },
 54         { "cs35l56-hda", 0x3556 },                 54         { "cs35l56-hda", 0x3556 },
 55         { "cs35l57-hda", 0x3557 },                 55         { "cs35l57-hda", 0x3557 },
 56         {}                                         56         {}
 57 };                                                 57 };
 58                                                    58 
 59 static const struct acpi_device_id cs35l56_acp     59 static const struct acpi_device_id cs35l56_acpi_hda_match[] = {
 60         { "CSC3554", 0 },                          60         { "CSC3554", 0 },
 61         { "CSC3556", 0 },                          61         { "CSC3556", 0 },
 62         { "CSC3557", 0 },                          62         { "CSC3557", 0 },
 63         {}                                         63         {}
 64 };                                                 64 };
 65 MODULE_DEVICE_TABLE(acpi, cs35l56_acpi_hda_mat     65 MODULE_DEVICE_TABLE(acpi, cs35l56_acpi_hda_match);
 66                                                    66 
 67 static struct i2c_driver cs35l56_hda_i2c_drive     67 static struct i2c_driver cs35l56_hda_i2c_driver = {
 68         .driver = {                                68         .driver = {
 69                 .name             = "cs35l56-h     69                 .name             = "cs35l56-hda",
 70                 .acpi_match_table = cs35l56_ac     70                 .acpi_match_table = cs35l56_acpi_hda_match,
 71                 .pm               = &cs35l56_h     71                 .pm               = &cs35l56_hda_pm_ops,
 72         },                                         72         },
 73         .id_table       = cs35l56_hda_i2c_id,      73         .id_table       = cs35l56_hda_i2c_id,
 74         .probe          = cs35l56_hda_i2c_prob     74         .probe          = cs35l56_hda_i2c_probe,
 75         .remove         = cs35l56_hda_i2c_remo     75         .remove         = cs35l56_hda_i2c_remove,
 76 };                                                 76 };
 77 module_i2c_driver(cs35l56_hda_i2c_driver);         77 module_i2c_driver(cs35l56_hda_i2c_driver);
 78                                                    78 
 79 MODULE_DESCRIPTION("HDA CS35L56 I2C driver");      79 MODULE_DESCRIPTION("HDA CS35L56 I2C driver");
 80 MODULE_IMPORT_NS(SND_HDA_SCODEC_CS35L56);          80 MODULE_IMPORT_NS(SND_HDA_SCODEC_CS35L56);
 81 MODULE_IMPORT_NS(SND_SOC_CS35L56_SHARED);          81 MODULE_IMPORT_NS(SND_SOC_CS35L56_SHARED);
 82 MODULE_AUTHOR("Richard Fitzgerald <rf@opensour     82 MODULE_AUTHOR("Richard Fitzgerald <rf@opensource.cirrus.com>");
 83 MODULE_AUTHOR("Simon Trimmer <simont@opensourc     83 MODULE_AUTHOR("Simon Trimmer <simont@opensource.cirrus.com>");
 84 MODULE_LICENSE("GPL");                             84 MODULE_LICENSE("GPL");
 85                                                    85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php