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 = gpio_get_value_cansleep(max9768->mute_gpio); in max9768_get_gpio()
56 struct max9768 *max9768 = snd_soc_component_get_drvdata(c); in max9768_set_gpio() local
58 gpio_set_value_cansleep(max9768->mute_gpio, !ucontrol->value.integer.value[0]); in max9768_set_gpio()
131 struct max9768 *max9768 = snd_soc_component_get_drvdata(component); in max9768_probe() local
134 if (max9768->flags & MAX9768_FLAG_CLASSIC_PWM) { in max9768_probe()
135 ret = regmap_write(max9768->regmap, MAX9768_CTRL, in max9768_probe()
141 if (gpio_is_valid(max9768->mute_gpio)) { in max9768_probe()
172 struct max9768 *max9768; in max9768_i2c_probe() local
176 max9768 = devm_kzalloc(&client->dev, sizeof(*max9768), GFP_KERNEL); in max9768_i2c_probe()
177 if (!max9768) in max9768_i2c_probe()
184 max9768->mute_gpio = err ?: pdata->mute_gpio; in max9768_i2c_probe()
189 max9768->shdn_gpio = err ?: pdata->shdn_gpio; in max9768_i2c_probe()
191 max9768->flags = pdata->flags; in max9768_i2c_probe()
193 max9768->shdn_gpio = -EINVAL; in max9768_i2c_probe()
194 max9768->mute_gpio = -EINVAL; in max9768_i2c_probe()
197 i2c_set_clientdata(client, max9768); in max9768_i2c_probe()
199 max9768->regmap = devm_regmap_init_i2c(client, &max9768_i2c_regmap_config); in max9768_i2c_probe()
200 if (IS_ERR(max9768->regmap)) in max9768_i2c_probe()
201 return PTR_ERR(max9768->regmap); in max9768_i2c_probe()