Lines Matching defs:cs35l41

134 static int cs35l41_add_gpios(struct cs35l41_hda *cs35l41, struct device *physdev, int reset_gpio,
148 if (cs35l41->dacpi->driver_gpios)
228 static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physdev, int id,
231 struct cs35l41_hw_cfg *hw_cfg = &cs35l41->hw_cfg;
240 if (!strcasecmp(cfg->ssid, cs35l41->acpi_subsystem_id))
247 if (!cs35l41->dacpi || cs35l41->dacpi != ACPI_COMPANION(physdev)) {
248 dev_err(cs35l41->dev, "ACPI Device does not match, cannot override _DSD.\n");
252 dev_info(cs35l41->dev, "Adding DSD properties for %s\n", cs35l41->acpi_subsystem_id);
254 dsd_found = acpi_dev_has_props(cs35l41->dacpi);
257 ret = cs35l41_add_gpios(cs35l41, physdev, cfg->reset_gpio_index,
261 dev_err(cs35l41->dev, "Error adding GPIO mapping: %d\n", ret);
265 dev_warn(cs35l41->dev, "Cannot add Reset/Speaker ID/SPI CS GPIO Mapping, "
269 if (cs35l41->control_bus == SPI) {
270 cs35l41->index = id;
281 spi = to_spi_device(cs35l41->dev);
284 dev_warn(cs35l41->dev,
288 dev_warn(cs35l41->dev,
297 dev_err(cs35l41->dev,
303 cs35l41->cs_gpio = cs_gpiod;
317 cs35l41->index = id - 0x40;
320 cs35l41->index = id == 0x40 ? 0 : 1;
323 cs35l41->reset_gpio = fwnode_gpiod_get_index(acpi_fwnode_handle(cs35l41->dacpi), "reset",
324 cs35l41->index, GPIOD_OUT_LOW,
325 "cs35l41-reset");
326 cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, cs35l41->index, cfg->num_amps, -1);
328 hw_cfg->spk_pos = cfg->channel[cs35l41->index];
330 cs35l41->channel_index = 0;
331 for (i = 0; i < cs35l41->index; i++)
333 cs35l41->channel_index++;
362 static int hp_i2c_int_2amp_dual_spkid(struct cs35l41_hda *cs35l41, struct device *physdev, int id,
365 struct cs35l41_hw_cfg *hw_cfg = &cs35l41->hw_cfg;
368 if (acpi_dev_has_props(cs35l41->dacpi))
372 cs35l41->index = id == 0x40 ? 0 : 1;
373 cs35l41->channel_index = 0;
374 cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, 0, GPIOD_OUT_HIGH);
375 if (cs35l41->index == 0)
376 cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, 0, 0, 1);
378 cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, 0, 0, 2);
379 hw_cfg->spk_pos = cs35l41->index;
401 static int lenovo_legion_no_acpi(struct cs35l41_hda *cs35l41, struct device *physdev, int id,
404 struct cs35l41_hw_cfg *hw_cfg = &cs35l41->hw_cfg;
407 cs35l41->index = id == 0x40 ? 0 : 1;
408 cs35l41->channel_index = 0;
409 cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, 0, GPIOD_OUT_HIGH);
410 cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, 0, 0, 2);
411 hw_cfg->spk_pos = cs35l41->index;
430 int (*add_prop)(struct cs35l41_hda *cs35l41, struct device *physdev, int id,
535 int cs35l41_add_dsd_properties(struct cs35l41_hda *cs35l41, struct device *physdev, int id,
543 (cs35l41->acpi_subsystem_id &&
544 !strcasecmp(model->ssid, cs35l41->acpi_subsystem_id))))
545 return model->add_prop(cs35l41, physdev, id, hid);