Commit Graph

6498 Commits

Author SHA1 Message Date
Stephen Rothwell
be0592e86c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/srini/fastrpc.git 2024-12-20 14:20:04 +11:00
Stephen Rothwell
ecc935f512 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git 2024-12-20 11:07:33 +11:00
Krzysztof Wilczyński
889d559f82
Merge branch 'endpoint'
* endpoint:
  misc: pci_endpoint_test: Add support for capabilities
  PCI: endpoint: pci-epf-test: Add support for capabilities
  PCI: endpoint: Verify that requested BAR size is a power of two
  PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar()
  PCI: artpec6: Implement dw_pcie_ep operation get_features
  PCI: dwc: ep: Add 'address' alignment to 'size' check in dw_pcie_prog_ep_inbound_atu()
  PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar()
  PCI: dwc: ep: Write BAR_MASK before iATU registers in pci_epc_set_bar()
  PCI: endpoint: Finish virtual EP removal in pci_epf_remove_vepf()
  PCI: endpoint: Simplify pci_epc_get()
  PCI: endpoint: Destroy the EPC device in devm_pci_epc_destroy()
  PCI: endpoint: Replace magic number '6' by PCI_STD_NUM_BARS
2024-12-19 19:09:30 +00:00
Krzysztof Wilczyński
61d607186f
Merge branch 'devres'
* devres:
  HID: amd_sfh: Use always-managed version of pcim_intx()
  wifi: qtnfmac: use always-managed version of pcim_intx()
  ata: Use always-managed version of pci_intx()
  PCI/MSI: Use never-managed version of pci_intx()
  vfio/pci: Use never-managed version of pci_intx()
  misc: Use never-managed version of pci_intx()
  ntb: Use never-managed version of pci_intx()
  drivers/xen: Use never-managed version of pci_intx()
  PCI: Export pci_intx_unmanaged() and pcim_intx()
2024-12-19 19:09:29 +00:00
Niklas Cassel
fe986f9ef0
misc: pci_endpoint_test: Add consecutive BAR test
Add a more advanced BAR test that writes all BARs in one go, and then reads
them back and verifies that the value matches the BAR number bitwise OR'ed
with offset, this allows us to verify:

  - The BAR number was what we intended to read
  - The offset was what we intended to read

This allows us to detect potential address translation issues on the EP.

Reading back the BAR directly after writing will not allow us to detect the
case where inbound address translation on the endpoint incorrectly causes
multiple BARs to be redirected to the same memory region (within the EP).

Link: https://lore.kernel.org/r/20241116032045.2574168-2-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2024-12-19 16:31:12 +00:00
Niklas Cassel
a00ac0bc28
misc: pci_endpoint_test: Add support for capabilities
The test BAR is on the EP side is allocated using pci_epf_alloc_space(),
which allocates the backing memory using dma_alloc_coherent(), which will
return zeroed memory regardless of __GFP_ZERO was set or not.

This means that running a new version of pci-endpoint-test.c (host side)
with an old version of pci-epf-test.c (EP side) will not see any
capabilities being set (as intended), so this is backwards compatible.

Additionally, the EP side always allocates at least 128 bytes for the test
BAR (excluding the MSI-X table), this means that adding another register at
offset 0x30 is still within the 128 available bytes.

For now, we only add the CAP_UNALIGNED_ACCESS capability.

If CAP_UNALIGNED_ACCESS is set, that means that the EP side supports
reading/writing to an address without any alignment requirements.

Thus, if CAP_UNALIGNED_ACCESS is set, make sure that the host side does
not add any extra padding to the buffers that we allocate (which was only
done in order to get the buffers to satisfy certain alignment requirements
by the endpoint controller).

Link: https://lore.kernel.org/r/20241203063851.695733-6-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
2024-12-19 16:17:12 +00:00
Ekansh Gupta
9f86299512 misc: fastrpc: Rename tgid and pid to client_id
The information passed as request tgid and pid is actually the
client id of the process. This client id is used as an
identifier by DSP to identify the DSP PD corresponding to the
process. Currently process tgid is getting passed as the
identifier which is getting replaced by a custom client id.
Rename the data which uses this client id.

Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2024-12-17 11:58:44 +00:00
Ekansh Gupta
0c3e383ce7 misc: fastrpc: Add support for multiple PD from one process
Memory intensive applications(which requires more tha 4GB) that wants
to offload tasks to DSP might have to split the tasks to multiple
user PD to make the resources available.

For every call to DSP, fastrpc driver passes the process tgid which
works as an identifier for the DSP to enqueue the tasks to specific PD.
With current design, if any process opens device node more than once
and makes PD init request, same tgid will be passed to DSP which will
be considered a bad request and this will result in failure as the same
identifier cannot be used for multiple DSP PD.

Assign and pass a client ID to DSP which would be assigned during device
open and will be dependent on the index of session allocated for the PD.
This will allow the same process to open the device more than once and
spawn multiple dynamic PD for ease of processing.

Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2024-12-17 11:58:44 +00:00
Philipp Stanner
8fb24ace8d misc: Use never-managed version of pci_intx()
pci_intx() is a hybrid function which can sometimes be managed through
devres. To remove this hybrid nature from pci_intx(), it is necessary to
port users to either an always-managed or a never-managed version.

cardreader/rtsx_pcr.c and tifm_7xx1.c enable their PCI devices with
pci_enable_device(). Thus, they need the never-managed version.

Replace pci_intx() with pci_intx_unmanaged().

Link: https://lore.kernel.org/r/20241209130632.132074-7-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-14 18:00:34 -06:00
Peter Zijlstra
cdd30ebb1b module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 11:34:44 -08:00
Linus Torvalds
e70140ba0d Get rid of 'remove_new' relic from platform driver struct
The continual trickle of small conversion patches is grating on me, and
is really not helping.  Just get rid of the 'remove_new' member
function, which is just an alias for the plain 'remove', and had a
comment to that effect:

  /*
   * .remove_new() is a relic from a prototype conversion of .remove().
   * New drivers are supposed to implement .remove(). Once all drivers are
   * converted to not use .remove_new any more, it will be dropped.
   */

This was just a tree-wide 'sed' script that replaced '.remove_new' with
'.remove', with some care taken to turn a subsequent tab into two tabs
to make things line up.

I did do some minimal manual whitespace adjustment for places that used
spaces to line things up.

Then I just removed the old (sic) .remove_new member function, and this
is the end result.  No more unnecessary conversion noise.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-01 15:12:43 -08:00
Linus Torvalds
d8b78066f4 TTY / Serial driver updates for 6.13-rc1
Here is a small set of tty and serial driver updates for 6.13-rc1.
 Nothing major at all this time, only some small changes:
   - few device tree binding updates
   - 8250_exar serial driver updates
   - imx serial driver updates
   - sprd_serial driver updates
   - other tiny serial driver updates, full details in the shortlog
 
 All of these have been in linux-next for a while with one reported
 issue, but that commit has now been reverted.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZ0s3DA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykmgQCeIDU0GHWFuzEiZNmsO5bLN8AcoFQAn1rlOaHu
 9lOOf7xVSCUBU0GgynI5
 =SEtJ
 -----END PGP SIGNATURE-----

Merge tag 'tty-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty / serial driver updates from Greg KH:
 "Here is a small set of tty and serial driver updates for 6.13-rc1.
  Nothing major at all this time, only some small changes:

   - few device tree binding updates

   - 8250_exar serial driver updates

   - imx serial driver updates

   - sprd_serial driver updates

   - other tiny serial driver updates, full details in the shortlog

  All of these have been in linux-next for a while with one reported
  issue, but that commit has now been reverted"

