]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
4 weeks agopinctrl: cs42l43: Fix polarity on debounce
Charles Keepax [Fri, 8 May 2026 14:34:53 +0000 (15:34 +0100)] 
pinctrl: cs42l43: Fix polarity on debounce

The debounce bit sets a bypass on the debounce rather than enabling it,
as such the current polarity of the debounce is set incorrectly. Invert
the polarity to correct this.

Fixes: d5282a539297 ("pinctrl: cs42l43: Add support for the cs42l43")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agopinctrl: cs42l43: Fix leaked pm reference on error path
Charles Keepax [Fri, 8 May 2026 14:34:52 +0000 (15:34 +0100)] 
pinctrl: cs42l43: Fix leaked pm reference on error path

Returning directly if the regmap_update_bits() fails causes a pm runtime
reference to be leaked, let things run to the end of the function
instead.

Fixes: e52c741907fb ("pinctrl: cirrus: cs42l43: use new GPIO line value setter callbacks")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agopinctrl: nuvoton: ma35d1: fix MFP register offset and pin table
Joey Lu [Mon, 11 May 2026 03:17:49 +0000 (11:17 +0800)] 
pinctrl: nuvoton: ma35d1: fix MFP register offset and pin table

Each GPIO bank has two 32-bit MFP registers: MFPL covering pins 0-7
at the bank base offset, and MFPH covering pins 8-15 at base offset+4.
ma35_pinctrl_parse_groups() computed the register address without
accounting for this split, so any pin with an index >= 8 within its
bank was written to the wrong register.

Also fix the pin descriptor table in pinctrl-ma35d1.c: switch from
sequential to 16-per-bank pin numbering, add missing PC8-PC11 pins
and their mux options, and remove the duplicate PN10-PN15 entries.

Fixes: f805e356313b ("pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver")
Signed-off-by: Joey Lu <a0987203069@gmail.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agoMerge patch series "selftests/clone3: fix cap_checkpoint_restore test"
Christian Brauner [Wed, 27 May 2026 12:11:47 +0000 (14:11 +0200)] 
Merge patch series "selftests/clone3: fix cap_checkpoint_restore test"

Eva Kurchatova <eva.kurchatova@virtuozzo.com> says:

This patchset fixes misuse of libcap library interface, and existing
compilation warnings due to unused variables.

* patches from https://patch.msgid.link/20260524163840.34247-1-eva.kurchatova@virtuozzo.com:
  selftests/clone3: remove unused variables
  selftests/clone3: fix libcap interface usage

Link: https://patch.msgid.link/20260524163840.34247-1-eva.kurchatova@virtuozzo.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
4 weeks agoselftests/clone3: remove unused variables
Konstantin Khorenko [Sun, 24 May 2026 16:35:50 +0000 (19:35 +0300)] 
selftests/clone3: remove unused variables

  clone3_cap_checkpoint_restore.c: In function 'call_clone3_set_tid':
  clone3_cap_checkpoint_restore.c:57:22: warning: unused variable 'tmp'
  [-Wunused-variable]
     57 |                 char tmp = 0;
        |                      ^~~
  clone3_cap_checkpoint_restore.c:56:21: warning: unused variable 'ret'
  [-Wunused-variable]
     56 |                 int ret;
        |                     ^~~
  clone3_cap_checkpoint_restore.c: In function 'clone3_cap_checkpoint_restore':
  clone3_cap_checkpoint_restore.c:138:13: warning: unused variable 'ret'
  [-Wunused-variable]
    138 |         int ret = 0;
        |             ^~~

Remove unused variables 'ret' and 'tmp' to fix -Wunused-variable
warnings.

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Link: https://patch.msgid.link/20260524163840.34247-3-eva.kurchatova@virtuozzo.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
4 weeks agoselftests/clone3: fix libcap interface usage
Eva Kurchatova [Sun, 24 May 2026 16:35:49 +0000 (19:35 +0300)] 
selftests/clone3: fix libcap interface usage

The test's set_capability() function needs to set CAP_CHECKPOINT_RESTORE
(bit 40). But libcap's API (cap_set_flag) didn't support cap 40 when the
test was written - it was too new. So the author worked around it by
casting cap_t to an assumed internal layout.

This worked with older libcap versions where cap_t pointed directly to
that layout. Newer libcap internally restructured its cap_t opaque type.

Since 2.43, libcap natively supports CAP_CHECKPOINT_RESTORE, workaround
is no longer needed. The fix directly uses the library interface.

Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Link: https://patch.msgid.link/20260524163840.34247-2-eva.kurchatova@virtuozzo.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
4 weeks agopinctrl: spacemit: Use FIELD_MODIFY()
Hans Zhang [Thu, 30 Apr 2026 17:01:04 +0000 (01:01 +0800)] 
pinctrl: spacemit: Use FIELD_MODIFY()

Use FIELD_MODIFY() to remove open-coded bit manipulation.
No functional change intended.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agopinctrl: sophgo: Use FIELD_MODIFY()
Hans Zhang [Thu, 30 Apr 2026 17:01:03 +0000 (01:01 +0800)] 
pinctrl: sophgo: Use FIELD_MODIFY()

Use FIELD_MODIFY() to remove open-coded bit manipulation.
No functional change intended.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agoipc/sem.c: use unsigned int for nsops
Yi Xie [Mon, 25 May 2026 00:42:20 +0000 (08:42 +0800)] 
ipc/sem.c: use unsigned int for nsops

Use unsigned int instead of unsigned for nsops parameter,
to match declaration in syscalls.h.

Signed-off-by: Yi Xie <xieyi@kylinos.cn>
Link: https://patch.msgid.link/20260525004220.19277-1-xieyi@kylinos.cn
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
4 weeks agoselftests: Fix Makefile target for nsfs
Florian Schmaus [Tue, 26 May 2026 08:01:08 +0000 (10:01 +0200)] 
selftests: Fix Makefile target for nsfs

