mfd: wm5110: Give new AIF2 registers defaults and mark as readable
Subsystems (2)
PATCH 1/1 mfd: wm5110: Give new AIF2 registers defaults and mark as readable
The registers associated with the new channels on AIF2 were accidentally missing defaults and not marked as readable this patch fixes this.
---
This patch depends on the patch:
"ASoC: wm5110: Add extra AIF2 channels"
Which is going through the ASoC tree at the moment, so probably best to send this patch through the ASoC tree as well. As such I have generated it against Mark's for-next branch, let me know if it needs regenerating.
Thanks,
Charles
drivers/mfd/wm5110-tables.c | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 64 insertions(+), 0 deletions(-)
drivers/mfd/wm5110-tables.c +64 -0
@@ -885,6 +885,38 @@ static const struct reg_default wm5110_reg_default[] = { { 0x0000074D, 0x0080 }, /* R1869 - AIF2TX2MIX Input 3 Volume */ { 0x0000074E, 0x0000 }, /* R1870 - AIF2TX2MIX Input 4 Source */ { 0x0000074F, 0x0080 }, /* R1871 - AIF2TX2MIX Input 4 Volume */ + { 0x00000750, 0x0000 }, /* R1872 - AIF2TX3MIX Input 1 Source */ + { 0x00000751, 0x0080 }, /* R1873 - AIF2TX3MIX Input 1 Volume */ + { 0x00000752, 0x0000 }, /* R1874 - AIF2TX3MIX Input 2 Source */ + { 0x00000753, 0x0080 }, /* R1875 - AIF2TX3MIX Input 2 Volume */ + { 0x00000754, 0x0000 }, /* R1876 - AIF2TX3MIX Input 3 Source */ + { 0x00000755, 0x0080 }, /* R1877 - AIF2TX3MIX Input 3 Volume */ + { 0x00000756, 0x0000 }, /* R1878 - AIF2TX3MIX Input 4 Source */ + { 0x00000757, 0x0080 }, /* R1879 - AIF2TX3MIX Input 4 Volume */ + { 0x00000758, 0x0000 }, /* R1880 - AIF2TX4MIX Input 1 Source */ + { 0x00000759, 0x0080 }, /* R1881 - AIF2TX4MIX Input 1 Volume */ + { 0x0000075A, 0x0000 }, /* R1882 - AIF2TX4MIX Input 2 Source */ + { 0x0000075B, 0x0080 }, /* R1883 - AIF2TX4MIX Input 2 Volume */ + { 0x0000075C, 0x0000 }, /* R1884 - AIF2TX4MIX Input 3 Source */ + { 0x0000075D, 0x0080 }, /* R1885 - AIF2TX4MIX Input 3 Volume */ + { 0x0000075E, 0x0000 }, /* R1886 - AIF2TX4MIX Input 4 Source */ + { 0x0000075F, 0x0080 }, /* R1887 - AIF2TX4MIX Input 4 Volume */ + { 0x00000760, 0x0000 }, /* R1888 - AIF2TX5MIX Input 1 Source */ + { 0x00000761, 0x0080 }, /* R1889 - AIF2TX5MIX Input 1 Volume */ + { 0x00000762, 0x0000 }, /* R1890 - AIF2TX5MIX Input 2 Source */ + { 0x00000763, 0x0080 }, /* R1891 - AIF2TX5MIX Input 2 Volume */ + { 0x00000764, 0x0000 }, /* R1892 - AIF2TX5MIX Input 3 Source */ + { 0x00000765, 0x0080 }, /* R1893 - AIF2TX5MIX Input 3 Volume */ + { 0x00000766, 0x0000 }, /* R1894 - AIF2TX5MIX Input 4 Source */ + { 0x00000767, 0x0080 }, /* R1895 - AIF2TX5MIX Input 4 Volume */ + { 0x00000768, 0x0000 }, /* R1896 - AIF2TX6MIX Input 1 Source */ + { 0x00000769, 0x0080 }, /* R1897 - AIF2TX6MIX Input 1 Volume */ + { 0x0000076A, 0x0000 }, /* R1898 - AIF2TX6MIX Input 2 Source */ + { 0x0000076B, 0x0080 }, /* R1899 - AIF2TX6MIX Input 2 Volume */ + { 0x0000076C, 0x0000 }, /* R1900 - AIF2TX6MIX Input 3 Source */ + { 0x0000076D, 0x0080 }, /* R1901 - AIF2TX6MIX Input 3 Volume */ + { 0x0000076E, 0x0000 }, /* R1902 - AIF2TX6MIX Input 4 Source */ + { 0x0000076F, 0x0080 }, /* R1903 - AIF2TX6MIX Input 4 Volume */ { 0x00000780, 0x0000 }, /* R1920 - AIF3TX1MIX Input 1 Source */ { 0x00000781, 0x0080 }, /* R1921 - AIF3TX1MIX Input 1 Volume */ { 0x00000782, 0x0000 }, /* R1922 - AIF3TX1MIX Input 2 Source */
@@ -1883,6 +1915,38 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)case ARIZONA_AIF2TX2MIX_INPUT_3_VOLUME :case ARIZONA_AIF2TX2MIX_INPUT_4_SOURCE :case ARIZONA_AIF2TX2MIX_INPUT_4_VOLUME : +case ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE : +case ARIZONA_AIF2TX3MIX_INPUT_1_VOLUME : +case ARIZONA_AIF2TX3MIX_INPUT_2_SOURCE : +case ARIZONA_AIF2TX3MIX_INPUT_2_VOLUME : +case ARIZONA_AIF2TX3MIX_INPUT_3_SOURCE : +case ARIZONA_AIF2TX3MIX_INPUT_3_VOLUME : +case ARIZONA_AIF2TX3MIX_INPUT_4_SOURCE : +case ARIZONA_AIF2TX3MIX_INPUT_4_VOLUME : +case ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE : +case ARIZONA_AIF2TX4MIX_INPUT_1_VOLUME : +case ARIZONA_AIF2TX4MIX_INPUT_2_SOURCE : +case ARIZONA_AIF2TX4MIX_INPUT_2_VOLUME : +case ARIZONA_AIF2TX4MIX_INPUT_3_SOURCE : +case ARIZONA_AIF2TX4MIX_INPUT_3_VOLUME : +case ARIZONA_AIF2TX4MIX_INPUT_4_SOURCE : +case ARIZONA_AIF2TX4MIX_INPUT_4_VOLUME : +case ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE : +case ARIZONA_AIF2TX5MIX_INPUT_1_VOLUME : +case ARIZONA_AIF2TX5MIX_INPUT_2_SOURCE : +case ARIZONA_AIF2TX5MIX_INPUT_2_VOLUME : +case ARIZONA_AIF2TX5MIX_INPUT_3_SOURCE : +case ARIZONA_AIF2TX5MIX_INPUT_3_VOLUME : +case ARIZONA_AIF2TX5MIX_INPUT_4_SOURCE : +case ARIZONA_AIF2TX5MIX_INPUT_4_VOLUME : +case ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE : +case ARIZONA_AIF2TX6MIX_INPUT_1_VOLUME : +case ARIZONA_AIF2TX6MIX_INPUT_2_SOURCE : +case ARIZONA_AIF2TX6MIX_INPUT_2_VOLUME : +case ARIZONA_AIF2TX6MIX_INPUT_3_SOURCE : +case ARIZONA_AIF2TX6MIX_INPUT_3_VOLUME : +case ARIZONA_AIF2TX6MIX_INPUT_4_SOURCE : +case ARIZONA_AIF2TX6MIX_INPUT_4_VOLUME :case ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE :case ARIZONA_AIF3TX1MIX_INPUT_1_VOLUME :case ARIZONA_AIF3TX1MIX_INPUT_2_SOURCE :
Signature · 1 line
1.7.2.5
Quoted 6 lines
The registers associated with the new channels on AIF2 were accidentally missing defaults and not marked as readable this patch fixes this.
Signed-off-by Charles Keepax <[email protected]>---
Quoted 8 lines
This patch depends on the patch:
"ASoC: wm5110: Add extra AIF2 channels"
Which is going through the ASoC tree at the moment, so probably best to send this patch through the ASoC tree as well. As such I have generated it against Mark's for-next branch, let me know if it needs regenerating.
Hmm... this is awkward!
I'm not keen on this patch going through ASoC, as it might make things equally as awkward later in the cycle. We should have created an immutable branch for that really. I guess this will have to wait for the next cycle now...
Quoted 85 lines
drivers/mfd/wm5110-tables.c | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 64 insertions(+), 0 deletions(-)drivers/mfd/wm5110-tables.c +64
-0@@ -885,6 +885,38 @@ static const struct reg_default wm5110_reg_default[] = { { 0x0000074D, 0x0080 }, /* R1869 - AIF2TX2MIX Input 3 Volume */ { 0x0000074E, 0x0000 }, /* R1870 - AIF2TX2MIX Input 4 Source */ { 0x0000074F, 0x0080 }, /* R1871 - AIF2TX2MIX Input 4 Volume */ + { 0x00000750, 0x0000 }, /* R1872 - AIF2TX3MIX Input 1 Source */ + { 0x00000751, 0x0080 }, /* R1873 - AIF2TX3MIX Input 1 Volume */ + { 0x00000752, 0x0000 }, /* R1874 - AIF2TX3MIX Input 2 Source */ + { 0x00000753, 0x0080 }, /* R1875 - AIF2TX3MIX Input 2 Volume */ + { 0x00000754, 0x0000 }, /* R1876 - AIF2TX3MIX Input 3 Source */ + { 0x00000755, 0x0080 }, /* R1877 - AIF2TX3MIX Input 3 Volume */ + { 0x00000756, 0x0000 }, /* R1878 - AIF2TX3MIX Input 4 Source */ + { 0x00000757, 0x0080 }, /* R1879 - AIF2TX3MIX Input 4 Volume */ + { 0x00000758, 0x0000 }, /* R1880 - AIF2TX4MIX Input 1 Source */ + { 0x00000759, 0x0080 }, /* R1881 - AIF2TX4MIX Input 1 Volume */ + { 0x0000075A, 0x0000 }, /* R1882 - AIF2TX4MIX Input 2 Source */ + { 0x0000075B, 0x0080 }, /* R1883 - AIF2TX4MIX Input 2 Volume */ + { 0x0000075C, 0x0000 }, /* R1884 - AIF2TX4MIX Input 3 Source */ + { 0x0000075D, 0x0080 }, /* R1885 - AIF2TX4MIX Input 3 Volume */ + { 0x0000075E, 0x0000 }, /* R1886 - AIF2TX4MIX Input 4 Source */ + { 0x0000075F, 0x0080 }, /* R1887 - AIF2TX4MIX Input 4 Volume */ + { 0x00000760, 0x0000 }, /* R1888 - AIF2TX5MIX Input 1 Source */ + { 0x00000761, 0x0080 }, /* R1889 - AIF2TX5MIX Input 1 Volume */ + { 0x00000762, 0x0000 }, /* R1890 - AIF2TX5MIX Input 2 Source */ + { 0x00000763, 0x0080 }, /* R1891 - AIF2TX5MIX Input 2 Volume */ + { 0x00000764, 0x0000 }, /* R1892 - AIF2TX5MIX Input 3 Source */ + { 0x00000765, 0x0080 }, /* R1893 - AIF2TX5MIX Input 3 Volume */ + { 0x00000766, 0x0000 }, /* R1894 - AIF2TX5MIX Input 4 Source */ + { 0x00000767, 0x0080 }, /* R1895 - AIF2TX5MIX Input 4 Volume */ + { 0x00000768, 0x0000 }, /* R1896 - AIF2TX6MIX Input 1 Source */ + { 0x00000769, 0x0080 }, /* R1897 - AIF2TX6MIX Input 1 Volume */ + { 0x0000076A, 0x0000 }, /* R1898 - AIF2TX6MIX Input 2 Source */ + { 0x0000076B, 0x0080 }, /* R1899 - AIF2TX6MIX Input 2 Volume */ + { 0x0000076C, 0x0000 }, /* R1900 - AIF2TX6MIX Input 3 Source */ + { 0x0000076D, 0x0080 }, /* R1901 - AIF2TX6MIX Input 3 Volume */ + { 0x0000076E, 0x0000 }, /* R1902 - AIF2TX6MIX Input 4 Source */ + { 0x0000076F, 0x0080 }, /* R1903 - AIF2TX6MIX Input 4 Volume */ { 0x00000780, 0x0000 }, /* R1920 - AIF3TX1MIX Input 1 Source */ { 0x00000781, 0x0080 }, /* R1921 - AIF3TX1MIX Input 1 Volume */ { 0x00000782, 0x0000 }, /* R1922 - AIF3TX1MIX Input 2 Source */@@ -1883,6 +1915,38 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)case ARIZONA_AIF2TX2MIX_INPUT_3_VOLUME :case ARIZONA_AIF2TX2MIX_INPUT_4_SOURCE :case ARIZONA_AIF2TX2MIX_INPUT_4_VOLUME : +case ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE : +case ARIZONA_AIF2TX3MIX_INPUT_1_VOLUME : +case ARIZONA_AIF2TX3MIX_INPUT_2_SOURCE : +case ARIZONA_AIF2TX3MIX_INPUT_2_VOLUME : +case ARIZONA_AIF2TX3MIX_INPUT_3_SOURCE : +case ARIZONA_AIF2TX3MIX_INPUT_3_VOLUME : +case ARIZONA_AIF2TX3MIX_INPUT_4_SOURCE : +case ARIZONA_AIF2TX3MIX_INPUT_4_VOLUME : +case ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE : +case ARIZONA_AIF2TX4MIX_INPUT_1_VOLUME : +case ARIZONA_AIF2TX4MIX_INPUT_2_SOURCE : +case ARIZONA_AIF2TX4MIX_INPUT_2_VOLUME : +case ARIZONA_AIF2TX4MIX_INPUT_3_SOURCE : +case ARIZONA_AIF2TX4MIX_INPUT_3_VOLUME : +case ARIZONA_AIF2TX4MIX_INPUT_4_SOURCE : +case ARIZONA_AIF2TX4MIX_INPUT_4_VOLUME : +case ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE : +case ARIZONA_AIF2TX5MIX_INPUT_1_VOLUME : +case ARIZONA_AIF2TX5MIX_INPUT_2_SOURCE : +case ARIZONA_AIF2TX5MIX_INPUT_2_VOLUME : +case ARIZONA_AIF2TX5MIX_INPUT_3_SOURCE : +case ARIZONA_AIF2TX5MIX_INPUT_3_VOLUME : +case ARIZONA_AIF2TX5MIX_INPUT_4_SOURCE : +case ARIZONA_AIF2TX5MIX_INPUT_4_VOLUME : +case ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE : +case ARIZONA_AIF2TX6MIX_INPUT_1_VOLUME : +case ARIZONA_AIF2TX6MIX_INPUT_2_SOURCE : +case ARIZONA_AIF2TX6MIX_INPUT_2_VOLUME : +case ARIZONA_AIF2TX6MIX_INPUT_3_SOURCE : +case ARIZONA_AIF2TX6MIX_INPUT_3_VOLUME : +case ARIZONA_AIF2TX6MIX_INPUT_4_SOURCE : +case ARIZONA_AIF2TX6MIX_INPUT_4_VOLUME :case ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE :case ARIZONA_AIF3TX1MIX_INPUT_1_VOLUME :case ARIZONA_AIF3TX1MIX_INPUT_2_SOURCE :
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 15 lines · Lee Jones
Quoted 6 lines
The registers associated with the new channels on AIF2 were accidentally missing defaults and not marked as readable this patch fixes this.
Signed-off-by Charles Keepax <[email protected]>---
Quoted 8 lines
This patch depends on the patch:
"ASoC: wm5110: Add extra AIF2 channels"
Which is going through the ASoC tree at the moment, so probably best to send this patch through the ASoC tree as well. As such I have generated it against Mark's for-next branch, let me know if it needs regenerating.
Quoted 6 lines
Hmm... this is awkward!
I'm not keen on this patch going through ASoC, as it might make things equally as awkward later in the cycle. We should have created an immutable branch for that really. I guess this will have to wait for the next cycle now...
To be honest there is no urgent rush to get this in so it can wait until the next cycle, I will just have to make sure I remember to resend.
Thanks,
Charles
Quoted 4 lines · Lee Jones
I'm not keen on this patch going through ASoC, as it might make things equally as awkward later in the cycle. We should have created an immutable branch for that really. I guess this will have to wait for the next cycle now...
That seems excessive and it probably ought to go in as a bug fix afterwards. Given that it's just an addition of data to the table I'd expect we could cope, we've routinely done that with similar updates in the past without incident.
Quoted 11 lines · Mark Brown
Quoted 4 lines · Lee Jones
I'm not keen on this patch going through ASoC, as it might make things equally as awkward later in the cycle. We should have created an immutable branch for that really. I guess this will have to wait for the next cycle now...
That seems excessive and it probably ought to go in as a bug fix afterwards. Given that it's just an addition of data to the table I'd expect we could cope, we've routinely done that with similar updates in the past without incident.
Ah, is the depends patch in Mainline already? I assumed it was due to go in during the v3.14 merge window? If it's already in Mainline, then sure I don't mind if it goes in -fixes via ASoC, no problem.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 10 lines · Lee Jones
Quoted 4 lines · Mark Brown
That seems excessive and it probably ought to go in as a bug fix afterwards. Given that it's just an addition of data to the table I'd expect we could cope, we've routinely done that with similar updates in the past without incident.
Ah, is the depends patch in Mainline already? I assumed it was due to go in during the v3.14 merge window? If it's already in Mainline, then sure I don't mind if it goes in -fixes via ASoC, no problem.
No, it's for v3.14 - it just seemed like for the size/impact of the change we should be able to handle the situation more smoothly.
Quoted 8 lines · Mark Brown
Quoted 6 lines · Lee Jones
Quoted 4 lines · Mark Brown
That seems excessive and it probably ought to go in as a bug fix afterwards. Given that it's just an addition of data to the table I'd expect we could cope, we've routinely done that with similar updates in the past without incident.
Quoted 6 lines
Quoted 3 lines
Ah, is the depends patch in Mainline already? I assumed it was due to go in during the v3.14 merge window? If it's already in Mainline, then sure I don't mind if it goes in -fixes via ASoC, no problem.
No, it's for v3.14 - it just seemed like for the size/impact of the change we should be able to handle the situation more smoothly.
I see. Well I'm not sure how. If we apply it to either ASoC or MFD and other patches pertaining to that file subsequently appear, then conflict is likely. As you know, the commonly used mitigation technique we usually employ is immutable branches, but this was not employed in this case for one reason or another. So if we apply it now to either one of the trees we will be hedging our bets.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 3 lines · Lee Jones
I see. Well I'm not sure how. If we apply it to either ASoC or MFD and other patches pertaining to that file subsequently appear, then conflict is likely. As you know, the commonly used mitigation
It shouldn't be that likely, we're adding entries to the middle of big, ordered tables - conflicts would be caused by something like changing or adding adjacent entries and they're pretty trivial to resolve. It's not like a restructring of the code or anything.
Quoted 3 lines
technique we usually employ is immutable branches, but this was not employed in this case for one reason or another. So if we apply it now to either one of the trees we will be hedging our bets.
Hedging our bets would be applying it to both trees!
Quoted 9 lines
Quoted 3 lines
I see. Well I'm not sure how. If we apply it to either ASoC or MFD and other patches pertaining to that file subsequently appear, then conflict is likely. As you know, the commonly used mitigation
It shouldn't be that likely, we're adding entries to the middle of big, ordered tables - conflicts would be caused by something like changing or adding adjacent entries and they're pretty trivial to resolve. It's not like a restructring of the code or anything.
Quoted 5 lines
Quoted 3 lines
technique we usually employ is immutable branches, but this was not employed in this case for one reason or another. So if we apply it now to either one of the trees we will be hedging our bets.
Hedging our bets would be applying it to both trees!
Well I'm sure we'd sort out any conflicts.
Go ahead and apply it to your tree with my Ack then.
In future, let's do the immutable branch thing, it's worked well thus far.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Mark Brown
AppliedQuoted 2 lines · Charles Keepax
The registers associated with the new channels on AIF2 were accidentally missing defaults and not marked as readable this patch fixes this.
Applied, thanks.