* tag 'tty-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (37 commits)
  Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit"
  serial: amba-pl011: fix build regression
  dt-bindings: serial: Add a new compatible string for ums9632
  serial: sprd: Add support for sc9632
  tty/serial/altera_uart: unwrap error log string
  tty/serial/altera_jtaguart: unwrap error log string
  serial: amba-pl011: Fix RX stall when DMA is used
  tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
  serial: 8250_fintek: Add support for F81216E
  serial: sh-sci: Clean sci_ports[0] after at earlycon exit
  tty: atmel_serial: Fix typo retreives to retrieves
  tty: atmel_serial: Use devm_platform_ioremap_resource()
  serial: 8250: omap: Move pm_runtime_get_sync
  tty: serial: samsung: Add Exynos8895 compatible
  dt-bindings: serial: samsung: Add samsung,exynos8895-uart compatible
  serial: 8250_dw: Add Sophgo SG2044 quirk
  dt-bindings: serial: snps-dw-apb-uart: Add Sophgo SG2044 uarts
  dt-bindings: serial: snps,dw-apb-uart: merge duplicate compatible entry.
  altera_jtaguart: Use dev_err() to report error attaching IRQ
  altera_uart: Use dev_err() to report error attaching IRQ handler
  ...
2024-11-30 09:03:16 -08:00
Linus Torvalds
2eff01ee28 Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1
Here is the "big and hairy" char/misc/iio and other small driver
 subsystem updates for 6.13-rc1.  Sorry for doing this at the end of the
 merge window, conference and holiday travel got in the way on my side
 (hence the 5am pull request emails...)
 
 Loads of things in here, and even a fun merge conflict!
   - rust misc driver bindings and other rust changes to make misc
     drivers actually possible.  I think this is the tipping point,
     expect to see way more rust drivers going forward now that these
     bindings are present.  Next merge window hopefully we will have pci
     and platform drivers working, which will fully enable almost all
     driver subsystems to start accepting (or at least getting) rust
     drivers.  This is the end result of a lot of work from a lot of
     people, congrats to all of them for getting this far, you've proved
     many of us wrong in the best way possible, working code :)
   - IIO driver updates, too many to list individually, that subsystem
     keeps growing and growing...
   - Interconnect driver updates
   - nvmem driver updates
   - pwm driver updates
   - platform_driver::remove() fixups, loads of them
   - counter driver updates
   - misc driver updates (keba?)
   - binder driver updates and fixes
   - loads of other small char/misc/etc driver updates and additions,
     full details in the shortlog.
 
 Note, there is a semi-hairy rust merge conflict when pulling this.  The
 resolution has been in linux-next for a while and can be seen here:
 	https://lore.kernel.org/all/20241111173459.2646d4af@canb.auug.org.au/
 
 All of these have been in linux-next for a while, with no other reported
 issues other than that merge conflict.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZ0lGpg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykKHQCgvI4Muu2tpdINBVe24Zc8S3ozg0AAnRNg3F7r
 ikneftUDYtuviSGU/Rs8
 =CW+i
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc/IIO/whatever driver subsystem updates from Greg KH:
 "Here is the 'big and hairy' char/misc/iio and other small driver
  subsystem updates for 6.13-rc1.

  Loads of things in here, and even a fun merge conflict!

   - rust misc driver bindings and other rust changes to make misc
     drivers actually possible.

     I think this is the tipping point, expect to see way more rust
     drivers going forward now that these bindings are present. Next
     merge window hopefully we will have pci and platform drivers
     working, which will fully enable almost all driver subsystems to
     start accepting (or at least getting) rust drivers.

     This is the end result of a lot of work from a lot of people,
     congrats to all of them for getting this far, you've proved many of
     us wrong in the best way possible, working code :)

   - IIO driver updates, too many to list individually, that subsystem
     keeps growing and growing...

   - Interconnect driver updates

   - nvmem driver updates

   - pwm driver updates

   - platform_driver::remove() fixups, loads of them

   - counter driver updates

   - misc driver updates (keba?)

   - binder driver updates and fixes

   - loads of other small char/misc/etc driver updates and additions,
     full details in the shortlog.

  All of these have been in linux-next for a while, with no other
  reported issues other than that merge conflict"

* tag 'char-misc-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (401 commits)
  mei: vsc: Fix typo "maintstepping" -> "mainstepping"
  firmware: Switch back to struct platform_driver::remove()
  misc: isl29020: Fix the wrong format specifier
  scripts/tags.sh: Don't tag usages of DEFINE_MUTEX
  fpga: Switch back to struct platform_driver::remove()
  mei: vsc: Improve error logging in vsc_identify_silicon()
  mei: vsc: Do not re-enable interrupt from vsc_tp_reset()
  dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P compatible
  dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188
  spmi: pmic-arb: fix return path in for_each_available_child_of_node()
  iio: Move __private marking before struct element priv in struct iio_dev
  docs: iio: ad7380: add adaq4370-4 and adaq4380-4
  iio: adc: ad7380: add support for adaq4370-4 and adaq4380-4
  iio: adc: ad7380: use local dev variable to shorten long lines
  iio: adc: ad7380: fix oversampling formula
  dt-bindings: iio: adc: ad7380: add adaq4370-4 and adaq4380-4 compatible parts
  bus: mhi: host: pci_generic: Use pcim_iomap_region() to request and map MHI BAR
  bus: mhi: host: Switch trace_mhi_gen_tre fields to native endian
  misc: atmel-ssc: Use of_property_present() for non-boolean properties
  misc: keba: Add hardware dependency
  ...
2024-11-29 11:58:27 -08:00
Linus Torvalds
55cb93fd24 Driver core changes for 6.13-rc1
Here is a small set of driver core changes for 6.13-rc1.
 
 Nothing major for this merge cycle, except for the 2 simple merge
 conflicts are here just to make life interesting.
 
 Included in here are:
   - sysfs core changes and preparations for more sysfs api cleanups that
     can come through all driver trees after -rc1 is out
   - fw_devlink fixes based on many reports and debugging sessions
   - list_for_each_reverse() removal, no one was using it!
   - last-minute seq_printf() format string bug found and fixed in many
     drivers all at once.
   - minor bugfixes and changes full details in the shortlog
 
 As mentioned above, there is 2 merge conflicts with your tree, one is
 where the file is removed (easy enough to resolve), the second is a
 build time error, that has been found in linux-next and the fix can be
 seen here:
 	https://lore.kernel.org/r/20241107212645.41252436@canb.auug.org.au
 
 Other than that, the changes here have been in linux-next with no other
 reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZ0lEog8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ym+0ACgw6wN+LkLVIHWhxTq5DYHQ0QCxY8AoJrRIcKe
 78h0+OU3OXhOy8JGz62W
 =oI5S
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Here is a small set of driver core changes for 6.13-rc1.

  Nothing major for this merge cycle, except for the two simple merge
  conflicts are here just to make life interesting.

  Included in here are:

   - sysfs core changes and preparations for more sysfs api cleanups
     that can come through all driver trees after -rc1 is out

   - fw_devlink fixes based on many reports and debugging sessions

   - list_for_each_reverse() removal, no one was using it!

   - last-minute seq_printf() format string bug found and fixed in many
     drivers all at once.

   - minor bugfixes and changes full details in the shortlog"

