mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
Merge "ASoC: msm8x16-wcd: Modify codec interrupt register bits"
This commit is contained in:
commit
cc9f651773
1 changed files with 33 additions and 0 deletions
|
@ -98,6 +98,22 @@ struct wcd9xxx_spmi_map map;
|
|||
void wcd9xxx_spmi_enable_irq(int irq)
|
||||
{
|
||||
pr_debug("%s: irqno =%d\n", __func__, irq);
|
||||
if ((irq >= 0) && (irq <= 7)) {
|
||||
snd_soc_update_bits(map.codec,
|
||||
MSM8X16_WCD_A_DIGITAL_INT_EN_CLR,
|
||||
(0x01 << irq), 0x00);
|
||||
snd_soc_update_bits(map.codec,
|
||||
MSM8X16_WCD_A_DIGITAL_INT_EN_SET,
|
||||
(0x01 << irq), (0x01 << irq));
|
||||
}
|
||||
if ((irq > 7) && (irq <= 15)) {
|
||||
snd_soc_update_bits(map.codec,
|
||||
MSM8X16_WCD_A_ANALOG_INT_EN_CLR,
|
||||
(0x01 << (irq - 8)), 0x00);
|
||||
snd_soc_update_bits(map.codec,
|
||||
MSM8X16_WCD_A_ANALOG_INT_EN_SET,
|
||||
(0x01 << (irq - 8)), (0x01 << (irq - 8)));
|
||||
}
|
||||
|
||||
if (!(map.mask[BIT_BYTE(irq)] & (BYTE_BIT_MASK(irq))))
|
||||
return;
|
||||
|
@ -111,6 +127,23 @@ void wcd9xxx_spmi_enable_irq(int irq)
|
|||
void wcd9xxx_spmi_disable_irq(int irq)
|
||||
{
|
||||
pr_debug("%s: irqno =%d\n", __func__, irq);
|
||||
if ((irq >= 0) && (irq <= 7)) {
|
||||
snd_soc_update_bits(map.codec,
|
||||
MSM8X16_WCD_A_DIGITAL_INT_EN_SET,
|
||||
(0x01 << (irq)), 0x00);
|
||||
snd_soc_update_bits(map.codec,
|
||||
MSM8X16_WCD_A_DIGITAL_INT_EN_CLR,
|
||||
(0x01 << irq), (0x01 << irq));
|
||||
}
|
||||
|
||||
if ((irq > 7) && (irq <= 15)) {
|
||||
snd_soc_update_bits(map.codec,
|
||||
MSM8X16_WCD_A_ANALOG_INT_EN_SET,
|
||||
(0x01 << (irq - 8)), 0x00);
|
||||
snd_soc_update_bits(map.codec,
|
||||
MSM8X16_WCD_A_ANALOG_INT_EN_CLR,
|
||||
(0x01 << (irq - 8)), (0x01 << (irq - 8)));
|
||||
}
|
||||
|
||||
if (map.mask[BIT_BYTE(irq)] & (BYTE_BIT_MASK(irq)))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue