mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Merge "asoc: wsa883x: update irq_drv_data per wsa device"
This commit is contained in:
commit
4292d98db3
1 changed files with 11 additions and 3 deletions
|
|
@ -1622,12 +1622,20 @@ static int wsa883x_swr_probe(struct swr_device *pdev)
|
|||
const char *wsa883x_name_prefix_of = NULL;
|
||||
char buffer[MAX_NAME_LEN];
|
||||
int dev_index = 0;
|
||||
struct regmap_irq_chip *wsa883x_sub_regmap_irq_chip = NULL;
|
||||
|
||||
wsa883x = devm_kzalloc(&pdev->dev, sizeof(struct wsa883x_priv),
|
||||
GFP_KERNEL);
|
||||
if (!wsa883x)
|
||||
return -ENOMEM;
|
||||
|
||||
wsa883x_sub_regmap_irq_chip = devm_kzalloc(&pdev->dev, sizeof(struct regmap_irq_chip),
|
||||
GFP_KERNEL);
|
||||
if (!wsa883x_sub_regmap_irq_chip)
|
||||
return -ENOMEM;
|
||||
memcpy(wsa883x_sub_regmap_irq_chip, &wsa883x_regmap_irq_chip,
|
||||
sizeof(struct regmap_irq_chip));
|
||||
|
||||
ret = wsa883x_enable_supplies(&pdev->dev, wsa883x);
|
||||
if (ret) {
|
||||
ret = -EPROBE_DEFER;
|
||||
|
|
@ -1670,11 +1678,11 @@ static int wsa883x_swr_probe(struct swr_device *pdev)
|
|||
}
|
||||
|
||||
/* Set all interrupts as edge triggered */
|
||||
for (i = 0; i < wsa883x_regmap_irq_chip.num_regs; i++)
|
||||
for (i = 0; i < wsa883x_sub_regmap_irq_chip->num_regs; i++)
|
||||
regmap_write(wsa883x->regmap, (WSA883X_INTR_LEVEL0 + i), 0);
|
||||
|
||||
wsa883x_regmap_irq_chip.irq_drv_data = wsa883x;
|
||||
wsa883x->irq_info.wcd_regmap_irq_chip = &wsa883x_regmap_irq_chip;
|
||||
wsa883x_sub_regmap_irq_chip->irq_drv_data = wsa883x;
|
||||
wsa883x->irq_info.wcd_regmap_irq_chip = wsa883x_sub_regmap_irq_chip;
|
||||
wsa883x->irq_info.codec_name = "WSA883X";
|
||||
wsa883x->irq_info.regmap = wsa883x->regmap;
|
||||
wsa883x->irq_info.dev = &pdev->dev;
|
||||
|
|
|
|||
Loading…
Reference in a new issue