| Age | Commit message (Collapse) | Author |
|
Summary changes:
- disable building-in initramfs image
- enable brcmfmac driver
- disable USB_FUNCTIONFS. CONFIG_USB_FUNCTIONFS (g_ffs) is legacy.
We have to disable it and use another init sequence for adb
devices.
- enable configs needed by adbd
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Summary changes:
- disable building-in initramfs image
- disable USB_FUNCTIONFS. CONFIG_USB_FUNCTIONFS (g_ffs) is legacy.
We have to disable it and use another init sequence for adb
devices.
- vim1: enable CONFIG_USB_CONFIGFS
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Summary changes:
- enable usb gadget support
- disable USB_FUNCTIONFS
- enable configs needed by adbd
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Signed-off-by: Jan Dakinevich <yvdakinevich@sberdevices.ru>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Signed-off-by: Jan Dakinevich <yvdakinevich@sberdevices.ru>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Commit 889dd56f8c03 ("ASoC: soc-dapm: tidyup idle_bias handling - step1")
removed the idle_bias_off field from snd_soc_dapm_context and introduced
the snd_soc_dapm_get_idle_bias() API as its replacement.
Update the t9015 driver to use the new API accordingly.
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
After the commit applied
7e4cdef1ef8f ("ASoC: uniphier: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component()")
kernel alsa doesn't support snd_soc_kcontrol_component(), use
snd_kcontrol_chip() instead.
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Originally, the driver selected constraints in ->set_sysclk() and
installed they in ->startup(). That is incorrect due to following
reasons:
- ->startup() is before called ->set_sysclk(), so no constraints were
applied when the device was accesed for the first time.
- even ->startup() successfully installed constraints ->set_sysclk() is
unable to select another one to satisfy changed sample rate, because
the value of 'freq' passed to ->set_sysclk() is refined by existing
constraints _before_ ->set_sysclk() is called.
Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
- don't directly pass return value of the function to callers of this
driver. This function can return 1, it is is not-negative but it
doesn't indicate and error.
- add missing assignments.
Fixes: 9f1305e69029 ("ASoC: codecs: add ES7243E ADC driver")
Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Commit 70b0d6b0a199 ("tee: optee: Fix supplicant wait loop") made the
client wait as killable so it can be interrupted during shutdown or
after a supplicant crash. This changes the original lifetime expectations:
the client task can now terminate while the supplicant is still processing
its request.
If the client exits first it removes the request from its queue and
kfree()s it, while the request ID remains in supp->idr. A subsequent
lookup on the supplicant path then dereferences freed memory, leading to
a use-after-free.
Serialise access to the request with supp->mutex:
* Hold supp->mutex in optee_supp_recv() and optee_supp_send() while
looking up and touching the request.
* Let optee_supp_thrd_req() notice that the client has terminated and
signal optee_supp_send() accordingly.
With these changes the request cannot be freed while the supplicant still
has a reference, eliminating the race.
Link: https://lore.kernel.org/all/20260216-fix-use-after-free-v5-1-0d6fd12d1f09@oss.qualcomm.com/
Fixes: 70b0d6b0a199 ("tee: optee: Fix supplicant wait loop")
Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Currently, users must explicitly specify each LED, which is
cumbersome for devices with a large number of channels.
Add support for a special "all" keyword to both select_leds and
clear_leds sysfs attributes.
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
The A1 audio clock controller requires a reference to the audio reset
line provided by the Meson aux reset controller. Add the 'resets'
property to the audio clock controller node to properly reference
RESET_AUDIO.
Fixes: ff94f1aeb2b9 ("arm64: dts: meson: a1: add audio devices")
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Remove the implementation of the reset driver in a1 audio clock driver
and migrate to the one provided by reset framework on the auxiliary bus.
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Use a function snd_soc_tdm_params_to_bclk instead of snd_soc_params_to_bclk
to calculate bclk frequency correctly using frame size, channel period
and a number of channels
Since in NTP8918 the word clock and bit clock frequencies are both 64
bits per period and given that the device has only 2 channels it means
that the period per channel is equal to 32 bits. Thus to calculate bit
clock frequency the only other non-constant value that we need is frame
size (or sample rate)
Also implemented a set_tdm_slot dai ops callback for ntp8918 codec that will
ensure that tdm slot width and slot num are set to 32 and 2
respectively because ntp8918 can only operate in that configuration
Signed-off-by: Ilias Izmaylov <ikizmaylov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Add less-than-0 snd_soc_component_update_bits checks to determine
whether it resulted in error or not, since if it returns a positive
number it doesn't mean that there was a failure - only a negative
result indicates an error
Fixes: dc9004ea273a9 ("ASoC: codecs: Add NeoFidelity NTP8835 codec")
Signed-off-by: Ilias Izmaylov <ikizmaylov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Add less-than-0 snd_soc_component_update_bits checks to determine
whether it resulted in error or not, since if it returns a positive
number it doesn't mean that there was a failure - only a negative
result indicates an error
Fixes: 2bd61fff3e93b ("ASoC: codecs: Add NeoFidelity NTP8918 codec")
Signed-off-by: Ilias Izmaylov <ikizmaylov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Allow to use framebuffer's leds in patterns only if framebuffer is
not opened and dont allow to open framebuffer if its leds are used
in patterns.
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
This led-controller supports 3 pattern controllers for auto breathing or
group dimming control. Each pattern controller can work in auto
breathing or manual control mode. All breathing parameters including
rising/falling slope, on/off time, repeat times, min/max brightness
and so on are configurable.
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Because LED numbering starts from 0, the valid range for a system with N
total LEDs is 0 to N-1. Therefore, using N as an LED number is invalid.
Fixes: 94d4090b6139 ("dt-bindings: leds: aw200xx: Fix led pattern and add reg constraints")
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
LEDs subset or all LEDs can be accessed thru framebuffer interface.
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
This feature allows multiple LED clients (e.g., a single-LED user and a
framebuffer user) to operate at the same time.
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
This function is useful for future store queue operation support.
Signed-off-by: George Stark <george.stark@mailbox.org>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Support DT property default-state's values: on, off, keep.
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Since all the required information is ready before creating LED objects
then chip can be fully initialized in the first place and locking
the mutex becomes unnecessary.
Also it's unnecessary to handle devm_led_classdev_register_ext() return
value, because we register all leds which we can.
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Split aw200xx_probe_fw() into two steps.
At the first step aw200xx_probe_dt_leds() reads all information from DT
about LEDs configuration to temporary array at early stage of probe.
It'll allow to have all details before initializing the chip thus
simplify it.
At the second step aw200xx_probe_register_leds() solely creates leds
objects.
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
aw200xx_probe_get_display_rows() returns error if max found reg value
is 0 but actually it's a valid situation if a single LED is connected
to row 0 and column 0.
Fixes: 2b8db5729d10 ("leds: aw200xx: Calculate dts property display_rows in the driver")
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Since aw200xx_disable() schedulled earlier thru devm_add_action() it's
no need to call aw200xx_disable() manually at the probe error section.
Fixes: a59d8824d730 ("leds: aw200xx: Use devm API to cleanup module's resources")
Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
These new functions allow sparse to find failures to release
direct mode reducing chances of bugs over the claim_direct_mode()
functions that are deprecated.
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Cherry-pick and adapt the reverted commit 208f50b51622
("mtd: spinand: micron: correct MT29F2G01ABAGD parameters").
The original patch used older macro names. During the adaptation,
update these to the macros provided by Miquel Raynal in the mainline
kernel:
- SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP ->
SPINAND_PAGE_READ_FROM_CACHE_1S_2S_2S_OP()
- SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP ->
SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP()
Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Increase VDDCORE voltage to prevent memory access errors.
According to the Amlogic recommendation, set VDDCORE voltage to 0.84V.
Details from Amlogic FAE:
```
This is related to the manufacturing process (Please search for corner
chip, TT/FF/SS).
We do not distinguish TT/FF/SS chips in A1. The operating voltage of the
chip will vary depending on the manufacturing process.
In this case, I guess these are SS chip which are just slightly lower
than their operating voltage, causing this problem.
Therefore, we recommend that customers set the voltage to 0.84. This
voltage has been verified by most customers and can work normally when
the DSP is also turned on.
```
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
HX3203 is an optical sensor which measures the ambient light intensity.
It has two channels: white light + IR and IR separately, supports
hi/low ALS thresholds with Open-Drain interrupt.
Also this patch has several adaptation fixes:
- remove field chip_name from struct hx3203_priv, use indio_dev->name
instead
- use dev_err_probe() instead of dev_err()
- use aligned_s64 instead of __aligned(8)
- use iio_for_each_active_channel() to iterate over active channels
- fix hx3203_write_event_config() signature
- fix hx3203_remove() signature
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
|
|
The axg TDM HW does not depend on a selected set of rates. The hardware
itself, just takes an input clock and work with it, regardless of its
rate. In this way, the rates TDM can take are continuous.
What might force the use of specific rate are the PLL available as clock
and/or the codecs facing the TDM HW. Either way, this constraint does
not belong in the TDM interface driver.
Allow any rate as far as TDM is concerned by setting
SNDRV_PCM_RATE_CONTINUOUS with an interval it has been tested with.
Do the same change for sm1-eqdrc driver which used AXG_TDM_RATES before.
Based-on: 3a02cc576acc ("ASoC: meson: axg-iface: set continuous rates")
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Amlogic has its own rsv-info API to interact with BBT, unifykeys, env
and other vendor-specific custom NAND storages.
Amlogic reserved region is usually located right after BL2 partition:
+-----------+-----------------+-------------+--------+
| | | | |
| BL2 | RESERVED | TPL | ... |
| | | | |
+-----------+-----------------+-------------+--------+
1024 pages 48 erase blocks 8MB
Below there is a map of RSV regions:
+-----+-----+-----------+-----------+-----+-----------+
| | | | | | |
| GAP | BBT | ENV | KEY | DTB | ... |
| | | | | | |
+-----+-----+-----------+-----------+-----+-----------+
eraseblocks: 4 4 8 8 4 20
The current patch introduces a correct operations with BBT region using
rsv-info API and formats.
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
The spinand_read_page()/spinand_write_page() functions can return a
positive value (bitflips corrected on success).
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Make compiler happy:
```
drivers/mtd/nand/spi/esmt.c: In function 'f50l1g41lb_otp_rw':
drivers/mtd/nand/spi/esmt.c:185:16: error: unused variable 'pagesize'
185 | size_t pagesize = nanddev_page_size(nand);
| ^~~~~~~~
drivers/mtd/nand/spi/esmt.c:180:29: error: unused variable 'nand'
180 | struct nand_device *nand = spinand_to_nand(spinand);
```
Fixes: f2c5a912aefb ("mtd: spinand: esmt: introduce read/write OTP ops")
Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
U-Boot for ESMT driver reads from OTP with ECC enabled.
Enable ECC for OTP reads/writes to ensure consistent behaviour across
devices and improve data reliability.
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
In the generic code, ECC is disabled for OTP read/write operations.
To enable ECC in OTP for the ESMT driver, custom OTP read/write
callbacks must be implemented. This patch provides these callbacks.
This is adaptation of the spinand_otp_rw() function.
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
This function is not used after switching to PWM_MASK register for
Playback Switch control.
Fixes: 35628e3f8bc1 ("ASoC: codecs: add ntp8835_mute function")
Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Implement mute_stream callback to fix pop noise when amplifier device is
opened or closed. Also use PWM mask registers for Playback Switch
control to avoid conflicts with mute_stream.
Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Detected by CONFIG_FORTIFY_SOURCE option.
Fix patch fix following buffer overflow in Amlgoic BBT module:
[ 0.716769] ------------[ cut here ]------------
[ 0.721142] strlen: detected buffer overflow: 5 byte read of buffer size 4
[ 0.728039] WARNING: CPU: 0 PID: 1 at lib/string_helpers.c:1032 __fortify_report+0x54/0x64
[ 0.736107] Modules linked in:
[ 0.739127] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.10-sdkernel #1
[ 0.746454] Hardware name: SberDevices SberBoom (DT)
[ 0.751371] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 0.758268] pc : __fortify_report+0x54/0x64
[ 0.762408] lr : __fortify_report+0x54/0x64
[ 0.766547] sp : ffff80008002b910
[ 0.769825] x29: ffff80008002b910 x28: 0000000000000000 x27: ffff00000007d090
[ 0.776901] x26: 0000000000000000 x25: 0000000000000014 x24: ffff00000007d5c8
[ 0.783970] x23: ffff80008002b9f4 x22: 0000000000000018 x21: ffff800080f87c68
[ 0.791044] x20: 0000000000000000 x19: 0000000000000005 x18: 0000000000000006
[ 0.798116] x17: ffff00000fe1b0d8 x16: 000000000001f200 x15: ffff80008002b390
[ 0.805193] x14: 0000000000000000 x13: 3420657a69732072 x12: ffff80008002b6b8
[ 0.805714] Freeing initrd memory: 6804K
[ 0.812250] x11: 00000000ffffffea x10: ffff800080f2f910 x9 : 0000000000000001
[ 0.812261] x8 : c0000000fffffbff x7 : 0000000000005fe8 x6 : ffff800080f2f8b8
[ 0.812272] x5 : 0000000000015fa8 x4 : 0000000000000000 x3 : 0000000000000000
[ 0.837353] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000000176740
[ 0.844426] Call trace:
[ 0.846841] __fortify_report+0x54/0x64
[ 0.850636] __fortify_panic+0x10/0x14
[ 0.854344] nand_create_bbt+0x39c/0x3ec
[ 0.858225] nand_scan_with_ids+0x14f0/0x1740
[ 0.862538] meson_nfc_probe+0x514/0x7a8
[ 0.866419] pl��ɵ}�ɽ���0x68/0xc4
[ 0.870042] really_probe+0xbc/0x2a4
[ 0.873578] __driver_probe_device+0x78/0x12c
[ 0.877890] driver_probe_device+0x3c/0x10c
[ 0.882031] __driver_attach+0x94/0x160
0.905404] meson_nfc_driver_init+0x1c/0x28
[ 0.909630] do_one_initcall+0x80/0x20c
[ 0.913425] kernel_init_freeable+0x1d8/0x2ac
[ 0.917738] kernel_init+0x20/0x1dc
[ 0.921188] ret_from_fork+0x10/0x20
[ 0.924726] ---[ end trace 0000000000000000 ]---
[ 0.929365] ------------[ cut here ]------------
[ 0.933869] kernel BUG at lib/string_helpers.c:1040!
[ 0.938786] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
[ 0.945512] Modules linked in:
[ 0.948534] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G W 6.12.10-sdkernel #1
[ 0.957328] Tainted: [W]=WARN
[ 0.960260] Hardware name: SberDevices Sbe��>��0c
[ 1.119390] kernel_init_freeable+0x1d8/0x2ac
[ 1.123703] kernel_init+0x20/0x1dc
[ 1.127153] ret_from_fork+0x10/0x20
[ 1.130694] Code: d503233f a9bf7bfd 910003fd 97ffffe4 (d4210000)
[ 1.136728] ---[ end trace 0000000000000000 ]---
[ 1.144120] note: swapper/0[1] exited with irqs disabled
[ 1.146651] note: swapper/0[1] exited with preempt_count 1
[ 1.152077] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 1.159592] SMP: stopping secondary CPUs
[ 1.163472] Kernel Offset: 0x80000 from 0xffff800080000000
[ 1.168898] PHYS_OFFSET: 0x0
[ 1.171744] CPU features: 0x00,00000080,00200000,0200420b
[ 1.177092] Memory Limit: none
[ 1.183040] Rebooting in 5 seconds..
Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
|
|
Changing the state of output drivers during playback start could cause
pop noise. This patch allows to keep these drivers always enabled to
work around the issue.
Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Added support for interrupt to the LED controller driver, which
indicates the finished of the auto-breath pattern.
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Enabling and disabling these clocks trigger pop noise, so keep it always
enabled.
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|
|
Allow setting the clock provider for clocks called "sclk" and "lrclk".
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
|