* tag 'driver-core-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (35 commits)
  Fix a potential abuse of seq_printf() format string in drivers
  cpu: Remove spurious NULL in attribute_group definition
  s390/con3215: Remove spurious NULL in attribute_group definition
  perf: arm-ni: Remove spurious NULL in attribute_group definition
  driver core: Constify bin_attribute definitions
  sysfs: attribute_group: allow registration of const bin_attribute
  firmware_loader: Fix possible resource leak in fw_log_firmware_info()
  drivers: core: fw_devlink: Fix excess parameter description in docstring
  driver core: class: Correct WARN() message in APIs class_(for_each|find)_device()
  cacheinfo: Use of_property_present() for non-boolean properties
  cdx: Fix cdx_mmap_resource() after constifying attr in ->mmap()
  drivers: core: fw_devlink: Make the error message a bit more useful
  phy: tegra: xusb: Set fwnode for xusb port devices
  drm: display: Set fwnode for aux bus devices
  driver core: fw_devlink: Stop trying to optimize cycle detection logic
  driver core: Constify attribute arguments of binary attributes
  sysfs: bin_attribute: add const read/write callback variants
  sysfs: implement all BIN_ATTR_* macros in terms of __BIN_ATTR()
  sysfs: treewide: constify attribute callback of bin_attribute::llseek()
  sysfs: treewide: constify attribute callback of bin_attribute::mmap()
  ...
2024-11-29 11:43:29 -08:00
Linus Torvalds
36843bfbf7 hardening updates for v6.13-rc1
- Disable __counted_by in Clang < 19.1.3 (Jan Hendrik Farr)
 
 - string_helpers: Silence output truncation warning (Bartosz Golaszewski)
 
 - compiler.h: Avoid needing BUILD_BUG_ON_ZERO() (Philipp Reisner)
 
 - MAINTAINERS: Add kernel hardening keywords __counted_by{_le|_be}
   (Thorsten Blum)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRSPkdeREjth1dHnSE2KwveOeQkuwUCZz9GaQAKCRA2KwveOeQk
 uwIhAP0dbxSOT3T7Xz7ZKqNKWvuyy8nkY5SqizXeThFXKQZGMgEApHJ2DVENHA+R
 mvFTq1t8JcFMUlBgBO1a6ow8/CCRmAI=
 =l0lE
 -----END PGP SIGNATURE-----

Merge tag 'hardening-v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull hardening updates from Kees Cook:

 - Disable __counted_by in Clang < 19.1.3 (Jan Hendrik Farr)

 - string_helpers: Silence output truncation warning (Bartosz
   Golaszewski)

 - compiler.h: Avoid needing BUILD_BUG_ON_ZERO() (Philipp Reisner)

 - MAINTAINERS: Add kernel hardening keywords __counted_by{_le|_be}
   (Thorsten Blum)

* tag 'hardening-v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  Compiler Attributes: disable __counted_by for clang < 19.1.3
  compiler.h: Fix undefined BUILD_BUG_ON_ZERO()
  lib: string_helpers: silence snprintf() output truncation warning
  MAINTAINERS: Add kernel hardening keywords __counted_by{_le|_be}
2024-11-25 15:22:35 -08:00
Linus Torvalds
55ae3eef10 i2c-for-6.13-rc1
i2c-core (Wolfram)
 
  - drivers can now use a GPIO as a side channel for SMBus Alerts
    using a generic binding
 
  - regular stuff like mem leak fix, Makefile maintenance...
 
 i2c-host updates (Andi)
 
 Major Improvements and Refactoring:
 
  - All controllers using the 'remove_new' callback have been
    reverted to use the 'remove' callback.
 
  - Intel SCH controller underwent significant refactoring,
    this brings love and a modern look to the driver.
 
  - PIIX4 driver refactored to enable usage by other drivers
    (e.g., AMD ASF).
 
  - iMX/MXC improved message handling to reduce protocol overhead:
      Refactored DMA/non-DMA read/write and bus polling mechanisms
      to achieve this.
 
  - ACPI documentation for PIIX4.
 
 New Features:
 
  - i2c-cadence added support for atomic transfers.
  - Qualcomm CII added support for a 32MHz serial engine clock.
 
 Deprecated Features:
 
  - Dropped outdated support for AMD756 S4882 and NFORCE2 S4985. If
    somebody misses this, Jean will rewrite support using the proper
    i2c mux framework.
 
 New Hardware Support:
 
  - Added support for:
    - Intel Panther Lake (new ID)
    - AMD ASF (new driver)
    - S32G2/S32G3 SoCs (new ID)
    - Realtek RTL I2C Controller (new driver)
    - HJMC01 DesignWare ACPI HID (new ID)
    - PIC64GX to Microchip Core (new ID)
    - Qualcomm SDM670 to Qualcomm CCI (new ID)
 
 at24 updates (Bartosz)
 
 - add support for the lockable page on ST M24256E
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmc+/UUACgkQFA3kzBSg
 KbZrqA/+MqNiN8NIkgA3nIODQP1Cf/aUhywHITsRgoo85vVDHeiaJtKc25KMi6Tb
 I5GgHp9Q0TtYdXzKM+nC7xjO64h8obGRXPHv5fDbRAZlFbWSR8u+iQp9entuVJe4
 TiRFh9M8chAC82QNCvYVKx3jTHlmZaR7bXDtoAf7bG0LdWnjey1JSFfn6cPweVNM
 0sD95tjBDb53tCRPGVKrCsnrs5uGxugGvH5I16hB6iokbaiIlGosIBg/8YBGHCS8
 V8RqLSfzCl7X7xICeRv2ttRWx78Nz38RBC+truR5OEvvdZ+J2UCZ0710/w6FWfPp
 F85ReZrG5bh49Jobt/AyC7VXqL6djg+C6jVU1rX8Eb3G6TapL4iCJe9CcI4EXANY
 1mtzZ8fqg4EaVMVRQx3tiyjNFWQba9ssSyzRB8ZfCqmS6xV2HXJby3zNoDA9SoxH
 tNn3vp0FfOtdn4lGbYAJE4zUMupXiUkrgswj5sKltYjXh/OmaDLJfYeFhPp+SwvW
 uWuLZveM0mAn6BWyM4g9v6MIHWiUumkF5xwlAfNOh3ogxqUtAPtbzk7FQ332ni0Z
 X11J5EOBzbMQR24moRo7xtQSdoDDSQDpytOVXTY2QWv3rZuk0oVL57aifJdtTkrK
 QktmylTfYlfI2hWLRoWFJ1j7nQyBveiNHh/qq0hxCkXLP3vA5gs=
 =lrn5
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "Core:

   - drivers can now use a GPIO as a side channel for SMBus Alerts using
     a generic binding

   - regular stuff like mem leak fix, Makefile maintenance...

  Host improvements and refactoring:

   - All controllers using the 'remove_new' callback have been reverted
     to use the 'remove' callback

   - Intel SCH controller underwent significant refactoring, this brings
     love and a modern look to the driver

   - PIIX4 driver refactored to enable usage by other drivers (e.g., AMD
     ASF)

   - iMX/MXC improved message handling to reduce protocol overhead:
     Refactored DMA/non-DMA read/write and bus polling mechanisms to
     achieve this.

   - ACPI documentation for PIIX4

  New host features:

   - i2c-cadence support for atomic transfers

   - Qualcomm CII support for a 32MHz serial engine clock

  Deprecated features:

   - Dropped outdated support for AMD756 S4882 and NFORCE2 S4985. If
     somebody misses this, Jean will rewrite support using the proper
     i2c mux framework.

  New hardware IDs for existing drivers:

   - Intel Panther Lake

   - S32G2/S32G3 SoCs

   - HJMC01 DesignWare ACPI HID

   - PIC64GX to Microchip Core

   - Qualcomm SDM670 to Qualcomm CCI

  New drivers:

   - AMD ASF

   - Realtek RTL I2C Controller

  at24 updates:

   - add support for the lockable page on ST M24256E"