The kselftests for nsfs where moved under filesystem/ with
commit cae73d3bdce5 ("seltests: move nsfs into filesystems
subfolder"). However, the kselftest TARGETS declaration was not
adjusted.

Since the kselftest Makefile ignores errors unless no target builds,
the invalid target declaration can easily be missed.

Fix this by adjusting the TARGETS accordingly.

Fixes: cae73d3bdce5 ("seltests: move nsfs into filesystems subfolder")
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Link: https://patch.msgid.link/20260526-kselftest-nsfs-v1-1-7b042ebe42d6@geekplace.eu
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
4 weeks agopinctrl: tegra: Add Tegra264 pinmux driver
Prathamesh Shete [Mon, 27 Apr 2026 13:42:30 +0000 (13:42 +0000)] 
pinctrl: tegra: Add Tegra264 pinmux driver

Add support for the three pin controllers (MAIN, UPHY and AON) found on
Tegra264.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agodt-bindings: pinctrl: Document Tegra264 pin controllers
Prathamesh Shete [Mon, 27 Apr 2026 13:42:29 +0000 (13:42 +0000)] 
dt-bindings: pinctrl: Document Tegra264 pin controllers

Tegra264 contains three pin controllers. Document their compatible strings
and describe the list of pins and functions that they provide.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agopinctrl: tegra: Add Tegra238 pinmux driver
Prathamesh Shete [Mon, 27 Apr 2026 13:42:28 +0000 (13:42 +0000)] 
pinctrl: tegra: Add Tegra238 pinmux driver

Add support for the two pin controllers (MAIN and AON) found on Tegra238.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agodt-bindings: pinctrl: Document Tegra238 pin controllers
Prathamesh Shete [Mon, 27 Apr 2026 13:42:27 +0000 (13:42 +0000)] 
dt-bindings: pinctrl: Document Tegra238 pin controllers

Tegra238 contains two pin controllers. Document their compatible strings
and describe the list of pins and functions that they provide.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agopinctrl: tegra: Export tegra_pinctrl_probe()
Prathamesh Shete [Mon, 27 Apr 2026 13:42:26 +0000 (13:42 +0000)] 
pinctrl: tegra: Export tegra_pinctrl_probe()

Export tegra_pinctrl_probe() to allow SoC-specific Tegra pinctrl drivers
built as modules to use the common probe path.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
4 weeks agoACPI: video: Do not initialise device_id_scheme directly
Jean-Ralph Aviles [Sun, 10 May 2026 02:47:20 +0000 (19:47 -0700)] 
ACPI: video: Do not initialise device_id_scheme directly

Drop the unnecessary initialization of device_id_scheme to false.

Signed-off-by: Jean-Ralph Aviles <jeanralph.aviles@gmail.com>
[ rjw: Subject and changelog edits ]
Link: https://patch.msgid.link/39d1c5567a2c0c6454a0c10a32d2dd853349d303.1778378939.git.jeanralph.aviles@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4 weeks agoperf script: Sort includes and add missed explicit dependencies
Ian Rogers [Fri, 22 May 2026 22:04:15 +0000 (15:04 -0700)] 
perf script: Sort includes and add missed explicit dependencies

Fix missing #include of pmu.h found while cleaning the evsel/evlist
header files. Sort the remaining header files for consistency with the
rest of the code. Doing this exposed a missing forward declaration of
addr_location in print_insn.h, add this and sort the forward
declarations.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alice Rogers <alice.mei.rogers@gmail.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
4 weeks agoperf tests: Sort includes and add missed explicit dependencies
Ian Rogers [Fri, 22 May 2026 22:04:14 +0000 (15:04 -0700)] 
perf tests: Sort includes and add missed explicit dependencies

Fix missing #includes found while cleaning the evsel/evlist header
files. Sort the remaining header files for consistency with the rest
of the code.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alice Rogers <alice.mei.rogers@gmail.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
4 weeks agoperf arch x86: Sort includes and add missed explicit dependencies
Ian Rogers [Fri, 22 May 2026 22:04:13 +0000 (15:04 -0700)] 
perf arch x86: Sort includes and add missed explicit dependencies

Fix missing #includes found while cleaning the evsel/evlist header
files. Sort the remaining header files for consistency with the rest
of the code.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alice Rogers <alice.mei.rogers@gmail.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
4 weeks agoperf arch arm: Sort includes and add missed explicit dependencies
Ian Rogers [Fri, 22 May 2026 22:04:12 +0000 (15:04 -0700)] 
perf arch arm: Sort includes and add missed explicit dependencies

Fix missing #includes found while cleaning the evsel/evlist header
files. Sort the remaining header files for consistency with the rest
of the code.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alice Rogers <alice.mei.rogers@gmail.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
4 weeks agoperf: Apply is_ignored_kernel_symbol() filter in ELF loading path for kernel DSOs
Rui Qi [Fri, 22 May 2026 08:26:04 +0000 (16:26 +0800)] 
perf: Apply is_ignored_kernel_symbol() filter in ELF loading path for kernel DSOs

dso__load_sym_internal() had no filtering for .L* and L0* mapping
symbols while the kallsyms path already filters them via
is_ignored_kernel_symbol().

Add the same check gated by dso__kernel() so that kernel ELF objects
(vmlinux, .ko) have mapping symbols filtered across all architectures,
but userspace ELF objects are unaffected -- '$' is a valid prefix in
languages like Java and Scala.

The existing ARM/AArch64 and RISC-V architecture-specific mapping symbol
checks are preserved; the new is_ignored_kernel_symbol() check adds x86
local symbol (.L*, L0*) filtering and provides unified
cross-architecture coverage for kernel DSOs.

Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
4 weeks agoperf: Extract is_ignored_kernel_symbol() for kernel mapping symbol filtering
Rui Qi [Fri, 22 May 2026 08:26:03 +0000 (16:26 +0800)] 
perf: Extract is_ignored_kernel_symbol() for kernel mapping symbol filtering

Mapping symbol filtering is scattered across multiple files with
inconsistent checks.  The kernel's own is_mapping_symbol() covers x86
local symbols ('.L*' and 'L0*') on top of the '$' prefix used by
ARM/AArch64/RISC-V, but the perf tool only checks '$'.

Extract is_ignored_kernel_symbol() into symbol.h matching the kernel
definition, and convert the kallsyms and ksymbol event paths to use it.
Add ksymbol event name validation and early mapping symbol filtering
before any state mutation.

Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
4 weeks agoperf auxtrace: Add kernel-doc comment to auxtrace_record__init() function
Athira Rajeev [Mon, 4 May 2026 15:13:21 +0000 (20:43 +0530)] 
perf auxtrace: Add kernel-doc comment to auxtrace_record__init() function

Add documentation comment describing the parameters
and return code for auxtrace_record__init() in util/auxtrace.c

Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Shivani Nittor <shivani@linux.ibm.com>
Cc: Tanushree.Shah@ibm.com
Cc: Tejas.Manhas1@ibm.com
Cc: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
4 weeks agoiio: light: opt3001: fix missing state reset on timeout
Joshua Crofts [Tue, 26 May 2026 11:15:29 +0000 (13:15 +0200)] 
iio: light: opt3001: fix missing state reset on timeout

Currently in the function opt3001_get_processed(), there is a check
that directly returns -ETIMEDOUT if the conversion IRQ times out,
completely bypassing the err label, leaving ok_to_ignore_lock
permanently true, potentially breaking the device's falling threshold
interrupt detection.

Assign -ETIMEDOUT to the return variable and jump to the error label
to ensure ok_to_ignore_lock is properly reset.

Fixes: 26d90b559057 ("iio: light: opt3001: Fixed timeout error when 0 lux")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260525-opt3001-cleanup-v4-0-65b36a174f78%40gmail.com?part=1
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
4 weeks agopowerpc tools perf: Initialize error code in auxtrace_record_init function
Athira Rajeev [Mon, 4 May 2026 15:13:20 +0000 (20:43 +0530)] 
powerpc tools perf: Initialize error code in auxtrace_record_init function

perf trace record fails some cases in powerpc

 # perf test "perf trace record and replay"
 128: perf trace record and replay                                    : FAILED!

  # perf trace record sleep 1
  # echo $?
    32

This is happening because of non-zero err value from
auxtrace_record__init() function.

 static int record__auxtrace_init(struct record *rec)
 {
        int err;

        if ((rec->opts.auxtrace_snapshot_opts || rec->opts.auxtrace_sample_opts)
            && record__threads_enabled(rec)) {
                pr_err("AUX area tracing options are not available in parallel streaming mode.\n");
                return -EINVAL;
        }

        if (!rec->itr) {
                rec->itr = auxtrace_record__init(rec->evlist, &err);
                if (err)
                        return err;
        }

Here "int err" is not initialised. The code expects "err" to be set from
auxtrace_record__init() function.

Update auxtrace_record__init() in arch/powerpc/util/auxtrace.c to clear
err value in the beginning.

- Clear err value in beginning of function. Any fail later will
set appropriate return code to err.

- Even if we haven't found any event for auxtrace, perf record
should continue for other events. NULL return
will indicate that there is no auxtrace record initialized.

- Not having "err" set here will affect monitoring of other events
also because perf record will fail seeing random value in err.

Set err to -EINVAL before invoking auxtrace_record__init() in
builtin-record.c

With the fix,

  # perf trace record sleep 1
  [ perf record: Woken up 2 times to write data ]
  [ perf record: Captured and wrote 0.033 MB perf.data (228 samples) ]

Fixes: 1dbfaf94cf66ec4b ("perf powerpc: Add basic CONFIG_AUXTRACE support for VPA pmu on powerpc")
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Athira Rajeev <atrajeev@linux.ibm.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Shivani Nittor <shivani@linux.ibm.com>
Cc: Tanushree Shah <tanushree.shah@ibm.com>
Cc: Tejas Manhas <tejas.manhas1@ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
4 weeks agodrm/xe/pm: Do early initialization in init_early()
Michal Wajdeczko [Tue, 26 May 2026 19:54:52 +0000 (21:54 +0200)] 
drm/xe/pm: Do early initialization in init_early()

There is no need nor gain in splitting mutex or list initializations
between two init functions as all of this is just pure software state
and all this could be done at once.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260526195452.20545-8-michal.wajdeczko@intel.com
4 weeks agodrm/xe/pm: Don't access device in init_early()
Michal Wajdeczko [Tue, 26 May 2026 19:54:51 +0000 (21:54 +0200)] 
drm/xe/pm: Don't access device in init_early()

We should separate software-only state initialization from anything
else that requires access to the device's hardware. Extract d3cold
capability detection into a new function. Add simple kernel-doc for
updated functions here.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260526195452.20545-7-michal.wajdeczko@intel.com
4 weeks agodrm/xe: Separate early xe_device initialization
Michal Wajdeczko [Tue, 26 May 2026 19:54:50 +0000 (21:54 +0200)] 
drm/xe: Separate early xe_device initialization

We would like to initialize more of the xe_device struct also from
the kunit code, as it should be safe to use most of the generic drm
or xe components without doing any additional tweaks. Separate early
xe initialization code to a new function, so it can be reused.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260526195452.20545-6-michal.wajdeczko@intel.com
4 weeks agodrm/xe: Move xe->info.devid|revid initialization
Michal Wajdeczko [Tue, 26 May 2026 19:54:49 +0000 (21:54 +0200)] 
drm/xe: Move xe->info.devid|revid initialization

The xe_info_init_early() is a place where we initialize those of
the xe->info fields that do not require any additional hardware
probes. Move the initialization of the devid/revid also there, but
to avoid breaking the kunit helper, which also calls this function,
keep their initialization separate in sub-function so we can easily
stub it when running the kunit test.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260526195452.20545-5-michal.wajdeczko@intel.com
4 weeks agodrm/xe: Move xe->info.force_execlist initialization
Michal Wajdeczko [Tue, 26 May 2026 19:54:48 +0000 (21:54 +0200)] 
drm/xe: Move xe->info.force_execlist initialization

The xe_info_init_early() is a place where we initialize those of
the xe->info fields that do not require any additional hardware
probes. Move the initialization of the force_execlist flag there.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260526195452.20545-4-michal.wajdeczko@intel.com
4 weeks agodrm/xe: Drop unused param from xe_device_create()
Michal Wajdeczko [Tue, 26 May 2026 19:54:47 +0000 (21:54 +0200)] 
drm/xe: Drop unused param from xe_device_create()

We never used or need anything from the struct pci_device_id there.
And while around, add simple kernel-doc for this function.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260526195452.20545-3-michal.wajdeczko@intel.com
4 weeks agodrm/xe: Use raw device ID to find sub-platform descriptor
Michal Wajdeczko [Tue, 26 May 2026 19:54:46 +0000 (21:54 +0200)] 
drm/xe: Use raw device ID to find sub-platform descriptor

We don't need the partially initialized xe_device pointer to
find the sub-platform descriptor, as for the descriptor lookup
only the device ID is required and it can be obtained directly
from the pci_dev.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Link: https://patch.msgid.link/20260526195452.20545-2-michal.wajdeczko@intel.com
4 weeks agoALSA: hda: cs35l41: imply SERIAL_MULTI_INSTANTIATE
Johny Lin [Wed, 27 May 2026 02:33:50 +0000 (04:33 +0200)] 
ALSA: hda: cs35l41: imply SERIAL_MULTI_INSTANTIATE

Use a weak reverse selection to suggest the config
SERIAL_MULTI_INSTANTIATE just like cs35l56 did.

Signed-off-by: Johny Lin <johnylin@google.com>
Link: https://patch.msgid.link/20260527023350.3067547-1-johnylin@google.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: seq: midi: Serialize output teardown with event_input
Zhang Cen [Wed, 27 May 2026 06:29:48 +0000 (14:29 +0800)] 
ALSA: seq: midi: Serialize output teardown with event_input

event_process_midi() borrows msynth->output_rfile.output and then
passes the substream to dump_midi() and snd_rawmidi_kernel_write()
without synchronizing with the output open/close transition.
midisynth_use() also publishes output_rfile before
snd_rawmidi_output_params() has finished.

The last midisynth_unuse() can therefore release the same rawmidi file
and free substream->runtime before snd_rawmidi_kernel_write1() takes
its runtime buffer reference. That leaves the event_input path using a
stale substream or runtime and can end in a NULL-deref or use-after-free.

Fix this with two pieces of synchronization. Keep a short IRQ-safe
spinlock only for publishing or clearing output_rfile and for pairing
the output snapshot with an snd_use_lock_t reference. Once
event_process_midi() has taken that in-flight reference, it drops the
spinlock before calling snd_seq_dump_var_event(), dump_midi(), or
snd_rawmidi_kernel_write(). midisynth_unuse() now detaches the visible
rawmidi file under the same spinlock, waits for the in-flight writers
to drain, and only then drains and releases the saved file.
midisynth_use() likewise opens into a local snd_rawmidi_file and
publishes it only after snd_rawmidi_output_params() succeeds.

The buggy scenario involves two paths, with each column showing the
order within that path:

event_input path:                     last unuse path:
1. event_process_midi() snapshots    1. midisynth_unuse() starts
   output_rfile.output.                 tearing down output_rfile.
2. dump_midi() reaches               2. snd_rawmidi_kernel_release()
   snd_rawmidi_kernel_write()           closes the output file.
   before runtime is pinned.         3. close_substream() frees
3. The callback keeps using             substream->runtime.
   the borrowed substream.

Validation reproduced this kernel report:
KASAN null-ptr-deref in snd_rawmidi_kernel_write1+0x56/0x360
RIP: 0033:0x7fde7dd0837f
RIP: 0010:snd_rawmidi_kernel_write1+0x56/0x360

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Assisted-by: Codex:gpt-5.5
Signed-off-by: Zhang Cen <rollkingzzc@gmail.com>
Link: https://patch.msgid.link/20260527062948.3614025-1-rollkingzzc@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoiio: chemical: scd30: Cleanup initializations and fix sign-extension bug
Maxwell Doose [Tue, 26 May 2026 22:55:24 +0000 (17:55 -0500)] 
iio: chemical: scd30: Cleanup initializations and fix sign-extension bug

Include linux/bitfield.h for FIELD_GET().

Create new macros for bit manipulation in combination with manual bit
manipulation being replaced with FIELD_GET().

The current variable declaration and initializations are barely readable
and use comma separations across multiple lines. Refactor the
initializations so that mantissa and exp have separate declarations and
sign gets initialized later.

In addition (and due to the nature of the cleanup), fix a sign-extension
bug where, float32 would get bitwise anded with ~BIT(31)
(which is 0xFFFFFFFF7FFFFFFF) which corrupted the exponent.

Fixes: 64b3d8b1b0f5c ("iio: chemical: scd30: add core driver")
Reported-by: sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260524020309.18618-1-m32285159%40gmail.com
Signed-off-by: Maxwell Doose <m32285159@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
4 weeks agoASoC: Address es9356 build failures without CONFIG_SND_SOC_SDCA
Mark Brown [Wed, 27 May 2026 10:14:03 +0000 (11:14 +0100)] 
ASoC: Address es9356 build failures without CONFIG_SND_SOC_SDCA

Nathan Chancellor <nathan@kernel.org> says:

This series addresses the build failure I reported at [1]. The first
patch allows CONFIG_SND_SOC_SDCA to be selected by a user. The third
patch fixes the actual build failure by requiring CONFIG_SND_SOC_SDCA to
enable CONFIG_SND_SOC_ES9356. The second patch is a standalone clean up
to make the third patch diff cleaner. If there are any issues, please
let me know.

[1]: https://lore.kernel.org/20260518224657.GA536765@ax162/

Link: https://patch.msgid.link/20260526-es9356-dep-fixes-v1-0-39ac16f43d54@kernel.org
4 weeks agoASoC: es9356-sdca: Depend on CONFIG_SND_SOC_SDCA
Nathan Chancellor [Tue, 26 May 2026 21:53:14 +0000 (14:53 -0700)] 
ASoC: es9356-sdca: Depend on CONFIG_SND_SOC_SDCA

When building without CONFIG_SND_SOC_SDCA, there is an error at link
time when building the es9356-sdca driver:

  ERROR: modpost: "sdca_asoc_q78_get_volsw" [sound/soc/codecs/snd-soc-es9356.ko] undefined!
  ERROR: modpost: "sdca_asoc_q78_put_volsw" [sound/soc/codecs/snd-soc-es9356.ko] undefined!

Add an explicit dependency on CONFIG_SND_SOC_SDCA to ensure these
symbols are always present when building the driver.

Fixes: 5d9cb740cd38 ("ASoC: es9356-sdca: Add ES9356 SDCA driver")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260526-es9356-dep-fixes-v1-3-39ac16f43d54@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 weeks agoASoC: codecs: Adjust indentation in CONFIG_SND_SOC_ES9356 definition
Nathan Chancellor [Tue, 26 May 2026 21:53:13 +0000 (14:53 -0700)] 
ASoC: codecs: Adjust indentation in CONFIG_SND_SOC_ES9356 definition

The indentation of CONFIG_SND_SOC_ES9356 uses spaces, instead of the
Kconfig standard using tabs. Adjust it.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260526-es9356-dep-fixes-v1-2-39ac16f43d54@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 weeks agoASoC: SDCA: Make CONFIG_SND_SOC_SDCA a user selectable symbol
Nathan Chancellor [Tue, 26 May 2026 21:53:12 +0000 (14:53 -0700)] 
ASoC: SDCA: Make CONFIG_SND_SOC_SDCA a user selectable symbol

Currently, CONFIG_SND_SOC_SDCA is a hidden Kconfig symbol, so it must be
selected by a user selectable symbol to be enabled. However, it may not
be possible for configurations to select this symbol without running
into a recursive dependency issue:

  error: recursive dependency detected!
          symbol SOUNDWIRE depends on SND_SOC_SDCA_OPTIONAL
          symbol SND_SOC_SDCA_OPTIONAL default value contains SND_SOC_SDCA
          symbol SND_SOC_SDCA is selected by SND_SOC_ES9356
          symbol SND_SOC_ES9356 depends on SOUNDWIRE

Turn CONFIG_SND_SOC_SDCA into a user selectable symbol so that drivers
can depend on it and allow the user to enable it explicitly.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260526-es9356-dep-fixes-v1-1-39ac16f43d54@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 weeks agoASoC: mediatek: mt2701: allocate i2s_path with priv
Rosen Penev [Tue, 19 May 2026 01:04:13 +0000 (18:04 -0700)] 
ASoC: mediatek: mt2701: allocate i2s_path with priv

Use a flexible array member to combine allocations.

Clean up surrounding code and allocate based on afe_priv and not
platform_priv which is a void pointer. struct_size needs a properly
typed pointer to work.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260519010413.629214-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 weeks agomtd: maps: remove obsolete impa7 map driver
Arnd Bergmann [Tue, 26 May 2026 10:32:06 +0000 (12:32 +0200)] 
mtd: maps: remove obsolete impa7 map driver

This driver was originally merged in 2002 for a board using
the Cirrus Logic CL/PS711x platform, but the actual board
file never made it upstream.

The SoC platform is still supported but uses devicetree
based probing, so if anyone ever wanted to upstream board
support, they would just use the regular physmap driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: maps: remove uclinux map driver
Arnd Bergmann [Tue, 26 May 2026 10:32:05 +0000 (12:32 +0200)] 
mtd: maps: remove uclinux map driver

Rather than using platform data or DT properties, the configuration
for this mtd map driver used to be passed through the global
uclinux_ram_map structure, but the last instance was removed in
commit 4ba66a976072 ("arch: remove blackfin port") in 2018.

After commit 251f26c9e828 ("mtd: maps: Make uclinux_ram_map static"),
it became impossible to configure it at all, even with out-of-tree
platform code.

Clearly nobody is using it, so remove it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: maps: remove AMD Élan specific drivers
Arnd Bergmann [Tue, 26 May 2026 10:32:04 +0000 (12:32 +0200)] 
mtd: maps: remove AMD Élan specific drivers

There were four MTD maps drivers that were used with AMD Élan SoCs.
Since 486-class CPU support was removed in commit 8b793a92d862 ("x86/cpu:
Remove M486/M486SX/ELAN support"), it is no longer possible to actually
use these. Three of them have already been removed, so remove the
remaining driver entirely.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[Miquel Raynal: Only NETtel was still in the tree, adapt the patch and the commit log]
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agoKVM: arm64: PMU: Preserve AArch32 counter low bits
Qiang Ma [Tue, 26 May 2026 07:46:40 +0000 (15:46 +0800)] 
KVM: arm64: PMU: Preserve AArch32 counter low bits

AArch32 writes to PMU event counters cannot update the top 32 bits,
even when PMUv3p5 makes the counters 64-bit. KVM therefore needs to
preserve the existing high half and only update the low half written by
the guest, unless the caller explicitly forces a full reset through
PMCR.P.

The current code masks @val down to the old high half before taking
lower_32_bits(val), which means the low half is always zero. As a
result, AArch32 writes to event counters discard the guest-provided low
32 bits instead of storing them.

Build the new value from the old high 32 bits and the low 32 bits of
the value supplied by the guest.

Fixes: 26d2d0594d70 ("KVM: arm64: PMU: Do not let AArch32 change the counters' top 32 bits")
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://patch.msgid.link/20260526074640.791991-1-maqianga@uniontech.com
Cc: stable@vger.kernel.org
4 weeks agofirmware: arm_ffa: Treat missing FF-A feature on a platform as a probe miss
Sudeep Holla [Tue, 26 May 2026 10:36:49 +0000 (11:36 +0100)] 
firmware: arm_ffa: Treat missing FF-A feature on a platform as a probe miss

When FF-A initialisation is driven from a platform device probe, systems
that do not implement FF-A can return -EOPNOTSUPP from the early transport
or version discovery paths. Driver core treats that as a matched probe
failure and prints:

  |  arm-ffa arm-ffa: probe with driver arm-ffa failed with error -95

That is noisy for a firmware interface that can be absent on otherwise
valid systems. Driver core already treats -ENODEV and -ENXIO as quiet
rejected matches, so translate only the early unsupported discovery cases
to -ENODEV. Keep later setup failures unchanged so real FF-A
initialisation problems are still reported as probe failures.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/all/20260523001148.GA1319283@ax162
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260526103649.5684-1-sudeep.holla@kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
4 weeks agomtd: inftlmount: convert printk(KERN_WARNING) to pr_warn
Li Xinyu [Tue, 26 May 2026 09:45:40 +0000 (17:45 +0800)] 
mtd: inftlmount: convert printk(KERN_WARNING) to pr_warn

Replace all printk(KERN_WARNING ...) calls with pr_warn() to follow
the kernel's recommended logging style and resolve checkpatch warnings.
Also convert one bare printk() that was missing a log level.

No functional change.

Signed-off-by: Li Xinyu <xinyuili@126.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: Consistently define pci_device_ids
Uwe Kleine-König (The Capable Hub) [Fri, 22 May 2026 17:32:34 +0000 (19:32 +0200)] 
mtd: Consistently define pci_device_ids

Initializing a pci_device_id using plain list expressions is hard to
understand for a human who isn't into the Linux PCI subsystem. So for
each initializer use one of the PCI_DEVICE macros for .vendor, .device,
.subvendor and .subdevice and named initializers for the remaining
assignments. This makes it easier to parse and also more robust against
chagnes to the struct definition.

Also drop useless zeros and commas.

The mentioned robustness is relevant for a planned change to struct
pci_device_id that replaces .driver_data by an anonymous union.

This change doesn't introduce changes to the compiled pci_device_id
array. Tested on x86 and arm64.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: rawnand: pl353: fix probe resource allocation
Bastien Curutchet [Tue, 26 May 2026 07:10:00 +0000 (09:10 +0200)] 
mtd: rawnand: pl353: fix probe resource allocation

During probe(), the devm_ioremap() is called with the parent device
instead of the current one. So when the module is unloaded, the register
area isn't released.

Target the pl35x device in the devm_ioremap() instead of its parent.

Cc: stable@vger.kernel.org
Fixes: 08d8c62164a3 ("mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller")
Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: rawnand: qcom: embed nand_controller into qcom_nand_controller
Rosen Penev [Mon, 25 May 2026 22:04:40 +0000 (15:04 -0700)] 
mtd: rawnand: qcom: embed nand_controller into qcom_nand_controller

The qcom_nand_controller had a struct nand_controller *controller
pointer that was assigned to (struct nand_controller *)&nandc[1],
with the allocation oversized by sizeof(*controller) to make room.
get_qcom_nand_controller() then walked backwards from chip->controller
using sizeof()-based arithmetic to recover the enclosing nandc.

Embed the nand_controller directly into qcom_nand_controller and use
container_of() in get_qcom_nand_controller(). The header now needs
the full rawnand.h definition rather than a forward declaration.

Assisted-by: Claude:Opus-4.7
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: rawnand: Pause continuous reads at block boundaries
Miquel Raynal [Fri, 22 May 2026 09:17:39 +0000 (11:17 +0200)] 
mtd: rawnand: Pause continuous reads at block boundaries

Some chips do not support sequential cached reads past block
boundaries, like Winbond. In practice when using UBI, this should very
rarely happen, but let's make sure it never happens.

Cc: stable@vger.kernel.org
Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: maps: vmu-flash: fix NULL pointer dereference in initialization
Florian Fuchs [Mon, 18 May 2026 11:45:21 +0000 (13:45 +0200)] 
mtd: maps: vmu-flash: fix NULL pointer dereference in initialization

The mtd_info contains a struct device, which must be linked to its
parent. Without this, the initialization of the MTD fails with a NULL
pointer dereference.

Fixes: 47a72688fae7 ("mtd: flash mapping support for Dreamcast VMU.")
Cc: stable@vger.kernel.org
Signed-off-by: Florian Fuchs <fuchsfl@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: maps: vmu-flash: fix fault in unaligned fixup
Florian Fuchs [Mon, 18 May 2026 11:45:20 +0000 (13:45 +0200)] 
mtd: maps: vmu-flash: fix fault in unaligned fixup

Use kzalloc_obj() / kzalloc_objs() to allocate the memcard structs,
instead of kmalloc_obj() / kmalloc_objs() to prevent access to
uninitialized data.

Fixes runtime error: Fault in unaligned fixup: 0000 [#1] at
mtd_get_fact_prot_info.

Fixes: 47a72688fae7 ("mtd: flash mapping support for Dreamcast VMU.")
Cc: stable@vger.kernel.org
Signed-off-by: Florian Fuchs <fuchsfl@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: spinand: macronix: Enable randomizer support
Cheng Ming Lin [Tue, 5 May 2026 01:34:53 +0000 (09:34 +0800)] 
mtd: spinand: macronix: Enable randomizer support

Implement the 'set_randomizer' callback for Macronix SPI NAND chips.
The randomizer is enabled by setting bit 1 of the Configuration Register
(address 0x10).

This patch adds support for the following chips:
  - MX35LFxG24AD series
  - MX35UFxG24AD series

When the randomizer is enabled, data is scrambled internally during
program operations and automatically descrambled during read operations.
This helps reduce bit errors caused by program disturbance.

Please refer to the following link for randomizer feature:
Link: https://www.mxic.com.tw/Lists/ApplicationNote/Attachments/2151/AN1051V1-The%20Introduction%20of%20Randomizer%20Feature%20on%20MX30xFxG28AD_MX35xFxG24AD.pdf
Signed-off-by: Cheng Ming Lin <chengminglin@mxic.com.tw>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: spinand: Add support for randomizer
Cheng Ming Lin [Tue, 5 May 2026 01:34:52 +0000 (09:34 +0800)] 
mtd: spinand: Add support for randomizer

This patch adds support for the randomizer feature.

It introduces a 'set_randomizer' callback in 'struct spinand_info' and
'struct spinand_device'.

If a driver implements this callback, the core will invoke it during
device initialization (spinand_init) to enable or disable the randomizer
feature based on the device tree configuration.

Signed-off-by: Cheng Ming Lin <chengminglin@mxic.com.tw>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agodt-bindings: mtd: nand: Add nand-randomizer property
Cheng Ming Lin [Tue, 5 May 2026 01:34:51 +0000 (09:34 +0800)] 
dt-bindings: mtd: nand: Add nand-randomizer property

Add the 'nand-randomizer' property to control the data randomizer
feature. This is used to improve data reliability by reducing
cell-to-cell interference.

Depending on the hardware architecture, this property is designed to be
generic and can apply to either the NAND chip's internal randomizer
or the hardware randomizer engine embedded in the NAND host controller.

This property is defined as a uint32 enum (0 or 1) instead of a simple
boolean. This design choice explicitly supports the "not present" case.
If the property is omitted, the driver will not interfere and will leave
the randomizer in its current state (e.g., as already configured by the
bootloader or hardware default).

Signed-off-by: Cheng Ming Lin <chengminglin@mxic.com.tw>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: sc520cdp: Remove mapping since board is no longer supported
Sean Young [Wed, 6 May 2026 14:42:49 +0000 (15:42 +0100)] 
mtd: sc520cdp: Remove mapping since board is no longer supported

Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"),
this board is no longer supported. Remove the mtd map too.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: netsc520: Remove mapping since board is no longer supported
Sean Young [Wed, 6 May 2026 14:42:48 +0000 (15:42 +0100)] 
mtd: netsc520: Remove mapping since board is no longer supported

Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"),
this board is no longer supported. Remove the mtd map too.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: ts5500_flash: Remove mapping since board is no longer supported
Sean Young [Wed, 6 May 2026 14:42:47 +0000 (15:42 +0100)] 
mtd: ts5500_flash: Remove mapping since board is no longer supported

Since commit 8b793a92d862 ("x86/cpu: Remove M486/M486SX/ELAN support"),
this board is no longer supported. Remove the mtd map too.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomtd: rawnand: fix condition in 'nand_select_target()'
Arseniy Krasnov [Tue, 5 May 2026 08:30:30 +0000 (11:30 +0300)] 
mtd: rawnand: fix condition in 'nand_select_target()'

'cs' here must be in range [0:nanddev_ntargets[.

Cc: stable@vger.kernel.org
Fixes: 32813e288414 ("mtd: rawnand: Get rid of chip->numchips")
Signed-off-by: Arseniy Krasnov <avkrasnov@rulkc.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 weeks agomedia: staging: imx: remove unnecessary out-of-memory error message
Shyam Sunder Reddy Padira [Sun, 3 May 2026 15:00:26 +0000 (20:30 +0530)] 
media: staging: imx: remove unnecessary out-of-memory error message

Remove dev_err() call after dma_alloc_coherent() failure.

checkpatch.pl reports this as an unnecessary out-of-memory message because
failure is already conveyed by returning -ENOMEM, and the current message
does not provide additional useful debugging information.

Signed-off-by: Shyam Sunder Reddy Padira <shyamsunderreddypadira@gmail.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: staging: imx-csi: use media_pad_is_streaming helper
Michael Tretter [Thu, 18 Dec 2025 09:23:51 +0000 (10:23 +0100)] 
media: staging: imx-csi: use media_pad_is_streaming helper

The media_pad_is_streaming() helper is explicitly intended to check whether
a pad has been started with media_pipeline_start(). Use it instead of
relying on the implicit assumption that a pad with a pipeline is streaming.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: staging: imx-csi: explicitly start media pipeline on pad 0
Michael Tretter [Thu, 18 Dec 2025 09:23:50 +0000 (10:23 +0100)] 
media: staging: imx-csi: explicitly start media pipeline on pad 0

entity->pads is an array that contains all the pads of an entity.

Calling __media_pipeline_start() or __media_pipeline_stop() on the pads,
implicitly starts the pipeline with the first pad in this array as origin.

Explicitly use the first pad to start the pipeline to make this more
obvious to the reader.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: staging: imx-csi: move media_pipeline to video device
Michael Tretter [Thu, 18 Dec 2025 09:23:49 +0000 (10:23 +0100)] 
media: staging: imx-csi: move media_pipeline to video device

The imx-media driver has a single imx_media_device. Attaching the
media_pipeline to the imx_media_device prevents the execution of multiple
media pipelines on the device. This should be possible as long as the
media_pipelines don't use the same pads or pads that be configured while
the other media pipeline is streaming.

Move the media_pipeline to the imx_media_video_dev to be able to construct
media pipelines per imx capture device.

If different media pipelines in the media device conflict, the validation
will fail. Thus, the pipeline will fail to start and signal an error to
user space.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agowifi: rtw89: usb: Support switching to USB 3 mode
Bitterblue Smith [Wed, 20 May 2026 14:44:35 +0000 (17:44 +0300)] 
wifi: rtw89: usb: Support switching to USB 3 mode

The Realtek wifi 6/7 devices which support USB 3 are weird: when first
plugged in, they pretend to be USB 2. The driver needs to send some
commands to the device, which make it disappear and come back as a
USB 3 device.

Implement the required commands in rtw89.

Add a new function rtw89_usb_write32_quiet() to avoid the warnings
when writing to R_{AX,BE}_PAD_CTRL2. Even though the write succeeds,
usb_control_msg() returns -EPROTO, probably because the USB device
disappears immediately. This results in some confusing warnings in
the kernel log.

When a USB 3 device is plugged into a USB 2 port, rtw89 will try to
switch it to USB 3 mode only once. The device will disappear and come
back still in USB 2 mode, of course.

Tested with RTL8832AU, RTL8832BU, RTL8832CU, and RTL8912AU.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/e955451c-93a1-4d04-8024-d224a04f1d4a@gmail.com
4 weeks agomedia: rcar-vin: Drop min_queued_buffers
Jacopo Mondi [Mon, 4 May 2026 12:43:14 +0000 (14:43 +0200)] 
media: rcar-vin: Drop min_queued_buffers

The R-Car VIN driver already uses a scratch buffer to sustain capture
operations in absence of a frame buffer provided by userspace.

There is no reason to require 4 buffers queued at all times for the
driver to operate. Drop min_queued_buffers from the VIN driver to allow
single-frame capture operations.

Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Reviewed-by: Jai Luthra <jai.luthra+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agowifi: rtw88: Add more validation for the RX descriptor
Bitterblue Smith [Wed, 20 May 2026 14:14:26 +0000 (17:14 +0300)] 
wifi: rtw88: Add more validation for the RX descriptor

Some RTL8821CE cards can return frames with corrupted RX descriptor,
causing warnings and crashes if they are passed to the upper layers.

The PHY status size field is 4 bits wide, but in rtw88 its value should
only be 0 or 4. Checking this catches most of the corrupt frames.

If a PHY status is present, the PHY status size should not be 0.

The frame size should not be less than or equal to 4 and should not
exceed 11454.

The rate should not exceed 4SS MCS9.

Discard the frame if any of these checks fail.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221286
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Tested-by: Oleksandr Havrylov <goainwo@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/5bfecba3-8a90-4e0f-9558-af5cd8a14975@gmail.com
4 weeks agowifi: rtw89: 8922d: configure TX shape settings
Zong-Zhe Yang [Wed, 20 May 2026 12:38:23 +0000 (20:38 +0800)] 
wifi: rtw89: 8922d: configure TX shape settings

By default, BB enables triangular spectrum by a series of register
settings. According to band and regulation, RF parameters determine whether
TX shape needs to be restricted or not. So now, clear the corresponding
settings if it has no need to do.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260520123823.1792954-8-pkshih@realtek.com
4 weeks agowifi: rtw89: debug: show large MRU in txpwr_table dbgfs
Zong-Zhe Yang [Wed, 20 May 2026 12:38:22 +0000 (20:38 +0800)] 
wifi: rtw89: debug: show large MRU in txpwr_table dbgfs

Read and print the CR settings of large MRU.
For now, only RTL8922D_CID7090 support it.

For example,

[TX power limit_large_mru]
RU484_242 1TX      -  IDX_0   IDX_1   IDX_2   IDX_3  |  17,   0,   0,   0, dBm
RU484_242 2TX      -  IDX_0   IDX_1   IDX_2   IDX_3  |  16,   0,   0,   0, dBm
RU996_484 1TX      -  IDX_0   IDX_1  |   0,   0, dBm
RU996_484 2TX      -  IDX_0   IDX_1  |   0,   0, dBm
RU996_484_242 1TX  -  IDX_0   IDX_1  |   0,   0, dBm
RU996_484_242 2TX  -  IDX_0   IDX_1  |   0,   0, dBm

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260520123823.1792954-7-pkshih@realtek.com
4 weeks agodrm/i915/power: drop resume parameter from intel_display_power_init_hw()
Jani Nikula [Tue, 26 May 2026 12:55:59 +0000 (15:55 +0300)] 
drm/i915/power: drop resume parameter from intel_display_power_init_hw()

intel_power_domains_resume() calling intel_display_power_init_hw() with
the resume parameter is an internal implementation detail. Hide it
inside intel_display_power.c, and provide a clean external interface
without the parameter.

Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/63666514d457f548c69ccd35c02f2b8200ca08a1.1779800132.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
4 weeks agodrm/i915/power: rename intel_power_domains_*() to intel_display_power_*()
Jani Nikula [Tue, 26 May 2026 12:55:58 +0000 (15:55 +0300)] 
drm/i915/power: rename intel_power_domains_*() to intel_display_power_*()

It's confusing that intel_display_power.[ch] exposes two groups of
interfaces, one named intel_power_domains_*() and one
intel_display_power_*().

Unify on the latter, based on the file name, but also because it's more
generic. This makes the caller side easier to follow.

Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/8fae4b0e3476aeffb0164215b7e0f0ae1d825f72.1779800132.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
4 weeks agodrm/i915/power: make intel_power_domains_{suspend, resume}() static
Jani Nikula [Tue, 26 May 2026 12:55:57 +0000 (15:55 +0300)] 
drm/i915/power: make intel_power_domains_{suspend, resume}() static

intel_power_domains_suspend() and intel_power_domains_resume() are only
used inside intel_display_power.c. Make them static.

Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/bfb5f09794b6b5035839d0182d22980119da2165.1779800132.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
4 weeks agowifi: rtw89: Wi-Fi 7 configure TX power limit for large MRU
Zong-Zhe Yang [Wed, 20 May 2026 12:38:21 +0000 (20:38 +0800)] 
wifi: rtw89: Wi-Fi 7 configure TX power limit for large MRU

Support of Large MRU (Multiple Resource Unit) starts from RTL8922D_CID7090,
i.e. RTL8922A and RTL8922D-VS variant do not support it. There are the new
corresponding control registers. So, configure them.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260520123823.1792954-6-pkshih@realtek.com
4 weeks agowifi: rtw89: fw: load TX compensation element by RFE type
Ping-Ke Shih [Wed, 20 May 2026 12:38:20 +0000 (20:38 +0800)] 
wifi: rtw89: fw: load TX compensation element by RFE type

Originally driver uses TX compensation element by AID, and now tables are
by RFE type. Add the logic accordingly.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260520123823.1792954-5-pkshih@realtek.com
4 weeks agowifi: rtw89: 8922d: support new digital power compensation format
Ping-Ke Shih [Wed, 20 May 2026 12:38:19 +0000 (20:38 +0800)] 
wifi: rtw89: 8922d: support new digital power compensation format

The new format shared the base set (7 elements). As there are total 40
sets, save 7 * 39 elements.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260520123823.1792954-4-pkshih@realtek.com
4 weeks agowifi: rtw89: 8922d: refactor digital power compensation to support new format
Ping-Ke Shih [Wed, 20 May 2026 12:38:18 +0000 (20:38 +0800)] 
wifi: rtw89: 8922d: refactor digital power compensation to support new format

Because base settings of digital power compensation can be shared across
all bands, the settings are divided into two parts -- base and individual
values per bands. Refactor the code to be reuse with new format.

No change logic at all.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260520123823.1792954-3-pkshih@realtek.com
4 weeks agowifi: rtw89: fw: load TX power track element according to AID
Zong-Zhe Yang [Wed, 20 May 2026 12:38:17 +0000 (20:38 +0800)] 
wifi: rtw89: fw: load TX power track element according to AID

RF parameters has different TX power track table for different AID.
FW elements may include multiple TX power track tables for different
AID. So, load the corresponding one.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260520123823.1792954-2-pkshih@realtek.com
4 weeks agoARM: omap1: enable real software node lookup of GPIOs on Nokia 770
Bartosz Golaszewski [Thu, 30 Apr 2026 07:30:57 +0000 (09:30 +0200)] 
ARM: omap1: enable real software node lookup of GPIOs on Nokia 770

Currently the board file for Nokia 770 creates dummy software nodes not
attached in any way to the actual GPIO controller devices and uses the
fact that GPIOLIB matching swnode's name to the GPIO chip's label during
software node lookup. This behavior is wrong and we want to remove it.
To that end, we need to first convert all existing users to creating
actual fwnode links.

Create real software nodes for GPIO controllers on OMAP16xx and
reference them from the software nodes in the nokia board file.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Link: https://patch.msgid.link/20260430-nokia770-gpio-swnodes-v7-3-c88f74c90dd6@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
4 weeks agoARM: omap1: use platform_device_register_full() for GPIO devices on OMAP 16xx
Bartosz Golaszewski [Thu, 30 Apr 2026 07:30:56 +0000 (09:30 +0200)] 
ARM: omap1: use platform_device_register_full() for GPIO devices on OMAP 16xx

Ahead of changes attaching GPIO controller's software nodes referenced
from the Nokia 770 board files to their target devices, switch the
method for registering the platform devices to the
platform_device_register_full() variant. This is done to leverage the
new swnode field of struct platform_device_info which automate the
software node's registration and assignment.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Link: https://patch.msgid.link/20260430-nokia770-gpio-swnodes-v7-2-c88f74c90dd6@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
4 weeks agoARM: omap1: drop unused variable from omap16xx_gpio_init()
Bartosz Golaszewski [Thu, 30 Apr 2026 07:30:55 +0000 (09:30 +0200)] 
ARM: omap1: drop unused variable from omap16xx_gpio_init()

The pdata variable is set but not used. Remove it.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Link: https://patch.msgid.link/20260430-nokia770-gpio-swnodes-v7-1-c88f74c90dd6@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
4 weeks agogpio: gpiolib: use seq_puts() for plain strings
Chen Jung Ku [Tue, 26 May 2026 12:19:05 +0000 (20:19 +0800)] 
gpio: gpiolib: use seq_puts() for plain strings

Replace seq_printf() with seq_puts() where the format string is a
plain string literal with no format specifiers.

No functional change intended.

Signed-off-by: Chen Jung Ku <ku.loong@gapp.nthu.edu.tw>
Link: https://patch.msgid.link/20260526121905.46345-1-ku.loong@gapp.nthu.edu.tw
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
4 weeks agogpio: ts5500: remove obsolete driver
Arnd Bergmann [Tue, 26 May 2026 10:33:54 +0000 (12:33 +0200)] 
gpio: ts5500: remove obsolete driver

The ts5500 platform is no longer functional because it is
based on the removed AMD Élan i486 SoC. Remove the now
obsolete driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260526103424.3246915-1-arnd@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
4 weeks agoMIPS: alchemy: db1300: switch to static device properties
Dmitry Torokhov [Tue, 26 May 2026 16:40:37 +0000 (18:40 +0200)] 
MIPS: alchemy: db1300: switch to static device properties

Convert "5way switch" gpio-keys device and smsc911x ethernet controller
to use static device properties instead of bespoke platform data
structures for configuration.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[Bartosz: use platform_device_info::swnode]
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: alchemy: gpr: switch to static device properties
Dmitry Torokhov [Tue, 26 May 2026 16:40:36 +0000 (18:40 +0200)] 
MIPS: alchemy: gpr: switch to static device properties

Convert I2C-gpio device and GPIO-connected LEDs on GPR board to software
nodes/properties, so that support for platform data can be removed from
gpio-leds driver (which will rely purely on generic device properties
for configuration).

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[Bartosz: use platform_device_info::swnode]
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: alchemy: db1000: use nodes attached to GPIO chips in properties
Dmitry Torokhov [Tue, 26 May 2026 16:40:35 +0000 (18:40 +0200)] 
MIPS: alchemy: db1000: use nodes attached to GPIO chips in properties

GPIO subsystem is switching the way it locates GPIO chip instances for
GPIO references in software nodes by doing identity matching instead of
matching on node names. Switch to using software nodes attached to gpio
chips instead of using freestanding software nodes.

Also stop supplying platform data for the spi-gpio controller since
spi-gpio driver can derive number of chipselect lines from device
properties.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: alchemy: mtx1: attach software nodes to GPIO chips
Dmitry Torokhov [Tue, 26 May 2026 16:40:34 +0000 (18:40 +0200)] 
MIPS: alchemy: mtx1: attach software nodes to GPIO chips

GPIO subsystem is switching the way it locates GPIO chip instances for
GPIO references in software nodes from matching on node names to
identity matching, which necessitates assigning firmware nodes
(software nodes) to GPIO chips.

Move the node definitions for alchemy-gpio1 and alchemy-gpio2 to
arch/misp/alchemy/common/gpiolib.c, register them there, and attach
them to gpio_chip instances. Adjust MTX1 board file to use these nodes.

Note that because nodes need to be registered before they can be used in
PROPERTY_ENTRY_GPIO() we have to do the registration at
postcore_initcall level, otherwise (due to the link order) MTX1 board
initialization code will run first.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[Bartosz: use platform_device_info::swnode]
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: alchemy: provide visible function prototypes to board files
Bartosz Golaszewski [Tue, 26 May 2026 16:40:33 +0000 (18:40 +0200)] 
MIPS: alchemy: provide visible function prototypes to board files

Board files under arch/mips/alchemy/ define functions called from
db1xxx.c but their prototypes are only in that .c file instead of being
declared in a common header. This causes several build warnings about
missing prototypes. Provide these prototypes in a new header and include
it where necessary.

Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: alchemy: platform: add missing include
Bartosz Golaszewski [Tue, 26 May 2026 16:40:32 +0000 (18:40 +0200)] 
MIPS: alchemy: platform: add missing include

Pull in the platform.h header into platform.c to fix the following
warning:

arch/mips/alchemy/devboards/platform.c:68:12: warning: no previous prototype for ‘db1x_register_pcmcia_socket’ [-Wmissing-prototypes]
   68 | int __init db1x_register_pcmcia_socket(phys_addr_t pcmcia_attr_start,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/alchemy/devboards/platform.c:152:12: warning: no previous prototype for ‘db1x_register_norflash’ [-Wmissing-prototypes]
  152 | int __init db1x_register_norflash(unsigned long size, int width,
      |            ^~~~~~~~~~~~~~~~~~~~~~

Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: ip22-gio: do not export device release function
Johan Hovold [Fri, 24 Apr 2026 10:28:49 +0000 (12:28 +0200)] 
MIPS: ip22-gio: do not export device release function

There is no need to export the gio device release function as the
devices are reference counted.

Drop the export along with the unused inline wrapper.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: ip22-gio: switch to dynamic root device
Johan Hovold [Fri, 24 Apr 2026 10:28:48 +0000 (12:28 +0200)] 
MIPS: ip22-gio: switch to dynamic root device

Driver core expects devices to be dynamically allocated and will, for
example, complain loudly when no release function has been provided.

Use root_device_register() to allocate and register the root device
instead of open coding using a static device.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: ip22-gio: fix device reference leak in probe
Johan Hovold [Fri, 24 Apr 2026 10:28:47 +0000 (12:28 +0200)] 
MIPS: ip22-gio: fix device reference leak in probe

The gio probe function needlessly takes a device reference which is
never released and therefore prevents unbound gio devices from being
freed.

Fixes: e84de0c61905 ("MIPS: GIO bus support for SGI IP22/28")
Cc: stable@vger.kernel.org # 3.3
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: ip22-gio: fix gio device memory leak
Johan Hovold [Fri, 24 Apr 2026 10:28:46 +0000 (12:28 +0200)] 
MIPS: ip22-gio: fix gio device memory leak

The gio device release callback was never wired up so gio devices are
not freed when the last reference is dropped.

Fixes: e84de0c61905 ("MIPS: GIO bus support for SGI IP22/28")
Cc: stable@vger.kernel.org # 3.3
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoMIPS: ip22-gio: fix kfree() of static object
Johan Hovold [Fri, 24 Apr 2026 10:28:45 +0000 (12:28 +0200)] 
MIPS: ip22-gio: fix kfree() of static object

The gio bus root device is a statically allocated object which must not
be freed by kfree() on failure to register the device or bus.

Fixes: 82242d28ff8b ("MIPS: IP22: Add missing put_device call")
Cc: stable@vger.kernel.org # 3.17
Cc: Levente Kurusa <levex@linux.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
4 weeks agoALSA: doc: usb-audio: Add doc for QUIRK_FLAG_IFB_SILENCE_ON_EMPTY
Rong Zhang [Tue, 26 May 2026 17:49:23 +0000 (01:49 +0800)] 
ALSA: doc: usb-audio: Add doc for QUIRK_FLAG_IFB_SILENCE_ON_EMPTY

QUIRK_FLAG_IFB_SILENCE_ON_EMPTY was introduced into usb-audio before
without appropriate documentation, so add it.

Fixes: a23812004228 ("ALSA: usb-audio: add IFB_SILENCE_ON_EMPTY quirk for Behringer Flow 8")
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260527-uac-quirk-get-cur-vol-v1-1-e9362b712e5e@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: usb-audio: Add quirk for Novation Mininova
Uwe Küchler [Tue, 26 May 2026 16:20:33 +0000 (18:20 +0200)] 
ALSA: usb-audio: Add quirk for Novation Mininova

Add a device-specific quirk for the Novation Mininova synthesizer
(USB ID 1235:001e) to enable proper recognition and functionality
as a MIDI device.

Signed-off-by: Uwe Küchler <uwe@kuechler.org>
Link: https://patch.msgid.link/20260526162033.7513-1-uwe@kuechler.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: seq: oss: Fix UAF at handling events with embedded SysEx data
Takashi Iwai [Tue, 26 May 2026 15:28:41 +0000 (17:28 +0200)] 
ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data

The OSS sequencer processes the input MIDI bytes into a sequencer
event to be dispatched later (in snd_seq_oss_midi_putc() called from
snd_seq_oss_process_event()).  When it's a SysEx data, the event
record contains data.ext.ptr pointer to the original SysEx bytes, and
the referred data is copied into the pool afterwards at dispatching.
The problem is that, if the sequencer port gets closed concurrently
before the dispatch, the OSS sequencer core also releases the
resources (in snd_seq_oss_midi_check_exit_port()), while the pending
event may hold a stale pointer, eventually leading to a UAF at a later
dispatch.

Fortunately, there is already a refcounting mechanism (snd_use_lock_t)
for the OSS MIDI device access, and for addressing the issue above, we
just need to extend the refcount until the event gets dispatched.

This patch extends snd_seq_oss_process_event() to give back the
refcount object, which is in turn released after calling the sequencer
dispatcher with the given event in the caller side.

According to the original report, KASAN report as below:

KASAN slab-use-after-free in snd_seq_event_dup+0x40c/0x470
RIP: 0033:0x7f2cb66a6340
Read of size 6
Call trace:
  dump_stack_lvl+0x73/0xb0 (?:?)
  print_report+0xd1/0x650 (?:?)
  srso_alias_return_thunk+0x5/0xfbef5 (?:?)
  __virt_addr_valid+0x1a7/0x340 (?:?)
  kasan_complete_mode_report_info+0x64/0x200 (?:?)
  kasan_report+0xf7/0x130 (?:?)
  snd_seq_event_dup+0x40c/0x470 (?:?)
  kasan_check_range+0x10c/0x1c0 (?:?)
  __asan_memcpy+0x27/0x70 (?:?)
  snd_seq_event_dup+0x9/0x470 (?:?)
  snd_seq_client_enqueue_event+0x139/0x240 (?:?)
  _raw_spin_unlock_irqrestore+0x4b/0x60 (?:?)
  snd_seq_kernel_client_enqueue+0x102/0x120 (?:?)
  snd_seq_oss_write+0x416/0x4e0 (?:?)
  apparmor_file_permission+0x20/0x30 (?:?)
  odev_write+0x3b/0x60 (?:?)
  vfs_write+0x1ce/0x850 (?:?)
  lock_release+0xc8/0x2a0 (?:?)
  __kasan_check_write+0x18/0x20 (?:?)
  __mutex_unlock_slowpath+0x129/0x510 (?:?)
  ksys_write+0xe1/0x180 (?:?)
  mutex_unlock+0x16/0x20 (?:?)
  odev_ioctl+0x65/0xc0 (?:?)
  __x64_sys_write+0x46/0x60 (?:?)
  x64_sys_call+0x7d/0x20d0 (?:?)
  do_syscall_64+0xc1/0x360 (arch/x86/entry/syscall_64.c:87)
  entry_SYSCALL_64_after_hwframe+0x77/0x7f (?:?)

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-and-tested-by: Zhang Cen <rollkingzzc@gmail.com>
Closes: https://lore.kernel.org/20260521233900.478153-1-rollkingzzc@gmail.com
Link: https://patch.msgid.link/20260526152843.617503-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: xen-front: Connect event channel after stream prepare
Cássio Gabriel [Tue, 26 May 2026 12:48:27 +0000 (09:48 -0300)] 
ALSA: xen-front: Connect event channel after stream prepare

The request channel must be connected from ALSA .open(), because hw-rule
queries and the stream open request use it. The event channel is
different: XENSND_EVT_CUR_POS handling uses ALSA runtime buffer and
period geometry, and the corresponding Xen stream parameters are not
submitted to the backend until .prepare() sends XENSND_OP_OPEN.

Currently .open() connects both channels. A backend current-position
event, or a stale event queued for an earlier stream instance, can
therefore reach xen_snd_front_alsa_handle_cur_pos() before
runtime->buffer_size and runtime->period_size are valid.

Add a per-channel connection helper, connect only the request channel in
.open(), connect the event channel after a successful stream prepare,
and disconnect it before stream close/free. Re-check the event-channel
state after taking ring_io_lock so disconnecting the event channel
synchronizes against a threaded IRQ that passed the initial lockless
state test. Keep defensive runtime geometry checks in the position
handler.

Fixes: 1cee559351a7 ("ALSA: xen-front: Implement ALSA virtual sound driver")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260526-alsa-xen-event-channel-fixes-v1-2-91d3a6a50778@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: xen-front: Reset event channel state on stream clear
Cássio Gabriel [Tue, 26 May 2026 12:48:26 +0000 (09:48 -0300)] 
ALSA: xen-front: Reset event channel state on stream clear

xen_snd_front_evtchnl_pair_clear() resets evt_next_id for both
channels. That is correct for the request channel, where evt_next_id is
used to allocate the next request id. It is wrong for the event channel:
incoming events are validated against evt_id, and evt_id is incremented
by evtchnl_interrupt_evt().

This leaves the expected event id from the previous stream instance. A
backend that restarts event ids for a reopened stream can then have valid
current-position events dropped until the stale frontend id catches up.

Reset evt_id for the event channel. Also advance the event-page consumer
to the current producer while clearing the stream, so obsolete events
queued for the previous stream instance are not delivered to the next
ALSA runtime.

Fixes: 1cee559351a7 ("ALSA: xen-front: Implement ALSA virtual sound driver")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260526-alsa-xen-event-channel-fixes-v1-1-91d3a6a50778@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: usb-audio: Add iface reset and delay quirk for TAE1160 USB Audio
Lianqin Hu [Wed, 27 May 2026 03:33:08 +0000 (03:33 +0000)] 
ALSA: usb-audio: Add iface reset and delay quirk for TAE1160 USB Audio

Setting up the interface when suspended/resumeing fail on this card.
Adding a reset and delay quirk will eliminate this problem.

usb 1-1: new full-speed USB device number 2 using xhci-hcd
usb 1-1: New USB device found, idVendor=25aa, idProduct=600b
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: TAE1159
usb 1-1: Manufacturer: Generic
usb 1-1: SerialNumber: 20210726905926

Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
Link: https://patch.msgid.link/TYUPR06MB621736D7C85D43200E54E740D2082@TYUPR06MB6217.apcprd06.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: hda/cs420x: Add CS4208 fixup for iMac16,1
Jakub Pisarczyk [Tue, 26 May 2026 20:18:30 +0000 (22:18 +0200)] 
ALSA: hda/cs420x: Add CS4208 fixup for iMac16,1

The 21.5" Retina 4K iMac (Late 2015, DMI product name "iMac16,1") ships
with a Cirrus Logic CS4208 codec wired to an external speaker amplifier
enabled through codec GPIO0 -- the same arrangement as the late-2013
MacBookPro 11,x. Without a matching entry in cs4208_mac_fixup_tbl[] the
fixup picker logs:

    snd_hda_codec_cs420x hdaudioC1D0: CS4208: picked fixup  for codec SSID 106b:0000

i.e. an empty fixup name, GPIO0 stays low, the external amp is never
powered up, and the internal speakers are silent on a stock kernel.

The codec SSID reported by hardware is 0x106b:0x7f00. Reusing CS4208_MBP11
(GPIO0 + SPDIF switch fixup) makes the internal speakers and S/PDIF
output work out of the box, removing the need for users to set
`options snd_hda_intel model=mbp11` via /etc/modprobe.d/.

Tested on iMac16,1 (kernel 6.17.0): four internal drivers
(Left tweeter, Left woofer, Right tweeter, Right woofer, exposed as the
4 channels of the analog-surround-40 ALSA profile) produce audio after
the fixup is applied.

Signed-off-by: Jakub Pisarczyk <pisarz77@gmail.com>
Link: https://patch.msgid.link/20260526201830.34097-1-pisarz77@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: hda/realtek: add quirk for HP Dragonfly Folio G3 2-in-1
Fabian Lippold [Tue, 26 May 2026 15:41:01 +0000 (17:41 +0200)] 
ALSA: hda/realtek: add quirk for HP Dragonfly Folio G3 2-in-1

Add PCI quirk for HP Dragonfly Folio G3 (PCI ID 103c:8a06) to select the
CS35L41 SPI4 & GPIO LED fixup variant.

Signed-off-by: Fabian Lippold <fabianlippold1184@gmail.com>
Link: https://patch.msgid.link/20260526154418.1850568-3-fabianlippold1184@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>