diff options
| author | Mark Brown <broonie@kernel.org> | 2026-02-03 02:31:39 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-02-03 02:31:39 +0300 |
| commit | c1b835eefb7887266ac39573054a224a8e32207f (patch) | |
| tree | 0d16f74141b6c4726d945527d8df0866e8014b86 /lib | |
| parent | 8a066a81ee0c1b6cdbd81393536c3b2d19ccef25 (diff) | |
| parent | a145cfd0ffe7bd7d61ce25839cec737c449b0d2c (diff) | |
| download | linux-c1b835eefb7887266ac39573054a224a8e32207f.tar.xz | |
Anbernic RG-DS AW87391 Speaker Amps
Merge series from Chris Morgan <macroalpha82@gmail.com>:
Add support for the Anbernic RG-DS Speaker Amplifiers. The Anbernic
RG-DS uses two AW87391 ICs at 0x58 and 0x5B on i2c2. However, the
manufacturer did not provide a firmware file, only a sequence of
register writes to each device to enable and disable them.
Add support for this *specific* configuration in the AW87390 driver.
Since we are relying on a device specific sequence I am using a
device specific compatible string. This driver does not currently
support the aw87391 for any other device as I have none to test
with valid firmware. Attempts to create firmware with the AwinicSCPv4
have not been successful.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/flex_proportions.c | 5 | ||||
| -rw-r--r-- | lib/test_hmm.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/flex_proportions.c b/lib/flex_proportions.c index 84ecccddc771..012d5614efb9 100644 --- a/lib/flex_proportions.c +++ b/lib/flex_proportions.c @@ -64,13 +64,14 @@ void fprop_global_destroy(struct fprop_global *p) bool fprop_new_period(struct fprop_global *p, int periods) { s64 events = percpu_counter_sum(&p->events); + unsigned long flags; /* * Don't do anything if there are no events. */ if (events <= 1) return false; - preempt_disable_nested(); + local_irq_save(flags); write_seqcount_begin(&p->sequence); if (periods < 64) events -= events >> periods; @@ -78,7 +79,7 @@ bool fprop_new_period(struct fprop_global *p, int periods) percpu_counter_add(&p->events, -events); p->period += periods; write_seqcount_end(&p->sequence); - preempt_enable_nested(); + local_irq_restore(flags); return true; } diff --git a/lib/test_hmm.c b/lib/test_hmm.c index 8af169d3873a..455a6862ae50 100644 --- a/lib/test_hmm.c +++ b/lib/test_hmm.c @@ -662,7 +662,9 @@ static struct page *dmirror_devmem_alloc_page(struct dmirror *dmirror, goto error; } - zone_device_folio_init(page_folio(dpage), order); + zone_device_folio_init(page_folio(dpage), + page_pgmap(folio_page(page_folio(dpage), 0)), + order); dpage->zone_device_data = rpage; return dpage; |