* tag 'i2c-for-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (59 commits)
  docs: i2c: piix4: Add ACPI section
  i2c: Add driver for the RTL9300 I2C controller
  i2c: qcom-cci: Remove unused struct member cci_clk_rate
  dt-bindings: i2c: Add Realtek RTL I2C Controller
  i2c: busses: Use *-y instead of *-objs in Makefile
  i2c: imx: add support for S32G2/S32G3 SoCs
  dt-bindings: i2c: imx: add SoC specific compatible strings for S32G
  i2c: qcom-cci: Remove the unused variable cci_clk_rate
  i2c: Drop legacy muxing pseudo-drivers
  i2c: imx: prevent rescheduling in non dma mode
  i2c: imx: separate atomic, dma and non-dma use case
  i2c: imx: do not poll for bus busy in single master mode
  i2c: designware: Add a new ACPI HID for HJMC01 I2C controller
  i2c: qcom-geni: Keep comment why interrupts start disabled
  dt-bindings: i2c: microchip: corei2c: Add PIC64GX as compatible with driver
  i2c: designware: constify abort_sources
  i2c: Switch back to struct platform_driver::remove()
  i2c: qcom-geni: Support systems with 32MHz serial engine clock
  i2c: qcom-cci: Stop complaining about DT set clock rate
  dt-bindings: i2c: qcom-cci: Document SDM670 compatible
  ...
2024-11-21 13:19:29 -08:00
Linus Torvalds
14d0e1a09f soc: driver updates for 6.12
Nothing particular important in the SoC driver updates, just the usual
 improvements to for drivers/soc and a couple of subsystems that don't
 fit anywhere else:
 
  - The largest set of updates is for Qualcomm SoC drivers, extending the
    set of supported features for additional SoCs in the QSEECOM, LLCC
    and socinfo drivers.a
 
  - The ti_sci firmware driver gains support for power managment
 
  - The drivers/reset subsystem sees a rework of the microchip
    sparx5 and amlogic reset drivers to support additional chips,
    plus a few minor updates on other platforms
 
  - The SCMI firmware interface driver gains support for two protocol
    extensions, allowing more flexible use of the shared memory area
    and new DT binding properties for configurability.
 
  - Mediatek SoC drivers gain support for power managment on the MT8188
    SoC and a new driver for DVFS.
 
  - The AMD/Xilinx ZynqMP SoC drivers gain support for system reboot
    and a few bugfixes
 
  - The Hisilicon Kunpeng HCCS driver gains support for configuring
    lanes through sysfs
 
 Finally, there are cleanups and minor fixes for drivers/soc, drivers/bus,
 and drivers/memory, including changing back the .remove_new callback
 to .remove, as well as a few other updates for freescale (powerpc)
 soc drivers, NXP i.MX soc drivers, cznic turris platform driver, memory
 controller drviers, TI OMAP SoC drivers, and Tegra firmware drivers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmc+DsUACgkQYKtH/8kJ
 UifNWRAA49Ife6ybk8jamM9Bd07kFmHdaad0ttgUtx7HMJBg51+JLNFwTVYM2p6b
 A1SWCsS+sxP1RBKuhgZrt+sDPAoDlYLQaF1WQB7cs4FXqYpc2Po8BmBili5BV635
 Zv/9C9ofsWiWg9pGy0rRFvHW0W48lBoQM61YZzQc85pyEod5RSgji/jUEzvBvhln
 V3hegw0myBecJ8b7jH9Fjre3gMSC65amlXemkDS/7FGXXA7V3BKmALglJj6BR4RD
 QtQgFOAe/XGmbOguMvZJvVbMnW8PbmS5k50ppixBPAultHflkdg4DdnIW59yUfK+
 Mr98sW8U/LirACX93uwSzBNY1m5cW+GP4DoemxIUIQAvXxR4HroLoJdHS+BfWH+H
 Pn9dgSZu/dUlxfzTYzvd0B5TUjDGkYubVtQ00PLOWFHNfhZSmCqGl5J5NjgINRCf
 mBwhvUBYXgvNrOaEnll2kt2ONbxT7WAJAcKdnXKDjG4nPDyXBLRYoE4gro4Iii7+
 1OA7NlInwW+XFfpIIJeYa+AOTgb0/MKdONG+CkUnn6Bc9+B7Xdg0w0VDlmsVbXae
 fRyaI6XKmyNtmFZM4+gUxIhzvOgYpOoMITQJHcHSYuzWQpsnkkRas9aTCyBSLAd4
 D59cQwqtmE9rCfp3A7heMeKCIRtfJzoWnW0bjJAPSccLyJP99rI=
 =xeCE
 -----END PGP SIGNATURE-----

Merge tag 'soc-drivers-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "Nothing particular important in the SoC driver updates, just the usual
  improvements to for drivers/soc and a couple of subsystems that don't
  fit anywhere else:

   - The largest set of updates is for Qualcomm SoC drivers, extending
     the set of supported features for additional SoCs in the QSEECOM,
     LLCC and socinfo drivers.a

   - The ti_sci firmware driver gains support for power managment

   - The drivers/reset subsystem sees a rework of the microchip sparx5
     and amlogic reset drivers to support additional chips, plus a few
     minor updates on other platforms

   - The SCMI firmware interface driver gains support for two protocol
     extensions, allowing more flexible use of the shared memory area
     and new DT binding properties for configurability.

   - Mediatek SoC drivers gain support for power managment on the MT8188
     SoC and a new driver for DVFS.

   - The AMD/Xilinx ZynqMP SoC drivers gain support for system reboot
     and a few bugfixes

   - The Hisilicon Kunpeng HCCS driver gains support for configuring
     lanes through sysfs

  Finally, there are cleanups and minor fixes for drivers/{soc, bus,
  memory}, including changing back the .remove_new callback to .remove,
  as well as a few other updates for freescale (powerpc) soc drivers,
  NXP i.MX soc drivers, cznic turris platform driver, memory controller
  drviers, TI OMAP SoC drivers, and Tegra firmware drivers"

* tag 'soc-drivers-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (116 commits)
  soc: fsl: cpm1: qmc: Set the ret error code on platform_get_irq() failure
  soc: fsl: rcpm: fix missing of_node_put() in copy_ippdexpcr1_setting()
  soc: fsl: cpm1: tsa: switch to for_each_available_child_of_node_scoped()
  platform: cznic: turris-omnia-mcu: Rename variable holding GPIO line names
  platform: cznic: turris-omnia-mcu: Document the driver private data structure
  firmware: turris-mox-rwtm: Document the driver private data structure
  bus: Switch back to struct platform_driver::remove()
  soc: qcom: ice: Remove the device_link field in qcom_ice
  drm/msm/adreno: Setup SMMU aparture for per-process page table
  firmware: qcom: scm: Introduce CP_SMMU_APERTURE_ID
  firmware: arm_scpi: Check the DVFS OPP count returned by the firmware
  soc: qcom: socinfo: add IPQ5424/IPQ5404 SoC ID
  dt-bindings: arm: qcom,ids: add SoC ID for IPQ5424/IPQ5404
  soc: qcom: llcc: Flip the manual slice configuration condition
  dt-bindings: firmware: qcom,scm: Document sm8750 SCM
  firmware: qcom: uefisecapp: Allow X1E Devkit devices
  misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'
  misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
  soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform
  dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC
  ...
