nau8822.c (d0034a7a4ac7fae708146ac0059b9c47a1543f0d) | nau8822.c (7325ed4d1250ddb838dc6f96d1f20492a3d52b20) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2// 3// nau8822.c -- NAU8822 ALSA Soc Audio driver 4// 5// Copyright 2017 Nuvoton Technology Crop. 6// 7// Author: David Lin <ctlin0@nuvoton.com> 8// Co-author: John Hsu <kchsu0@nuvoton.com> --- 1069 unchanged lines hidden (view full) --- 1078 .readable_reg = nau8822_readable_reg, 1079 .writeable_reg = nau8822_writeable_reg, 1080 1081 .cache_type = REGCACHE_RBTREE, 1082 .reg_defaults = nau8822_reg_defaults, 1083 .num_reg_defaults = ARRAY_SIZE(nau8822_reg_defaults), 1084}; 1085 | 1// SPDX-License-Identifier: GPL-2.0 2// 3// nau8822.c -- NAU8822 ALSA Soc Audio driver 4// 5// Copyright 2017 Nuvoton Technology Crop. 6// 7// Author: David Lin <ctlin0@nuvoton.com> 8// Co-author: John Hsu <kchsu0@nuvoton.com> --- 1069 unchanged lines hidden (view full) --- 1078 .readable_reg = nau8822_readable_reg, 1079 .writeable_reg = nau8822_writeable_reg, 1080 1081 .cache_type = REGCACHE_RBTREE, 1082 .reg_defaults = nau8822_reg_defaults, 1083 .num_reg_defaults = ARRAY_SIZE(nau8822_reg_defaults), 1084}; 1085 |
1086static int nau8822_i2c_probe(struct i2c_client *i2c, 1087 const struct i2c_device_id *id) | 1086static int nau8822_i2c_probe(struct i2c_client *i2c) |
1088{ 1089 struct device *dev = &i2c->dev; 1090 struct nau8822 *nau8822 = dev_get_platdata(dev); 1091 int ret; 1092 1093 if (!nau8822) { 1094 nau8822 = devm_kzalloc(dev, sizeof(*nau8822), GFP_KERNEL); 1095 if (nau8822 == NULL) --- 40 unchanged lines hidden (view full) --- 1136MODULE_DEVICE_TABLE(of, nau8822_of_match); 1137#endif 1138 1139static struct i2c_driver nau8822_i2c_driver = { 1140 .driver = { 1141 .name = "nau8822", 1142 .of_match_table = of_match_ptr(nau8822_of_match), 1143 }, | 1087{ 1088 struct device *dev = &i2c->dev; 1089 struct nau8822 *nau8822 = dev_get_platdata(dev); 1090 int ret; 1091 1092 if (!nau8822) { 1093 nau8822 = devm_kzalloc(dev, sizeof(*nau8822), GFP_KERNEL); 1094 if (nau8822 == NULL) --- 40 unchanged lines hidden (view full) --- 1135MODULE_DEVICE_TABLE(of, nau8822_of_match); 1136#endif 1137 1138static struct i2c_driver nau8822_i2c_driver = { 1139 .driver = { 1140 .name = "nau8822", 1141 .of_match_table = of_match_ptr(nau8822_of_match), 1142 }, |
1144 .probe = nau8822_i2c_probe, | 1143 .probe_new = nau8822_i2c_probe, |
1145 .id_table = nau8822_i2c_id, 1146}; 1147module_i2c_driver(nau8822_i2c_driver); 1148 1149MODULE_DESCRIPTION("ASoC NAU8822 codec driver"); 1150MODULE_AUTHOR("David Lin <ctlin0@nuvoton.com>"); 1151MODULE_LICENSE("GPL v2"); | 1144 .id_table = nau8822_i2c_id, 1145}; 1146module_i2c_driver(nau8822_i2c_driver); 1147 1148MODULE_DESCRIPTION("ASoC NAU8822 codec driver"); 1149MODULE_AUTHOR("David Lin <ctlin0@nuvoton.com>"); 1150MODULE_LICENSE("GPL v2"); |