Lines Matching refs:max9768
28 struct max9768 { struct
44 struct max9768 *max9768 = snd_soc_component_get_drvdata(c); in max9768_get_gpio() argument
45 int val = gpiod_get_value_cansleep(max9768->mute); in max9768_get_gpio()
56 struct max9768 *max9768 = snd_soc_component_get_drvdata(c); in max9768_set_gpio() local
60 if (val != gpiod_get_value_cansleep(max9768->mute)) in max9768_set_gpio()
65 gpiod_set_value_cansleep(max9768->mute, val); in max9768_set_gpio()
138 struct max9768 *max9768 = snd_soc_component_get_drvdata(component); in max9768_probe() local
141 if (max9768->flags & MAX9768_FLAG_CLASSIC_PWM) { in max9768_probe()
142 ret = regmap_write(max9768->regmap, MAX9768_CTRL, in max9768_probe()
148 if (max9768->mute) { in max9768_probe()
179 struct max9768 *max9768; in max9768_i2c_probe() local
182 max9768 = devm_kzalloc(&client->dev, sizeof(*max9768), GFP_KERNEL); in max9768_i2c_probe()
183 if (!max9768) in max9768_i2c_probe()
187 max9768->mute = devm_gpiod_get_optional(&client->dev, in max9768_i2c_probe()
190 if (IS_ERR(max9768->mute)) in max9768_i2c_probe()
191 return PTR_ERR(max9768->mute); in max9768_i2c_probe()
192 gpiod_set_consumer_name(max9768->mute, "MAX9768 Mute"); in max9768_i2c_probe()
195 max9768->shdn = devm_gpiod_get_optional(&client->dev, in max9768_i2c_probe()
198 if (IS_ERR(max9768->shdn)) in max9768_i2c_probe()
199 return PTR_ERR(max9768->shdn); in max9768_i2c_probe()
200 gpiod_set_consumer_name(max9768->shdn, "MAX9768 Shutdown"); in max9768_i2c_probe()
203 max9768->flags = pdata->flags; in max9768_i2c_probe()
205 i2c_set_clientdata(client, max9768); in max9768_i2c_probe()
207 max9768->regmap = devm_regmap_init_i2c(client, &max9768_i2c_regmap_config); in max9768_i2c_probe()
208 if (IS_ERR(max9768->regmap)) in max9768_i2c_probe()
209 return PTR_ERR(max9768->regmap); in max9768_i2c_probe()