2024-11-20 15:40:54 -08:00
Jan Hendrik Farr
f06e108a3d Compiler Attributes: disable __counted_by for clang < 19.1.3
This patch disables __counted_by for clang versions < 19.1.3 because
of the two issues listed below. It does this by introducing
CONFIG_CC_HAS_COUNTED_BY.

1. clang < 19.1.2 has a bug that can lead to __bdos returning 0:
https://github.com/llvm/llvm-project/pull/110497

2. clang < 19.1.3 has a bug that can lead to __bdos being off by 4:
https://github.com/llvm/llvm-project/pull/112636

Fixes: c8248faf3c ("Compiler Attributes: counted_by: Adjust name and identifier expansion")
Cc: stable@vger.kernel.org # 6.6.x: 16c31dd7fd: Compiler Attributes: counted_by: bump min gcc version
Cc: stable@vger.kernel.org # 6.6.x: 2993eb7a8d: Compiler Attributes: counted_by: fixup clang URL
Cc: stable@vger.kernel.org # 6.6.x: 231dc3f0c9: lkdtm/bugs: Improve warning message for compilers without counted_by support
Cc: stable@vger.kernel.org # 6.6.x
Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/all/20240913164630.GA4091534@thelio-3990X/
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202409260949.a1254989-oliver.sang@intel.com
Link: https://lore.kernel.org/all/Zw8iawAF5W2uzGuh@archlinux/T/#m204c09f63c076586a02d194b87dffc7e81b8de7b
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Jan Hendrik Farr <kernel@jfarr.cc>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20241029140036.577804-2-kernel@jfarr.cc
Signed-off-by: Kees Cook <kees@kernel.org>
2024-11-19 08:48:27 -08:00
Wolfram Sang
1b3073291d i2c-host updates for v6.13, part 1
Improvements and Refactoring:
 
  - All controllers using the 'remove_new' callback have been
    reverted to use the 'remove' callback.
 
  - Makefile improvements (switched from '*-objs' to '*-y')
 
  - Intel SCH controller underwent significant refactoring:
    - Improved usage of private data references.
    - Transitioned to memory-mapped I/O functions.
    - Adopted 'devm' functions for resource management.
    - Added kernel-doc compatible comments.
    - Used 'const' where applicable.
    - Numerous smaller refinements.
    This brings love and a modern look to the driver.
 
  - Additional cleanups in the DesignWare driver.
 
  - PIIX4 driver updates:
    - Exposed functions and definitions in the header file to
      enable usage by other drivers (e.g., AMD ASF).
 
  - Nuvoton NPCM I2C controller:
    - Enhanced read/write operations and bus error (BER) flag
      management to address corner cases that could lead to
      timeouts.
 
  - Qualcomm CCI driver received several cleanups.
 
  - iMX/MXC:
    - Improved message handling to reduce I2C protocol overhead.
    - Refactored DMA/non-DMA read/write and bus polling mechanisms
      to achieve this.
 
 New Features:
 
  - i2c-cadence:
    - Added support for atomic transfers.
    - Refactored to group generic code into separate functions.
 
  - Qualcomm CCI:
    - Added support for a 32MHz serial engine clock.
 
  - Added support for:
    - HJMC01 DesignWare ACPI HID.
    - ACPI documentation for PIIX4.
 
 Deprecated Features:
 
  - Dropped support for AMD756 S4882 and NFORCE2 S4985.
 
 New Hardware Support:
 
  - Added support for:
    - Intel Panther Lake.
    - AMD ASF.
    - S32G2/S32G3 SoCs.
    - Realtek RTL I2C Controller.
 
  - New drivers:
    - 'i2c-amd-asf-plat.c' for AMD ASF.
    - 'i2c-rtl9300.c' for Realtek RTL.
 
 Fixes:
 
  - AMD ASF driver:
    - Fixed an uninitialised 'len' variable.
 
 Devicetree Updates:
 
  - Documented Qualcomm SDM670.
  - Added 'PIC64GX' compatibility to Microchip Core I2C binding.
  - Added support for S32G.
 -----BEGIN PGP SIGNATURE-----
 
 iIwEABYIADQWIQScDfrjQa34uOld1VLaeAVmJtMtbgUCZznN0xYcYW5kaS5zaHl0
 aUBrZXJuZWwub3JnAAoJENp4BWYm0y1unOcA+wdXrf10ntY7jsGdd17dKQ951k7m
 mPG1xfDXF/qbDa2bAQCKYGVBwv/efAREtthq9zhfIcRxgefH7iKQIUm2YOcCCw==
 =xYzW
 -----END PGP SIGNATURE-----

Merge tag 'i2c-host-6.13-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow

i2c-host updates for v6.13, part 1

Major Improvements and Refactoring:

 - All controllers using the 'remove_new' callback have been
   reverted to use the 'remove' callback.

 - Intel SCH controller underwent significant refactoring,
   this brings love and a modern look to the driver.

 - PIIX4 driver refactored to enable usage by other drivers
   (e.g., AMD ASF).

 - iMX/MXC improved message handling to reduce protocol overhead:
     Refactored DMA/non-DMA read/write and bus polling mechanisms
     to achieve this.

 - ACPI documentation for PIIX4.

New Features:

 - i2c-cadence added support for atomic transfers.
 - Qualcomm CII added support for a 32MHz serial engine clock.

Deprecated Features:

 - Dropped outdated support for AMD756 S4882 and NFORCE2 S4985. If
   somebody misses this, Jean will rewrite support using the proper
   i2c mux framework.

New Hardware Support:

 - Added support for:
   - Intel Panther Lake (new ID)
   - AMD ASF (new driver)
   - S32G2/S32G3 SoCs (new ID)
   - Realtek RTL I2C Controller (new driver)
   - HJMC01 DesignWare ACPI HID (new ID)
   - PIC64GX to Microchip Core (new ID)
   - Qualcomm SDM670 to Qualcomm CCI (new ID)
2024-11-18 08:35:47 +01:00
Wolfram Sang
433c691662 at24 updates for v6.13-rc1
- add support for the lockable page on ST M24256E
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmcrMMcACgkQEacuoBRx
 13IogQ/8DkYLd7mYxuPmzSW3+7Y+OoDCYAlRtlO0HCaeOjhVw5DrsF7mVgPfyv0L
 2JE4VpLLrSW6LfUpNpaj+GgfnU3CNZNXDtw9hDu6dTsopxVzXeA+rtnRsTuldLID
 /U4KYVUZVJRFBmbmKLleWqlDHahBSmN1wdUqcBqQC6lvA6/7CQp2b5tiGv35n4fl
 bMo4i9o/mBTCbuAdcSOW1GOQEE2UubRlrf7Tlp4Kl7wgrdQucd+XVHhKCy3m+MQs
 KYxZmnkx6sIWobSWlUdsBJ63gUbpuWs3HThk5hT6YV1rzP31Bb0vIPK4rHIjUL/G
 pr4hRHOtcldKJp9H0x7AiDIfPWVvPMNVmX3b89M9tUN0mJDBYtd07ATRfuvkuONt
 SyNLfcDaAF+LQ6MVNFAJz36rVJ6TK+1mt7b/486Fq9Zaebx1C2kBsbltiLwLtINh
 0fzd96c/fnyC/7GUxuWis845TQ9b4D8h/BNQkT88Cbn4NiHyi1blyZVfvEUOs4qx
 pxPnxypA4k/+4JBDhtPczu6t3Of8px91TtO8qLOCZB4fMiXxfS8vEqw+MseDjeYI
 ZF++1jYAAXYSvwBGaSCJvhPeA0E1xy8ueXLEPXgPV+M4xEbtJK9kdmlrKqtPCk9E
 KrereMGkCA/0IxWooQoeNtZoz/DaL2qVol/pFMs+lhBfyXvoetU=
 =+6hV
 -----END PGP SIGNATURE-----

