10 Sep
2014
10 Sep
'14
8:32 a.m.
On 09/10/2014 03:40 AM, bardliao@realtek.com wrote: [...]
- /* enable jack combo mode on supported devices */
- acpiid = acpi_match_device(dev->driver->acpi_match_table, dev);
- if (acpiid) {
for (mach = rt286_jack_combo; mach->acpi_id; mach++) {
if (!strcmp(mach->acpi_id, acpiid->id))
rt286->pdata.cbj_en =
rt286_jack_combo->jack_combo;
}
- }
Don't invent your own mechanism for this. Use the driver_data field from the acpi_device_id table.
regmap_write(rt286->regmap, RT286_SET_AUDIO_POWER, AC_PWRST_D3);
for (i = 0; i < RT286_POWER_REG_LEN; i++)