Merge tag 'at24-updates-for-v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-mergewindow

at24 updates for v6.13-rc1

- add support for the lockable page on ST M24256E
2024-11-14 10:37:04 +01:00
Arnd Bergmann
7d6f7cfc34 Reset controller updates for v6.13
* Split the Amlogic reset-meson driver into platform and auxiliary
   bus drivers. Add support for the reset controller in the G12 and
   SM1 audio clock controllers.
 * Replace the list of boolean parameters to the internal
   reset_control_get functions with an enum reset_flags bitfield,
   to make the code more self-descriptive.
 * Add devres helpers to request pre-deasserted (and automatically
   re-asserting during cleanup) reset controls. This allows reducing
   boilerplate in drivers that deassert resets for the lifetime of a
   device.
 * Use the new auto-deasserting devres helpers in reset-uniphier-glue
   as an example.
 * Add support for the LAN966x PCI device in drivers/misc, as a
   dependency for the following reset-microchip-sparx5 patches.
 * Add support for being used on the LAN966x PCI device to the
   reset-microchip-sparx5 driver.
 
 Commit 86f134941a ("MAINTAINERS: Add the Microchip LAN966x PCI driver
 entry") introduces a trivial merge conflict with commit 7280f01e79
 ("net: lan969x: add match data for lan969x") from the net-next tree [1].
 
 [1] https://lore.kernel.org/all/20241101122505.3eacd183@canb.auug.org.au/
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYIADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCZyn4gxcccC56YWJlbEBw
 ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwFJZAP0fjXG07qnGp1Sgai/pmCesg5xJ
 PAEL5/hKaYwQsAQHhwEAwaJg+kVeb74ez3ae4akyvngasJJT9LLDmqWEdxPIcw0=
 =cyUW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmczbWkACgkQYKtH/8kJ
 UifcZQ/+O0Mek2EdY0VB0nFe3HIzFJU2RAdzAE2ivcwRwzsnpXz21UtYWnDjrIn7
 eTPS6oOTKPbukP/fKwz/u7G7iXdM6VcrVJHfE58z5DqBNGGuou/+sRdTNU01XCrw
 y/TmWwsppGbzpRZ6Wd3aAl6+PldLSNUIKSuDUZ87rpKw8XYzXSvFpd7FhJ8ZQ+sh
 0U8E9o9bj0jwJoCT2azx4peiMnsJbFZON9a5DII/3BCEG/mYc+uO1Q0xJeaalawn
 UCLDEsYi8+zNRYwoH7zBxLSDac2S/3k4KpzFXSWmY4JsCiRRh2x7/HFkt5+Mn27L
 W4grUYsy1c2h3SvZAcs5KKSOZlJT3UtYtKRErVaruHAVkeBw7Cgg4pjm4qjOWdmv
 ke4IOOl6VBgJS55ptFuWJdvCUY62IZfnchjlDcAfMy7BxsB7zxXlP4UaO2DzVLCv
 KokE7dEB30jlwqfOMZQNMqw9OaGYQXv58FN6bXp5Te49oyEWuWoPTaQgQSbcUMf6
 97wyTn8hDF1LwFRnHqued6lfv2BmZoX8ej4BDQ51wKU+ppgFOuFODD367rXJrka2
 73fpbMf5WMHiIH2063d/ShXiwvowggbb7SeAprZFI9ZWCdj6YUSHKYTCDvgRVV9W
 D/HjuoTHf4Y7ueD0oQSsOKycSqkEVjYpsOOD++rRzc7xnUmNBww=
 =rxJh
 -----END PGP SIGNATURE-----

Merge tag 'reset-for-v6.13' of git://git.pengutronix.de/pza/linux into soc/drivers

Reset controller updates for v6.13

* Split the Amlogic reset-meson driver into platform and auxiliary
  bus drivers. Add support for the reset controller in the G12 and
  SM1 audio clock controllers.
* Replace the list of boolean parameters to the internal
  reset_control_get functions with an enum reset_flags bitfield,
  to make the code more self-descriptive.
* Add devres helpers to request pre-deasserted (and automatically
  re-asserting during cleanup) reset controls. This allows reducing
  boilerplate in drivers that deassert resets for the lifetime of a
  device.
* Use the new auto-deasserting devres helpers in reset-uniphier-glue
  as an example.
* Add support for the LAN966x PCI device in drivers/misc, as a
  dependency for the following reset-microchip-sparx5 patches.
* Add support for being used on the LAN966x PCI device to the
  reset-microchip-sparx5 driver.

Commit 86f134941a ("MAINTAINERS: Add the Microchip LAN966x PCI driver
entry") introduces a trivial merge conflict with commit 7280f01e79
("net: lan969x: add match data for lan969x") from the net-next tree [1].

[1] https://lore.kernel.org/all/20241101122505.3eacd183@canb.auug.org.au/

* tag 'reset-for-v6.13' of git://git.pengutronix.de/pza/linux: (21 commits)
  misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'
  misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
  reset: mchp: sparx5: set the dev member of the reset controller
  reset: mchp: sparx5: Allow building as a module
  reset: mchp: sparx5: Add MCHP_LAN966X_PCI dependency
  reset: mchp: sparx5: Map cpu-syscon locally in case of LAN966x
  MAINTAINERS: Add the Microchip LAN966x PCI driver entry
  misc: Add support for LAN966x PCI device
  reset: uniphier-glue: Use devm_reset_control_bulk_get_shared_deasserted()
  reset: Add devres helpers to request pre-deasserted reset controls
  reset: replace boolean parameters with flags parameter
  reset: amlogic: Fix small whitespace issue
  reset: amlogic: add auxiliary reset driver support
  reset: amlogic: split the device core and platform probe
  reset: amlogic: move drivers to a dedicated directory
  reset: amlogic: add reset status support
  reset: amlogic: use reset number instead of register count
  reset: amlogic: add driver parameters
  reset: amlogic: make parameters unsigned
  reset: amlogic: use generic data matching function
  ...

Link: https://lore.kernel.org/r/20241105105229.3729474-1-p.zabel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-11-12 15:59:53 +01:00
Colin Ian King
5a6c35258d mei: vsc: Fix typo "maintstepping" -> "mainstepping"
There is a typo in a dev_err message. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20241112084507.452776-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-12 12:57:11 +01:00
Zhu Jun
40e210a137 misc: isl29020: Fix the wrong format specifier
The format specifier of "unsigned long int" in sprintf() should be "%lu", not
"%ld".

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20241111091950.4299-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-12 12:54:53 +01:00
Hans de Goede
c4dab0828c mei: vsc: Improve error logging in vsc_identify_silicon()
vsc_identify_silicon() returns -EINVAL in various places without logging
what is going on.

And there are several bug reports about mei_vsc_hw_reset() failing with
-EINVAL before the "silicon stepping version is %u:%u" message get logged,
indicating this is coming from vsc_identify_silicon():

[   10.949657] intel_vsc intel_vsc: hw_reset failed ret = -22
[   10.988899] intel_vsc intel_vsc: hw_reset failed ret = -22
[   11.027140] intel_vsc intel_vsc: hw_reset failed ret = -22
[   11.027151] intel_vsc intel_vsc: reset: reached maximal consecutive resets: disabling the device
[   11.027155] intel_vsc intel_vsc: reset failed ret = -19
[   11.027157] intel_vsc intel_vsc: link layer initialization failed.
[   11.027159] intel_vsc intel_vsc: error -ENODEV: init hw failed

Add proper error logging to mei_vsc_hw_reset() so that it will be clear
why it is failing when it fails.

Link: https://github.com/intel/ivsc-driver/issues/51
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20241108151234.36884-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-10 11:03:03 +01:00
Hans de Goede
49988a7975 mei: vsc: Do not re-enable interrupt from vsc_tp_reset()
The only 2 callers of vsc_tp_reset() are:

1. mei_vsc_hw_reset(), which immediataly calls vsc_tp_intr_disable()
   afterwards.

2. vsc_tp_shutdown() which immediately calls free_irq() afterwards.

So neither actually wants the interrupt to be enabled after resetting
the chip and having the interrupt enabled for a short time afer
the reset is undesirable.

Drop the enable_irq() call from vsc_tp_reset(), so that the interrupt
is left disabled after vsc_tp_reset().

Link: https://github.com/intel/ivsc-driver/issues/51
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20241106220102.40549-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-10 10:57:48 +01:00
Rob Herring (Arm)
65294bebd4 misc: atmel-ssc: Use of_property_present() for non-boolean properties
The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Hari Prasath Gujulan Elango <hari.prasathge@microchip.com>
Link: https://lore.kernel.org/r/20241104190700.275573-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-07 09:54:01 +01:00
Jean Delvare
9b50fe117d misc: keba: Add hardware dependency
Only propose KEBA CP500 drivers on architectures where the device
exists, unless build-testing.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241104142217.1dad57cf@endymion.delvare
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-07 09:53:46 +01:00
Thomas Weißschuh
94a20fb9af sysfs: treewide: constify attribute callback of bin_attribute::mmap()
The mmap() callbacks should not modify the struct
bin_attribute passed as argument.
Enforce this by marking the argument as const.

As there are not many callback implementers perform this change
throughout the tree at once.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com> # ocxl
Acked-by: Krzysztof Wilczyński <kw@linux.com>
Link: https://lore.kernel.org/r/20241103-sysfs-const-bin_attr-v2-6-71110628844c@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-05 14:00:28 +01:00
Greg Kroah-Hartman
9365f0de43 Merge 6.12-rc6 into char-misc-next
We need the char/misc/iio fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-05 09:36:29 +01:00
Luo Yifan
d8da4f1912 eeprom: Fix the cacography in Kconfig
The word 'swtich' is wrong, so fix it.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20241022062534.122428-1-luoyifan@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-05 05:33:47 +01:00
Desnes Nunes
f248ff14b7 misc: rtsx: Cleanup on DRV_NAME cardreader variables
The rtsx_pci_ms memstick driver has been dropped, thus there is no more
need for DRV_NAME_RTSX_PCI_MS variable. Additionally, this also stand-
arizes DRV_NAME variables on alcor_pci and rtsx_usb drivers.

Fixes: d0f459259c ("memstick: rtsx_pci_ms: Remove Realtek PCI memstick driver")
Signed-off-by: Desnes Nunes <desnesn@redhat.com>
Link: https://lore.kernel.org/r/20241031142801.1141680-1-desnesn@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-05 05:33:46 +01:00
Herve Codina
cf3e10cc0e misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'
dtc generates the following warning when building the LAN966x devicetree
overlay (lan966x_pci.dtso):
  Warning (interrupts_property): /fragment@0/__overlay__/pci-ep-bus@0/oic@e00c0120: Missing interrupt-parent

The oic interrupt parent is the PCI device itself. The PCI device node
is the node on which the dtbo will be applied and this node already has
properties needed.

In order to remove the warning, add the missing properties in the
overlay fragment node. Properties in this node will not be added when
the overlay is applied (which is what we expect) but makes dtc happy.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20241025110919.64b1cffb@canb.auug.org.au/
Fixes: 185686beb4 ("misc: Add support for LAN966x PCI device")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20241029084338.194942-3-herve.codina@bootlin.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-11-04 14:34:25 +01:00
Herve Codina
344ea0d36b misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
dtc generates the following warnings when building the LAN966x device
tree overlay (lan966x_pci.dtso):
  Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/cpu_clk: missing or empty reg/ranges property
  Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/ddr_clk: missing or empty reg/ranges property
  Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/sys_clk: missing or empty reg/ranges property

Indeed, related nodes are under the pci-ep-bus (simple-bus) which is not
correct.

Put them outside this node.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20241025110919.64b1cffb@canb.auug.org.au/
Fixes: 185686beb4 ("misc: Add support for LAN966x PCI device")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20241029084338.194942-2-herve.codina@bootlin.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-11-04 14:34:25 +01:00
Alexander Usyskin
4adf613e01 mei: use kvmalloc for read buffer
Read buffer is allocated according to max message size, reported by
the firmware and may reach 64K in systems with pxp client.
Contiguous 64k allocation may fail under memory pressure.
Read buffer is used as in-driver message storage and not required
to be contiguous.
Use kvmalloc to allow kernel to allocate non-contiguous memory.

Fixes: 3030dc0564 ("mei: add wrapper for queuing control commands.")
Cc: stable <stable@kernel.org>
Reported-by: Rohit Agarwal <rohiagar@chromium.org>
Closes: https://lore.kernel.org/all/20240813084542.2921300-1-rohiagar@chromium.org/
Tested-by: Brian Geffon <bgeffon@google.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Acked-by: Tomas Winkler <tomasw@gmail.com>
Link: https://lore.kernel.org/r/20241015123157.2337026-1-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-29 04:01:40 +01:00
Herve Codina
185686beb4 misc: Add support for LAN966x PCI device
Add a PCI driver that handles the LAN966x PCI device using a device-tree
overlay. This overlay is applied to the PCI device DT node and allows to
describe components that are present in the device.

The memory from the device-tree is remapped to the BAR memory thanks to
"ranges" properties computed at runtime by the PCI core during the PCI
enumeration.

The PCI device itself acts as an interrupt controller and is used as the
parent of the internal LAN966x interrupt controller to route the
interrupts to the assigned PCI INTx interrupt.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>	# quirks.c
Link: https://lore.kernel.org/r/20241014124636.24221-2-herve.codina@bootlin.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-10-24 12:09:33 +02:00
Marek Vasut
339cb28b9e eeprom: at24: add ST M24256E Additional Write lockable page support
The ST M24256E behaves as a regular M24C256, except for the E variant
which uses up another I2C address for Additional Write lockable page.
This page is 64 Bytes long and can contain additional data. Add entry
for it, so users can describe that page in DT. Note that users still
have to describe the main M24C256 area separately as that is on separate
I2C address from this page.

Unlike M24C32-D and M24C64-D, this part is specifically ST and does not
have any comparable M24* counterparts from other vendors, hence the st,
vendor prefix. Furthermore, the part name is M24256E without C between
the 24 and 256, this is not a typo. Finally, there is M24C256-D part,
which does contain 32 Bytes long Additional Write lockable page, which
is a different part and not supported by this patch.

Datasheet: https://www.st.com/resource/en/datasheet/m24256e-f.pdf

Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20241017184152.128395-2-marex@denx.de
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-10-22 09:11:30 +02:00
Greg Kroah-Hartman
ec8c17e5ec Merge 6.12-rc4 into tty-next
We need the tty/serial fixes in here as well

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-21 08:51:39 +02:00
Greg Kroah-Hartman
d723c456ef Merge 6.12-rc4 into char-misc-next
We need the iio fixes from 6.12-rc4 in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-21 08:42:22 +02:00
Linus Torvalds
c55228220d Char/Misc/IIO fixes for 6.12-rc4
Here are a number of small char/misc/iio driver fixes for 6.12-rc4.
 Included in here are the following:
   - loads of small iio driver fixes for reported problems
   - parport driver out-of-bounds fix
   - Kconfig description and MAINTAINERS file updates
 
 All of these, except for the Kconfig and MAINTAINERS file updates have
 been in linux-next all week.  Those other two are just documentation
 changes and will have no runtime issues and were merged on Friday.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZxUGYg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynTCQCggBy+iX/11utliIaNKD2PHkB5BjQAn1igXYZI
 hgWphEoTvBtVgGfOzNwt
 =0mak
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull misc driver fixes from Greg KH:
 "Here are a number of small char/misc/iio driver fixes for 6.12-rc4:

   - loads of small iio driver fixes for reported problems

   - parport driver out-of-bounds fix

   - Kconfig description and MAINTAINERS file updates

  All of these, except for the Kconfig and MAINTAINERS file updates have
  been in linux-next all week. Those other two are just documentation
  changes and will have no runtime issues and were merged on Friday"

* tag 'char-misc-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (39 commits)
  misc: rtsx: list supported models in Kconfig help
  MAINTAINERS: Remove some entries due to various compliance requirements.
  misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for OTP device
  misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for EEPROM device
  parport: Proper fix for array out-of-bounds access
  iio: frequency: admv4420: fix missing select REMAP_SPI in Kconfig
  iio: frequency: {admv4420,adrf6780}: format Kconfig entries
  iio: adc: ad4695: Add missing Kconfig select
  iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()
  iioc: dac: ltc2664: Fix span variable usage in ltc2664_channel_config()
  iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig
  iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig
  iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig
  iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig
  iio: frequency: adf4377: add missing select REMAP_SPI in Kconfig
  iio: resolver: ad2s1210: add missing select (TRIGGERED_)BUFFER in Kconfig
  iio: resolver: ad2s1210 add missing select REGMAP in Kconfig
  iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: pressure: bm1390: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  ...
2024-10-20 13:10:44 -07:00
Bartosz Golaszewski
78fe66360e misc: ti-st: st_kim: remove the driver
This driver has only ever been used by the omap4-panda board file. This
file has been gone for over 10 years. Let it go.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20241016094117.16654-1-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-18 13:42:21 +02:00
Gerhard Engleder
c3c3a3e219 misc: keba: Fix missing I2C dependency
Kernel test robot reported a build error on csky:

drivers/misc/keba/cp500.c:287:(.text+0x1c0): undefined reference to `i2c_verify_client'

Add I2C dependency to fix build error.

Fixes: 7948483001 ("misc: keba: Add SPI controller device")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410130817.NXBCxx4q-lkp@intel.com/
Signed-off-by: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241016182751.10457-1-gerhard@engleder-embedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-18 13:42:18 +02:00
Yo-Jung (Leo) Lin
9b673c7551 misc: rtsx: list supported models in Kconfig help
rts5228, rts5261, rts5264 are supported by the rtsx_pci driver, but
they are not mentioned in the Kconfig help when the code was added.
List those models in the Kconfig help accordingly.

Signed-off-by: Yo-Jung Lin (Leo) <0xff07@gmail.com>
Link: https://lore.kernel.org/r/20241017144747.15966-1-0xff07@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-18 13:40:17 +02:00
Heiko Thiery
2471787c1f misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for OTP device
By using NVMEM_DEVID_AUTO we support more than 1 device and
automatically enumerate.

Fixes: 0969001569 ("misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX OTP via NVMEM sysfs")
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20241007071120.9522-2-heiko.thiery@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-13 18:17:57 +02:00
Heiko Thiery
3c2d73de49 misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for EEPROM device
By using NVMEM_DEVID_AUTO we support more than 1 device and
automatically enumerate.

Fixes: 9ab5465349 ("misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX EEPROM via NVMEM sysfs")
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20241007071120.9522-1-heiko.thiery@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-13 18:17:57 +02:00
Gerhard Engleder
a27b406a49 misc: keba: Add UART devices
Add support for the UART auxiliary devices. This enables access to up to
3 different UARTs, which are implemented in the FPGA.

Signed-off-by: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241011191257.19702-9-gerhard@engleder-embedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-13 17:16:57 +02:00
Gerhard Engleder
ca7b844b91 misc: keba: Add battery device
Add support for the battery auxiliary device. This enables monitoring of
the battery.

Signed-off-by: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241011191257.19702-8-gerhard@engleder-embedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-13 17:16:57 +02:00
Gerhard Engleder
f965d315bc misc: keba: Add fan device
Add support for the fan auxiliary device. This enables monitoring of the
fan.

Signed-off-by: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241011191257.19702-7-gerhard@engleder-embedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-13 17:16:57 +02:00
Gerhard Engleder
c6576d9195 misc: keba: Support EEPROM sections as separate devices
The main EEPROM of KEBA CP500 devices is divided into two sections. One
section for type label data like device name, order number, serial
number and so on. The second section is reserved for arbitrary data
stored by the user.

The two sections have a defined range. The first 3 kB for the type label
and the remaining 1 kB for user data. The type label is written during
production and can fill up the whole 3 kB. Thus, the range is fixed and
cannot be changed dynamically.

The two sections cannot be presented as NVMEM cells. A NVMEM cell is
always read and written at once, because the data presented to the user
can differ from the data stored in the physical NVMEM cell. Thus, NVMEM
cells would lead to reading 3 kB for every type label access, even if
only the device name is read. So performance would suffer. But it is
also an indication that NVMEM cells are designed for small data cells
within NVMEM devices.

Register separate NVMEM devices for every section. This enables safe
access to every section. Also different access rights are then possible.

Signed-off-by: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241011191257.19702-6-gerhard@engleder-embedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-13 17:16:57 +02:00
Gerhard Engleder
366898e7a1 misc: keba: Add LAN9252 driver
KEBA CP500 devices use the LAN9252 controller for EtherCAT
communication. For a stable Ethernet link the PHY registers of the
controller need to be configured correctly. This driver configures these
PHY registers as required.

Signed-off-by: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241011191257.19702-5-gerhard@engleder-embedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-13 17:16:57 +02:00
Gerhard Engleder
7948483001 misc: keba: Add SPI controller device
Add support for the SPI controller auxiliary device. This enables access
to the SPI flash of the FPGA and some other SPI devices.

The actual list of SPI devices is detected by reading some bits out of
the previously registered I2C EEPROM.

Signed-off-by: Gerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20241011191257.19702-4-gerhard@engleder-embedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-13 17:16:57 +02:00