Commit Graph

2104 Commits

Author SHA1 Message Date
Linus Torvalds ce952d8f0e gpio updates for v6.10-rc1
GPIO core:
 - remove more unused legacy interfaces (after converting the last remaining
   users to better alternatives)
 - update kerneldocs
 - improve error handling and log messages in GPIO ACPI code
 - remove dead code (always true checks) from GPIOLIB
 
 New drivers:
 - add a driver for Intel Granite Rapids-D vGPIO
 
 Driver improvements:
 - use -ENOTSUPP consistently in gpio-regmap and gpio-pcie-idio-24
 - provide an ID table for gpio-cros-ec to avoid a driver name fallback check
 - add support for gpio-ranges for GPIO drivers supporting multiple GPIO banks
 - switch to using dynamic GPIO base in gpio-brcmstb
 - fix irq handling in gpio-npcm-sgpio
 - switch to memory mapped IO accessors in gpio-sch
 
 DT bindings:
 - add support for gpio-ranges to gpio-brcmstb
 - add support for a new model and the gpio-line-names property to gpio-mpfs
 
 Documentation:
 - replace leading tabs with spaces in code blocks
 - fix typos
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmZDFa4ACgkQEacuoBRx
 13IJuA//cdR+Y1xaiORhVg9gMjmeQtgP7ve6QK4p/vuwAuZJMxboc4ATPY4cBlvp
 VoMFQD8FgjbxcKRLjugS0wB/5isELzo5C+q699YKY/0R07WMBiTIt6FgS4JJ1j57
 RoAlLrZ7gxmJQyUWuk2dvvQ55MnCL4fzVCzCrQB+foWsZluyeQMnndFU7z+P96bK
 ckvNrfFlZjaTwRBVf9MVpcNUxuk+pFKMKfXCgNCvmhToOaOM3sKkFwMMZCOVRLpJ
 oCcAz6rbj+fn2x3Id2FS2R5f5GoZx31dalLnbJCY4OLgDNhjx1A7sONq+hplfO24
 LXxQgCP26myaxmCFsiKqYgYzh/1bnAeCaRjy+41+RWXy7LUil6c0yP1Z3pOlOK+h
 j32+/LS9aflneoxjXyAAQLAvMulDbIvKeWHUakPXk6bS/AR6zyL16rwfF9U3K795
 ZGAz37xuOCpAevGnRTpPz9eCWwnNFq5v8UMjvVmoMgtbJbIwP4J3cRzj6RCiBvrq
 AvveulP+oXde3vFydAf1NbjaRxf53b8vZp6DLFDqcU+76QCQwG55QqlhT4Nqm/Y4
 KASQYM4vlH+96vnCMW+p2DmN92dkoadwk5pBvEaY7q7eEC2EdAMfujUZ1VdB9OZ+
 FPZ6zAp6T2khVt4jzKFxbobV8xt3FznntEhbm4bo3Ugb2HRwD8g=
 =mBWd
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski
 "This was a quiet release cycle for the GPIO tree and so this
  pull-request is relatively small.

  We have one new driver, some minor improvements to the GPIO core code
  and across several drivers, some DT and documentation updates but in
  general nothing stands out or is controversial. All changes have spent
  time in next with no reported issues (or ones that were quickly
  fixed).

  GPIO core:
   - remove more unused legacy interfaces (after converting the last
     remaining users to better alternatives)
   - update kerneldocs
   - improve error handling and log messages in GPIO ACPI code
   - remove dead code (always true checks) from GPIOLIB

  New drivers:
   - add a driver for Intel Granite Rapids-D vGPIO

  Driver improvements:
   - use -ENOTSUPP consistently in gpio-regmap and gpio-pcie-idio-24
   - provide an ID table for gpio-cros-ec to avoid a driver name
     fallback check
   - add support for gpio-ranges for GPIO drivers supporting multiple
     GPIO banks
   - switch to using dynamic GPIO base in gpio-brcmstb
   - fix irq handling in gpio-npcm-sgpio
   - switch to memory mapped IO accessors in gpio-sch

  DT bindings:
   - add support for gpio-ranges to gpio-brcmstb
   - add support for a new model and the gpio-line-names property to
     gpio-mpfs

  Documentation:
   - replace leading tabs with spaces in code blocks
   - fix typos"

* tag 'gpio-updates-for-v6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (30 commits)
  gpio: nuvoton: Fix sgpio irq handle error
  gpiolib: Discourage to use formatting strings in line names
  gpio: brcmstb: add support for gpio-ranges
  gpio: of: support gpio-ranges for multiple gpiochip devices
  dt-bindings: gpio: brcmstb: add gpio-ranges
  gpio: Add Intel Granite Rapids-D vGPIO driver
  gpio: brcmstb: Use dynamic GPIO base numbers
  gpiolib: acpi: Set label for IRQ only lines
  gpiolib: acpi: Add fwnode name to the GPIO interrupt label
  gpiolib: Get rid of never false gpio_is_valid() calls
  gpiolib: acpi: Pass con_id instead of property into acpi_dev_gpio_irq_get_by()
  gpiolib: acpi: Move acpi_can_fallback_to_crs() out of __acpi_find_gpio()
  gpiolib: acpi: Simplify error handling in __acpi_find_gpio()
  gpiolib: acpi: Extract __acpi_find_gpio() helper
  gpio: sch: Utilise temporary variable for struct device
  gpio: sch: Switch to memory mapped IO accessors
  gpio: regmap: Use -ENOTSUPP consistently
  gpio: pcie-idio-24: Use -ENOTSUPP consistently
  Documentation: gpio: Replace leading TABs by spaces in code blocks
  gpiolib: acpi: Check for errors first in acpi_find_gpio()
  ...
2024-05-14 15:07:07 -07:00
Andy Shevchenko 11346db506
spi: pxa2xx: Provide num-cs for Sharp PDAs via device properties
Since driver can parse num-cs device property, replace platform data
with this new approach. This pursues the following objectives:

- getting rid of the public header that barely used outside of
  the SPI subsystem (more specifically the SPI PXA2xx drivers)

- making a trampoline for the driver to support non-default number
  of the chip select pins in case the original code is going to be
  converted to Device Tree model

It's not expected to have more users in board files except this one.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240417110334.2671228-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-03 11:11:32 +09:00
Andy Shevchenko 1a45e09a21 ARM: pxa: spitz: Open code gpio_request_array()
In order to prerare for removal of gpio_request_array(), open code
the latter. Note, we are not using gpio_request_one() as it's also
deprecated, hence reducing legacy API usage to the very basic ones.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-04-03 13:07:18 +02:00
Andy Shevchenko 7fd54c205f
spi: pxa2xx: Kill pxa2xx_set_spi_info()
There is the only one user of the pxa2xx_set_spi_info(). Unexport it
and inline to the actual user.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://msgid.link/r/20240307195056.4059864-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25 00:49:15 +00:00
Linus Torvalds a1c19328a1 ARM: SoC cleanups for 6.6
These are all minor cleanups for platform specific code in arch/arm/
 and some of the associated drivers. The majority of these are work
 done by Rob Herring to improve the way devicetreee header files
 are handled.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmTuaDEACgkQYKtH/8kJ
 UicmKQ/6A506T45KbbCLsqMuJsGdjMdOKdBecssLWhFNhRoJhJB6YilQVjBUAK4D
 vDqc425IcxXwaW+4OVBFCgVpKKMlrLSpHVJHl6QaGsxAZt5xdhwcA4ttQcFvoQtK
 csuwOadO9g1K4Px29J8GFR/FvFNt8kHRxbRC3xcGfFsFvgXISAiLUv8w6Z5O8Z5W
 /sp+EsOkJWTTKu+vtcMXccGqM9eGNOfPK1bCUElJ1+HW3jZrbRw0zZrQ2QS72N2P
 wpO2f6JUTpiiMH8XhQd3REi3Kli+g0GxVlCStZc/0qf/uW70YanF4CPDdSOVJ5OL
 l05Qfx+/XsGyqt3el03UoIXfM1YzvWn5BeqNG/QGHkai7Lp/c8LvSk1NiwaS0dzi
 QcPCEK67wjoaBCdSAMKGYM/qlmffuLh9/NJM5dzdBE8zQ5rC1XorR2aHGyISQJt6
 tDlDXy14zyR3KRxOoqP6cWp+PFDcBksd44cxGbp/Lcc389UKxX8j4fM8yUNT+4Rh
 gZ5OtUMs5QhFJBhBbBxW6O3TMuhwjSdW7IEQafKiiHEOFucf6Zcxd9u9B2yzsdtU
 za6mpA/NEBIc3olv6IFIdT24+M3PLhqCbu6YL5YI4jBf0QNpXjRBr+EOtvt2mvC9
 JkoggyCf5LdDt833G/TBPpx0VYi8h0m7cQnMw4JjOIA8FvCwIdc=
 =c9NM
 -----END PGP SIGNATURE-----

Merge tag 'soc-arm-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC cleanups from Arnd Bergmann:
 "These are all minor cleanups for platform specific code in arch/arm/
  and some of the associated drivers. The majority of these are work
  done by Rob Herring to improve the way devicetreee header files are
  handled"

* tag 'soc-arm-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (49 commits)
  ARM: davinci: Drop unused includes
  ARM: s5pv210: Explicitly include correct DT includes
  ARM: dove: Drop unused includes
  ARM: mvebu: Explicitly include correct DT includes
  Documentation/process: maintainer-soc: document dtbs_check requirement for Samsung
  MAINTAINER: samsung: document dtbs_check requirement for Samsung
  Documentation/process: maintainer-soc: add clean platforms profile
  MAINTAINERS: soc: reference maintainer profile
  ARM: nspire: Remove unused header file mmio.h
  ARM: nspire: Use syscon-reboot to handle restart
  soc: fsl: Explicitly include correct DT includes
  soc: xilinx: Explicitly include correct DT includes
  soc: sunxi: Explicitly include correct DT includes
  soc: rockchip: Explicitly include correct DT includes
  soc: mediatek: Explicitly include correct DT includes
  soc: aspeed: Explicitly include correct DT includes
  firmware: Explicitly include correct DT includes
  bus: Explicitly include correct DT includes
  ARM: spear: Explicitly include correct DT includes
  ARM: mvebu: Explicitly include correct DT includes
  ...
2023-08-30 16:49:40 -07:00
Linus Torvalds daa22f5a78 Modules changes for v6.6-rc1
Summary of the changes worth highlighting from most interesting to boring below:
 
   * Christoph Hellwig's symbol_get() fix to Nvidia's efforts to circumvent the
     protection he put in place in year 2020 to prevent proprietary modules from
     using GPL only symbols, and also ensuring proprietary modules which export
     symbols grandfather their taint. That was done through year 2020 commit
     262e6ae708 ("modules: inherit TAINT_PROPRIETARY_MODULE"). Christoph's new
     fix is done by clarifing __symbol_get() was only ever intended to prevent
     module reference loops by Linux kernel modules and so making it only find
     symbols exported via EXPORT_SYMBOL_GPL(). The circumvention tactic used
     by Nvidia was to use symbol_get() to purposely swift through proprietary
     module symbols and completley bypass our traditional EXPORT_SYMBOL*()
     annotations and community agreed upon restrictions.
 
     A small set of preamble patches fix up a few symbols which just needed
     adjusting for this on two modules, the rtc ds1685 and the networking enetc
     module. Two other modules just needed some build fixing and removal of use
     of __symbol_get() as they can't ever be modular, as was done by Arnd on
     the ARM pxa module and Christoph did on the mmc au1xmmc driver.
 
     This is a good reminder to us that symbol_get() is just a hack to address
     things which should be fixed through Kconfig at build time as was done in
     the later patches, and so ultimately it should just go.
 
   * Extremely late minor fix for old module layout 055f23b74b ("module: check
     for exit sections in layout_sections() instead of module_init_section()") by
     James Morse for arm64. Note that this layout thing is old, it is *not*
     Song Liu's commit ac3b432839 ("module: replace module_layout with
     module_memory"). The issue however is very odd to run into and so there was
     no hurry to get this in fast.
 
   * Although the fix did not go through the modules tree I'd like to highlight
     the fix by Peter Zijlstra in commit 5409730962 ("x86/static_call: Fix
     __static_call_fixup()") now merged in your tree which came out of what
     was originally suspected to be a fallout of the the newer module layout
     changes by Song Liu commit ac3b432839 ("module: replace module_layout
     with module_memory") instead of module_init_section()"). Thanks to the report
     by Christian Bricart and the debugging by Song Liu & Peter that turned to
     be noted as a kernel regression in place since v5.19 through commit
     ee88d363d1 ("x86,static_call: Use alternative RET encoding").
 
     I highlight this to reflect and clarify that we haven't seen more fallout
     from ac3b432839 ("module: replace module_layout with module_memory").
 
   * RISC-V toolchain got mapping symbol support which prefix symbols with "$"
     to help with alignment considerations for disassembly. This is used to
     differentiate between incompatible instruction encodings when disassembling.
     RISC-V just matches what ARM/AARCH64 did for alignment considerations and
     Palmer Dabbelt extended is_mapping_symbol() to accept these symbols for
     RISC-V. We already had support for this for all architectures but it also
     checked for the second character, the RISC-V check Dabbelt added was just
     for the "$". After a bit of testing and fallout on linux-next and based on
     feedback from Masahiro Yamada it was decided to simplify the check and treat
     the first char "$" as unique for all architectures, and so we no make
     is_mapping_symbol() for all archs if the symbol starts with "$".
 
     The most relevant commit for this for RISC-V on binutils was:
 
     https://sourceware.org/pipermail/binutils/2021-July/117350.html
 
   * A late fix by Andrea Righi (today) to make module zstd decompression use
     vmalloc() instead of kmalloc() to account for large compressed modules. I
     suspect we'll see similar things for other decompression algorithms soon.
 
   * samples/hw_breakpoint minor fixes by Rong Tao, Arnd Bergmann and Chen Jiahao
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCgAwFiEENnNq2KuOejlQLZofziMdCjCSiKcFAmTuShISHG1jZ3JvZkBr
 ZXJuZWwub3JnAAoJEM4jHQowkoin7rEQAIt9cGmkHyA6Po/Ex8DejWvSTTOQzIXk
 NvtGurODghWnCejZ7Yofo1T48mvgHOenDQB9qNSkVtKDyhmWCbss6wQU/5M8Mc3A
 G+9svkQ8H1BRzTwX3WJKF9KNMhI0HA0CXz3ED/I4iX/Q4Ffv3bgbAiitY6r48lJV
 PSKPzwH9QMIti6k3j+bFf2SwWCV3X2jz+btdxwY34dVFyggdYgaBNKEdrumCx4nL
 g0tQQxI8QgltOnwlfOPLEhdSU1yWyIWZtqtki6xksLziwTreRaw1HotgXQDpnt/S
 iJY9xiKN1ChtVSprQlbTb9yhFbCEGvOYGEaKl/ZsGENQjKzRWsQ+dtT8Ww6n2Y1H
 aJXwniv6SqCW7dCwdKo4sE7JFYDP56yFYKBLOPSPbMm6DJwTMbzLUf7TGNh6NKyl
 3pqjGagJ+LTj3l9w5ur4zTrDGAmLzMpNR03+6niTM7C3TPOI1+wh5zGbvtoA/WdA
 ytQeOTiUsi0uyVgk50f67IC6virrxwupeyZQlYFGNuEGBClgXzzzgw/MKwg0VMvc
 aWhFPUOLx8/8juJ3A5qiOT+znQJ2DTqWlT+QkQ8R5qFVXEW1g9IOnhaHqDX+KB0A
 OPlZ9xwss2U0Zd1XhourtqhUhvcODWNzTj3oPzjdrGiBjdENz8hPKP+7HV1CG6xy
 RdxpSwu72kFu
 =IQy2
 -----END PGP SIGNATURE-----

Merge tag 'modules-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux

Pull modules updates from Luis Chamberlain:
 "Summary of the changes worth highlighting from most interesting to
  boring below:

   - Christoph Hellwig's symbol_get() fix to Nvidia's efforts to
     circumvent the protection he put in place in year 2020 to prevent
     proprietary modules from using GPL only symbols, and also ensuring
     proprietary modules which export symbols grandfather their taint.

     That was done through year 2020 commit 262e6ae708 ("modules:
     inherit TAINT_PROPRIETARY_MODULE"). Christoph's new fix is done by
     clarifing __symbol_get() was only ever intended to prevent module
     reference loops by Linux kernel modules and so making it only find
     symbols exported via EXPORT_SYMBOL_GPL(). The circumvention tactic
     used by Nvidia was to use symbol_get() to purposely swift through
     proprietary module symbols and completely bypass our traditional
     EXPORT_SYMBOL*() annotations and community agreed upon
     restrictions.

     A small set of preamble patches fix up a few symbols which just
     needed adjusting for this on two modules, the rtc ds1685 and the
     networking enetc module. Two other modules just needed some build
     fixing and removal of use of __symbol_get() as they can't ever be
     modular, as was done by Arnd on the ARM pxa module and Christoph
     did on the mmc au1xmmc driver.

     This is a good reminder to us that symbol_get() is just a hack to
     address things which should be fixed through Kconfig at build time
     as was done in the later patches, and so ultimately it should just
     go.

   - Extremely late minor fix for old module layout 055f23b74b
     ("module: check for exit sections in layout_sections() instead of
     module_init_section()") by James Morse for arm64. Note that this
     layout thing is old, it is *not* Song Liu's commit ac3b432839
     ("module: replace module_layout with module_memory"). The issue
     however is very odd to run into and so there was no hurry to get
     this in fast.

   - Although the fix did not go through the modules tree I'd like to
     highlight the fix by Peter Zijlstra in commit 5409730962
     ("x86/static_call: Fix __static_call_fixup()") now merged in your
     tree which came out of what was originally suspected to be a
     fallout of the the newer module layout changes by Song Liu commit
     ac3b432839 ("module: replace module_layout with module_memory")
     instead of module_init_section()"). Thanks to the report by
     Christian Bricart and the debugging by Song Liu & Peter that turned
     to be noted as a kernel regression in place since v5.19 through
     commit ee88d363d1 ("x86,static_call: Use alternative RET
     encoding").

     I highlight this to reflect and clarify that we haven't seen more
     fallout from ac3b432839 ("module: replace module_layout with
     module_memory").

   - RISC-V toolchain got mapping symbol support which prefix symbols
     with "$" to help with alignment considerations for disassembly.

     This is used to differentiate between incompatible instruction
     encodings when disassembling. RISC-V just matches what ARM/AARCH64
     did for alignment considerations and Palmer Dabbelt extended
     is_mapping_symbol() to accept these symbols for RISC-V. We already
     had support for this for all architectures but it also checked for
     the second character, the RISC-V check Dabbelt added was just for
     the "$". After a bit of testing and fallout on linux-next and based
     on feedback from Masahiro Yamada it was decided to simplify the
     check and treat the first char "$" as unique for all architectures,
     and so we no make is_mapping_symbol() for all archs if the symbol
     starts with "$".

     The most relevant commit for this for RISC-V on binutils was:

       https://sourceware.org/pipermail/binutils/2021-July/117350.html

   - A late fix by Andrea Righi (today) to make module zstd
     decompression use vmalloc() instead of kmalloc() to account for
     large compressed modules. I suspect we'll see similar things for
     other decompression algorithms soon.

   - samples/hw_breakpoint minor fixes by Rong Tao, Arnd Bergmann and
     Chen Jiahao"

* tag 'modules-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
  module/decompress: use vmalloc() for zstd decompression workspace
  kallsyms: Add more debug output for selftest
  ARM: module: Use module_init_layout_section() to spot init sections
  arm64: module: Use module_init_layout_section() to spot init sections
  module: Expose module_init_layout_section()
  modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
  rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
  net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index
  mmc: au1xmmc: force non-modular build and remove symbol_get usage
  ARM: pxa: remove use of symbol_get()
  samples/hw_breakpoint: mark sample_hbp as static
  samples/hw_breakpoint: fix building without module unloading
  samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'
  modpost, kallsyms: Treat add '$'-prefixed symbols as mapping symbols
  kernel: params: Remove unnecessary ‘0’ values from err
  module: Ignore RISC-V mapping symbols too
2023-08-29 17:32:32 -07:00
Rob Herring 48f1138f9c
ARM: pxa: Drop unused includes
Several includes are not needed, so drop them.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-11-d8de2cc88bff@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-08-12 10:31:00 +02:00
Arnd Bergmann 0faa29c420 ARM: pxa: remove use of symbol_get()
The spitz board file uses the obscure symbol_get() function
to optionally call a function from sharpsl_pm.c if that is
built. However, the two files are always built together
these days, and have been for a long time, so this can
be changed to a normal function call.

Link: https://lore.kernel.org/lkml/20230731162639.GA9441@lst.de/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
2023-08-02 11:15:11 -07:00
Arnd Bergmann 09eadda27c backlight: corgi_lcd: fix missing prototype
The corgi_lcd_limit_intensity() function is called from platform
and defined in a driver, but the driver does not see the declaration:

drivers/video/backlight/corgi_lcd.c:434:6: error: no previous prototype for 'corgi_lcd_limit_intensity' [-Werror=missing-prototypes]
  434 | void corgi_lcd_limit_intensity(int limit)

Move the prototype into a header that can be included from both
sides to shut up the warning.

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-07-27 15:39:17 +02:00
Linus Torvalds 7b82e90411 asm-generic updates for 6.5
These are cleanups for architecture specific header files:
 
  - the comments in include/linux/syscalls.h have gone out of sync
    and are really pointless, so these get removed
 
  - The asm/bitsperlong.h header no longer needs to be architecture
    specific on modern compilers, so use a generic version for newer
    architectures that use new enough userspace compilers
 
  - A cleanup for virt_to_pfn/virt_to_bus to have proper type
    checking, forcing the use of pointers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmSl138ACgkQYKtH/8kJ
 UieqWxAA2WjNVfyuieYckglOVE0PZPs2fzCwyzTY5iUTH3gE5cBFWJDWcg2EnouG
 v3X3htEQcowYWaCF9+rypQXaGiSx4WXi2Bjxnz3D/BcreqWPI4eSQ0fpGG5SURTY
 2zYF72GTt4JGR++l+7/R9MZwPbwYDT9BsD5tkel8PxnyVLM6/c5xFvbjzRSKFE8x
 SMN1jGZ62ITLNf/8coAOEPNxBYtDT6yQyu7P2sx5cd65LAQq9yLKjFklnBBovgWT
 OoCIZAdGkhcNwOh1LjyHcdNdpfNJGceKyqKPqty07IhCQuF2jxiyFYFzuBbeyQfE
 S0itN8o/MIfUmxaQl3e8dPAVb1RlNVr1zfQ6y4tUtWNdkNL2WwSnSQSRHrBfHxCQ
 QCF++PMeFcLhGwMYtqdNJ7XGLQ0PsjD74pRf0vo+vjmqDk2BJsJBP57VU+8MJn5r
 SoxqnJ0WxLvm1TfrNKusV7zMNWquc2duJDW40zsOssP4itjYELSI6qa56qmzlqmX
 zKmRx6mxAlx9RRK8FHXFYHbz3p93vv8z9vTOZV3AjIjjED960CLknUAwCC8FoJyz
 9b5wyMXsLQHQjGt8luAvPc6OiU0EiU9a4SPK+feWcv27serFvnjJlRTS/yG2Z3zd
 BYsUgsXHypsdoud+aE7MeCy7fE8n3mhoyMQQRBkOMFJ7RsG6wAE=
 =S/he
 -----END PGP SIGNATURE-----

Merge tag 'asm-generic-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm-generic updates from Arnd Bergmann:
 "These are cleanups for architecture specific header files:

   - the comments in include/linux/syscalls.h have gone out of sync and
     are really pointless, so these get removed

   - The asm/bitsperlong.h header no longer needs to be architecture
     specific on modern compilers, so use a generic version for newer
     architectures that use new enough userspace compilers

   - A cleanup for virt_to_pfn/virt_to_bus to have proper type checking,
     forcing the use of pointers"

* tag 'asm-generic-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  syscalls: Remove file path comments from headers
  tools arch: Remove uapi bitsperlong.h of hexagon and microblaze
  asm-generic: Unify uapi bitsperlong.h for arm64, riscv and loongarch
  m68k/mm: Make pfn accessors static inlines
  arm64: memory: Make virt_to_pfn() a static inline
  ARM: mm: Make virt_to_pfn() a static inline
  asm-generic/page.h: Make pfn accessors static inlines
  xen/netback: Pass (void *) to virt_to_page()
  netfs: Pass a pointer to virt_to_page()
  cifs: Pass a pointer to virt_to_page() in cifsglob
  cifs: Pass a pointer to virt_to_page()
  riscv: mm: init: Pass a pointer to virt_to_page()
  ARC: init: Pass a pointer to virt_to_pfn() in init
  m68k: Pass a pointer to virt_to_pfn() virt_to_page()
  fs/proc/kcore.c: Pass a pointer to virt_addr_valid()
2023-07-06 10:06:04 -07:00
Linus Torvalds bf1fa6f155 ARM: SoC changes for 6.5
These are mostly minor cleanups and bugfixes that address harmless
 problems.
 
 The largest branch is a conversion of the omap platform
 to use GPIO descriptors throughout the tree, for any devices that
 are not fully converted to devicetree.
 
 The Samsung Exynos platform gains back support for the Exynos4212
 chip that was previously unused and removed but is now used for
 the Samsung Galaxy Tab3.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmScsH8ACgkQYKtH/8kJ
 UicTOhAAxQB1zySNJ4vOwTnV9Mrey+b/1RvjKDwZAa3uuP6vgpPjAjqVxlRxl+TM
 SWal+0zzj+vrFTkTl0niT+DzMFOEnLqhBd7smN8YKmC+hD3t9g5Dos7Q/IsUVlrT
 SnXDmit+eSI2QXFeO1OM0LdmniLDcKydsQ8o4beKF6YaJRGYACNSmtIjB3KvWccv
 3cQXoaqN5rFoQxbLiGVINVyDU3Qpie2m8RqUcVWSmva46UM2yDAUWXwFNxcP8jXp
 WjL+NaiH7Ea/pzPcn3895u5ybIOZSylxLGRzL1ktewJqczUKf701qVZbf6enZp99
 SbEQQh4DKm4DkpQ/JdPoO9x3InORAGUQ1p0Ssa92rKuiEVSXsQUeO3BNAYGfvpy3
 o3QElSp6hlDWOHk9KawHzY3lfMsvKnTckFQDZxMbvC0+tQj6cDIM/qWo74CdZ07S
 UxVa1C9L2Lerv6IAG3v2meI9HjBn7DInWjfOAOxj2gX/ryIrdX9lO0692n6nVYca
 szH3CANjwPCPrtjAE2RXPjLTK+6nmQDavcEVEiG1SoGTplLh7RZgeQXV+5iIaOLp
 Nc8MDddR656kPBEprgoEugGZuLjsY2IGaLj+FNGriOEBKo5jpfEFeRQ2GPKxoyWR
 OHeWtxcFtBc2SnfVOtdMQ/X3UZTd4vlJYbNffiL+2NSM0iMBbHs=
 =z6FU
 -----END PGP SIGNATURE-----

Merge tag 'soc-arm-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC updates from Arnd Bergmann:
 "These are mostly minor cleanups and bugfixes that address harmless
  problems.

  The largest branch is a conversion of the omap platform to use GPIO
  descriptors throughout the tree, for any devices that are not fully
  converted to devicetree.

  The Samsung Exynos platform gains back support for the Exynos4212 chip
  that was previously unused and removed but is now used for the Samsung
  Galaxy Tab3"

* tag 'soc-arm-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits)
  ARM: omap2: Fix copy/paste bug
  MAINTAINERS: Replace my email address
  Input: ads7846 - fix pointer cast warning
  Input: ads7846 - Fix usage of match data
  ARM: omap2: Fix checkpatch issues
  arm: omap1: replace printk() with pr_err macro
  ARM: omap: Fix checkpatch issues
  ARM: s3c: Switch i2c drivers back to use .probe()
  ARM: versatile: mark mmc_status() static
  ARM: spear: include "pl080.h" for pl080_get_signal() prototype
  ARM: sa1100: address missing prototype warnings
  ARM: pxa: fix missing-prototypes warnings
  ARM: orion5x: fix d2net gpio initialization
  ARM: omap2: fix missing tick_broadcast() prototype
  ARM: omap1: add missing include
  ARM: lpc32xx: add missing include
  ARM: imx: add missing include
  ARM: highbank: add missing include
  ARM: ep93xx: fix missing-prototype warnings
  ARM: davinci: fix davinci_cpufreq_init() declaration
  ...
2023-06-29 15:28:33 -07:00
Linus Torvalds e5476f57b3 gpio updates for v6.5
Core GPIO library:
 - remove unused symbols
 - don't spam the kernel log with messages about hogs
 - remove old sysfs API cruft
 - improve handling of GPIO masks
 
 New drivers
 - add a driver for the BlueField-3 GPIO controller
 - add GPIO support for the TPS65219 PMIC
 
 Driver improvements:
 - extend the gpio-aggregator driver to support ramp-up/ramp-down delay
 - remove unnecessary CONFIG_OF guards from gpio-aggregator
 - readability improvements in gpio-tangier
 - switch i2c drivers back to using probe() now that it's been converted in
   the i2c subsystem to not taking the id parameter
 - remove unused inclusions of of_gpio.h in several drivers
 - make pm ops static in gpio-davinci and fix a comment
 - use more devres in drivers to shrink and simplify the code
 - add missing include in gpio-sa1100
 - add HAS_IOPORT KConfig dependency where needed
 - add permissions checks before accessing pins in gpio-tegra186
 - convert the gpio-zynq driver to using immutable irqchips
 - preserve output settings set by the bootloader in gpio-mpc8xxx
 
 Selftests:
 - tweak the variable naming in script tests
 
 Device tree updates:
 - convert gpio-mmio and gpio-stmpe to YAML
 - add parsing of GPIO hogs to gpio-vf610
 - add bindings for the Cirrus EP93xx GPIO controller
 - add gpio-line-names property to the gpio-pca9570 bindings
 - extend the binding for x-powers,axp209 with another block
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmSbB5YACgkQEacuoBRx
 13I8xhAAoI9irAnAbh+Lgn0EdziMlqE6E8oohBtRY7rHK7Pi3IZNoATK3GT5bebF
 a0+EzqOTM22g2qIv41zkG7SyBgdkRg6Ld+/ogvlgddphhEGxY3MdRbSyPacHlzj1
 BYnOJt+uQ46TwnzyTjVLn/1aGcD2LPB0j4rS1HnbsDHT8xGAjdq2O3YYNH7ZairA
 ZbIc/2Cpn4X1YWXX+s3a4B8w1eCEoRNG2Fvie6hmr518TSctP/MiFe6W7+eQrHwT
 GI491Rr4qT/lmRFVsxslYUPREUe/va8RM3uIC23zEkZYjsbRLJ2tvCGulm8D/H1n
 rUB9yXj+n5mCjTH7Gebg7J99NKpHo4uoXKrFhhetH9a0adsJCOwBr14YO8NP66jK
 hmZW8f8+QEAA4nhXx0VqpOp1FGw5unhPF/k8Apct8TeVJCv9i8g5QRreTf1030Hl
 l8x7JhsHlZGADGeLBPaNBIjuCB99YEMNtl4Ouzh7w1/1JsFcwI/cdASNxrsI4SCf
 Tl92+xAqZlfnnuHAQFiBBwKxnsHxclBwq3umMQD7kB3cdMELh2gqA3M8F+NGp5SB
 XMcE3gwDH53fXu74523G36sqNqkLNF0K974LwzSz0t4A8tSlwbt2esvzpxa0bDLe
 oqYD+TGAvX+uzr05KZ1kyUfD+95mMHsYY9sQWoUzHQelGmXV32M=
 =3KNJ
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "We have two new drivers, some improvements to the core code, lots of
  different updates to existing GPIO drivers and some dt-bindings on
  top.

  There's nothing controversial in here and almost everything has been
  in next for more than a week (95% a lot longer than this). The only
  thing that has spent less time in next is a new driver so no risk of
  regressions.

  The single merge pulls in changes that remove all usage of global GPIO
  numbers from arch/arm/mach-omap.

  Core GPIO library:
   - remove unused symbols
   - don't spam the kernel log with messages about hogs
   - remove old sysfs API cruft
   - improve handling of GPIO masks

  New drivers:
   - add a driver for the BlueField-3 GPIO controller
   - add GPIO support for the TPS65219 PMIC

  Driver improvements:
   - extend the gpio-aggregator driver to support ramp-up/ramp-down
     delay
   - remove unnecessary CONFIG_OF guards from gpio-aggregator
   - readability improvements in gpio-tangier
   - switch i2c drivers back to using probe() now that it's been
     converted in the i2c subsystem to not taking the id parameter
   - remove unused inclusions of of_gpio.h in several drivers
   - make pm ops static in gpio-davinci and fix a comment
   - use more devres in drivers to shrink and simplify the code
   - add missing include in gpio-sa1100
   - add HAS_IOPORT KConfig dependency where needed
   - add permissions checks before accessing pins in gpio-tegra186
   - convert the gpio-zynq driver to using immutable irqchips
   - preserve output settings set by the bootloader in gpio-mpc8xxx

  Selftests:
   - tweak the variable naming in script tests

  Device tree updates:
   - convert gpio-mmio and gpio-stmpe to YAML
   - add parsing of GPIO hogs to gpio-vf610
   - add bindings for the Cirrus EP93xx GPIO controller
   - add gpio-line-names property to the gpio-pca9570 bindings
   - extend the binding for x-powers,axp209 with another block"

* tag 'gpio-updates-for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (58 commits)
  of: unittest: drop assertions for GPIO hog messages
  gpiolib: Drop unused domain_ops memeber of GPIO IRQ chip
  gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres
  dt-bindings: gpio: gpio-vf610: Add parsing of hogs
  gpio: lpc18xx: Remove unused of_gpio.h inclusion
  gpio: xra1403: Remove unused of_gpio.h inclusion
  gpio: mpc8xxx: Remove unused of_gpio.h inclusion
  dt-bindings: gpio: Add Cirrus EP93xx
  gpio: mpc8xxx: latch GPIOs state on module load when configured as output
  selftests: gpio: gpio-sim: Use same variable name for sysfs pathname
  gpio: mlxbf3: Add gpio driver support
  gpio: delay: Remove duplicative functionality
  gpio: aggregator: Set up a parser of delay line parameters
  gpio: aggregator: Support delay for setting up individual GPIOs
  gpio: aggregator: Remove CONFIG_OF and of_match_ptr() protections
  dt-bindings: gpio: pca9570: add gpio-line-names property
  gpiolib: remove unused gpio_cansleep()
  gpio: tps65219: add GPIO support for TPS65219 PMIC
  gpio: zynq: fix zynqmp_gpio not an immutable chip warning
  gpio: davinci: make davinci_gpio_dev_pm_ops static
  ...
2023-06-29 10:11:10 -07:00
Linus Walleij 5bb578a0c1 ARM: 9298/1: Drop custom mdesc->handle_irq()
ARM exclusively uses GENERIC_IRQ_MULTI_HANDLER, so at some point
set_handle_irq() needs to be called to handle system-wide
interrupts.

For all DT-enabled boards, this call happens down in the
drivers/irqchip subsystem, after locating the target irqchip
driver from the device tree.

We still have a few instances of the boardfiles with machine
descriptors passing a machine-specific .handle_irq() to the
ARM kernel core.

Get rid of this by letting the few remaining machines consistently
call set_handle_irq() from the end of the .init_irq() callback
instead and diet down one member from the machine descriptor.

Cc: Marc Zyngier <maz@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2023-06-19 09:35:48 +01:00
Linus Walleij a9ff696160 ARM: mm: Make virt_to_pfn() a static inline
Making virt_to_pfn() a static inline taking a strongly typed
(const void *) makes the contract of a passing a pointer of that
type to the function explicit and exposes any misuse of the
macro virt_to_pfn() acting polymorphic and accepting many types
such as (void *), (unitptr_t) or (unsigned long) as arguments
without warnings.

Doing this is a bit intrusive: virt_to_pfn() requires
PHYS_PFN_OFFSET and PAGE_SHIFT to be defined, and this is defined in
<asm/page.h>, so this must be included *before* <asm/memory.h>.

The use of macros were obscuring the unclear inclusion order here,
as the macros would eventually be resolved, but a static inline
like this cannot be compiled with unresolved macros.

The naive solution to include <asm/page.h> at the top of
<asm/memory.h> does not work, because <asm/memory.h> sometimes
includes <asm/page.h> at the end of itself, which would create a
confusing inclusion loop. So instead, take the approach to always
unconditionally include <asm/page.h> at the end of <asm/memory.h>

arch/arm uses <asm/memory.h> explicitly in a lot of places,
however it turns out that if we just unconditionally include
<asm/memory.h> into <asm/page.h> and switch all inclusions of
<asm/memory.h> to <asm/page.h> instead, we enforce the right
order and <asm/memory.h> will always have access to the
definitions.

Put an inclusion guard in place making it impossible to include
<asm/memory.h> explicitly.

Link: https://lore.kernel.org/linux-mm/20220701160004.2ffff4e5ab59a55499f4c736@linux-foundation.org/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-05-29 11:27:08 +02:00
Arnd Bergmann 0b47a62ea6 This removes all usage of global GPIO numbers from
arch/arm/mach-omap[12].
 
 The patches have been reviewed and tested by everyone
 who showed interest which was one person that tested
 on OSK1 and Nokia 770, and we smoked out the bugs and
 also addressed all review comments.
 
 Any remaining problems can certainly be fixed in-tree.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmRuCyUACgkQQRCzN7AZ
 XXPZKxAAtrTAYiCqR4EuJWh+l1SiilazOJWI3CoR6z2QDW09T8VEpNSfVHkmxyDL
 FnZKmXsXAJl783Ial3hXfxXb7oxIHIRBU88C+aQN+4w4VxA4ujxV3uAoMA1SFFOL
 +wpGZIT9ReUpUf988wK31SitNB7frNygQosA7kOmhbMWxIUkNs5UYynSjNDrVTNJ
 oVf/e7VM2smbOqbZFhwFNfxu35Oe+ak4xREG4gX+00VtUPJfM85WcMqZNiVzVPcC
 5Hw2nfW9w+ZQyoR1B+UQbeZkbw0Ibb4dpTM43Jij6VO0gKBy+9AsD0oeSih6BiIL
 irBlHYeAtvSmwxVLvlBGZmHBdB8o5tkf1DKvztYPVR+qgoRrY/3LCeSViCjJhNUT
 MNLIR1tTjVR/EouBo7SR4s8Xn/H38Fp3D/sCath/pajRH4446hos/Egh/is8N9Lv
 +OX/L4pO8OeKUiYyEgFkvaIH/L31OCX5ihPh5ErvVQEysYQ3MZGtEBLVgz4QMp7p
 U3SncOfy5VdNX46fDJfNUMsFfl+RKYPhihQ7zRkeJb+qAled7dabwaBCf0L+gKn8
 DpN5rpePOlC0yfFpB0tftDsrrNanh0oZAKjRq9h8+/MbnNYUm9dEv1WeMcDJ17uD
 IhfB9gAcHRsDQd/Fc4btDB4GnfPli+CBMxkRWOV1eyMHriBf7Cw=
 =fMmV
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmRwuesACgkQYKtH/8kJ
 Uif76g/+LKRH+kW01pbLOo/AVabzH6Jb3QICFN4qeRvTkA3EyuxXMinOQFRvdLW5
 E7MCZtOAio8Wm2Gg7kCSb32t13gPhFmyWZAIRVDuWxcSbBFlRkWF0h/rCv0Nq+Q3
 Szkwbz3nAEZU5so/4sfPdddtN48DTdwVLux+5IeI1H9QRJyyAkH7OoS/Ll/E7Ubx
 MCeT+OuT9yTjvrX0jMt4mYHn09OxV174OIo9r3p66HR5TzqAmbEdrb4Hm9FN+wZd
 j/yNNVBp68As1Qo4u/CZPM9LAp77A3oZoMRGkWHyjxaHoYsCuUf1aPnjeSaYxCQN
 koLx4/3eZOgQk3l7yYlMIaQP0BkgDU4EZ6aLCON9VkanmqYicVPdXKaH1UGgf8xJ
 p2lWdDY1FODmmyAfkpI9hVyFsh5/JjEUMmGcl1tdD42nHOZyf3gLUW7BxhaxLzr5
 XsLd6KQaSEaKYL5+v09FSUah8j9fA4qf42sr4ElX4pkzKvaGc35MLytZjoa4Ldrk
 OCtUVmdYK+C3xM3OO5CAzQaJKgskhPkU9UQLwVE5Vmye0mKqT0YPQitjvYgUrHw4
 u+EekfBLyRme4WDQDPjgYBJQ2d5ufapYI9SZ1Xq1xPPsrjDW8r3if4fzUwB3Sd7Q
 RY4ojBprBsyezPJQJFsyJieVOL3hlZ9G3SnzGG7MJQ6nsypAwnc=
 =pBEM
 -----END PGP SIGNATURE-----

Merge tag 'gpio-omap-descriptors-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio into soc/arm

This removes all usage of global GPIO numbers from
arch/arm/mach-omap[12].

The patches have been reviewed and tested by everyone
who showed interest which was one person that tested
on OSK1 and Nokia 770, and we smoked out the bugs and
also addressed all review comments.

Any remaining problems can certainly be fixed in-tree.

* tag 'gpio-omap-descriptors-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  ARM/musb: omap2: Remove global GPIO numbers from TUSB6010
  ARM: omap2: Rewrite WLAN quirk to use GPIO descriptors
  ARM: omap2: Get USB hub reset GPIO from descriptor
  ARM/gpio: Push OMAP2 quirk down into TWL4030 driver
  ARM: omap1: Exorcise the legacy GPIO header
  ARM: omap1: Make serial wakeup GPIOs use descriptors
  ARM: omap1: Fix up the Nokia 770 board device IRQs
  ARM/mmc: Convert old mmci-omap to GPIO descriptors
  Input: ads7846 - Convert to use software nodes
  ARM: omap1: Remove reliance on GPIO numbers from SX1
  ARM: omap1: Remove reliance on GPIO numbers from PalmTE
  ARM: omap1: Drop header on AMS Delta
  ARM/mfd/gpio: Fixup TPS65010 regression on OMAP1 OSK1

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-05-26 15:53:46 +02:00
Arnd Bergmann a9ae9c526c ARM: pxa: fix missing-prototypes warnings
The PXA platform has a number of configurations that end up with
a warning like these when building with W=1:

drivers/hwmon/max1111.c:83:5: error: no previous prototype for 'max1111_read_channel' [-Werror=missing-prototypes]
arch/arm/mach-pxa/reset.c:86:6: error: no previous prototype for 'pxa_restart' [-Werror=missing-prototypes]
arch/arm/mach-pxa/mfp-pxa2xx.c:254:5: error: no previous prototype for 'keypad_set_wake' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa25x.c:70:14: error: no previous prototype for 'pxa25x_get_clk_frequency_khz' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa25x.c:325:12: error: no previous prototype for 'pxa25x_clocks_init' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:74:14: error: no previous prototype for 'pxa27x_get_clk_frequency_khz' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:102:6: error: no previous prototype for 'pxa27x_is_ppll_disabled' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:470:12: error: no previous prototype for 'pxa27x_clocks_init' [-Werror=missing-prototypes]
arch/arm/mach-pxa/pxa27x.c:44:6: error: no previous prototype for 'pxa27x_clear_otgph' [-Werror=missing-prototypes]
arch/arm/mach-pxa/pxa27x.c:58:6: error: no previous prototype for 'pxa27x_configure_ac97reset' [-Werror=missing-prototypes]
arch/arm/mach-pxa/spitz_pm.c:170:15: error: no previous prototype for 'spitzpm_read_devdata' [-Werror=missing-prototypes]

The problem is that there is a declaration for each of these, but
it's only seen by the caller and not the callee. Moving these
into appropriate header files ensures that both use the same
calling conventions and it avoids the warnings.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20230516153109.514251-11-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-05-26 13:33:05 +02:00
Linus Walleij 767d83361a Input: ads7846 - Convert to use software nodes
The Nokia 770 is using GPIOs from the global numberspace on the
CBUS node to pass down to the LCD controller. This regresses when we
let the OMAP GPIO driver use dynamic GPIO base.

The Nokia 770 now has dynamic allocation of IRQ numbers, so this
needs to be fixed for it to work.

As this is the only user of LCD MIPID we can easily augment the
driver to use a GPIO descriptor instead and resolve the issue.

The platform data .shutdown() callback wasn't even used in the
code, but we encode a shutdown asserting RESET in the remove()
callback for completeness sake.

The CBUS also has the ADS7846 touchscreen attached.

Populate the devices on the Nokia 770 CBUS I2C using software
nodes instead of platform data quirks. This includes the LCD
and the ADS7846 touchscreen so the conversion just brings the LCD
along with it as software nodes is an all-or-nothing design
pattern.

The ADS7846 has some limited support for using GPIO descriptors,
let's convert it over completely to using device properties and then
fix all remaining boardfile users to provide all platform data using
software nodes.

Dump the of includes and of_match_ptr() in the ADS7846 driver as part
of the job.

Since we have to move ADS7846 over to obtaining the GPIOs it is
using exclusively from descriptors, we provide descriptor tables
for the two remaining in-kernel boardfiles using ADS7846:

- PXA Spitz
- MIPS Alchemy DB1000 development board

It was too hard for me to include software node conversion of
these two remaining users at this time: the spitz is using a
hscync callback in the platform data that would require further
GPIO descriptor conversion of the Spitz, and moving the hsync
callback down into the driver: it will just become too big of
a job, but it can be done separately.

The MIPS Alchemy DB1000 is simply something I cannot test, so take
the easier approach of just providing some GPIO descriptors in
this case as I don't want the patch to grow too intrusive.

As we see that several device trees have incorrect polarity flags
and just expect to bypass the gpiolib polarity handling, fix up
all device trees too, in a separate patch.

Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Fixes: 92bf78b33b ("gpio: omap: use dynamic allocation of base")
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-05-24 15:01:30 +02:00
Linus Torvalds 865fdb0819 Input updates for 6.4 merge window:
- a new driver for Novatek touch controllers
 
 - a new driver for power button for NXP BBNSM
 
 - a skeleton KUnit tests for the input core
 
 - improvements to Xpad game controller driver to support more devices
 
 - improvements to edt-ft5x06, hideep and other drivers
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZFBJ4wAKCRBAj56VGEWX
 nCsZAQDg5OKPAcJEOastqdbGoq1AaPaZ4Zu92R3iiV3Lc11KlgEA0Bjf/MlqFMas
 uK4eMRq6MkqlIjS0bO9Pt0VQRajGsAg=
 =XMM5
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - a new driver for Novatek touch controllers

 - a new driver for power button for NXP BBNSM

 - a skeleton KUnit tests for the input core

 - improvements to Xpad game controller driver to support more devices

 - improvements to edt-ft5x06, hideep and other drivers

* tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (42 commits)
  Revert "Input: xpad - fix support for some third-party controllers"
  dt-bindings: input: pwm-beeper: convert to dt schema
  Input: xpad - fix PowerA EnWired Controller guide button
  Input: xpad - add constants for GIP interface numbers
  Input: synaptics-rmi4 - fix function name in kerneldoc
  Input: raspberrypi-ts - fix refcount leak in rpi_ts_probe
  Input: edt-ft5x06 - select REGMAP_I2C
  Input: melfas_mip4 - report palm touches
  Input: cma3000_d0x - remove unneeded code
  Input: edt-ft5x06 - calculate points data length only once
  Input: edt-ft5x06 - unify the crc check
  Input: edt-ft5x06 - convert to use regmap API
  Input: edt-ft5x06 - don't print error messages with dev_dbg()
  Input: edt-ft5x06 - remove code duplication
  Input: edt-ft5x06 - don't recalculate the CRC
  Input: edt-ft5x06 - add spaces to ensure format specification
  Input: edt-ft5x06 - remove unnecessary blank lines
  Input: edt-ft5x06 - fix indentation
  Input: tsc2007 - enable cansleep pendown GPIO
  Input: Add KUnit tests for some of the input core helper functions
  ...
2023-05-01 17:18:56 -07:00
Rob Herring 908ce5c0e7 ARM: pxa: Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-14 14:58:41 +02:00
Uwe Kleine-König 74a5b94b62
ARM: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shawn Guo <shawnguo@kernel.org> # for imx/mmdc
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230314103225.2787101-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-03-17 16:03:57 +01:00
Dmitry Torokhov d26a3a6ce7 Linux 6.3-rc2
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmQOYgweHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGHmIH/0DnvYzU4ppJec1s
 s94ZbQ2TCKooWYsm9zqSU7TbwQkeLy2c43xx06ooItpMc8TCUDa+W+rmsUzPllxe
 7zyx5DjxxRUL2+Y16fzk2+Y8vBUaqorjJv6F7V3muE7TKGdD7w1cbB+LcvylVUXB
 iBZFWqNOrB0R4gVo4saXaX34uyrPuRXOpNGO/Yem/rI/xZPAC8O2fNA+YlAYCzDI
 uJl4PXBx8zIokVY33fe4psski6ekeczIvjmsmSH75MSrJB5sGqT1+dQOme6PWj3R
 gMzEgbPF/gk32VuojUE9mdE9C4hR2qULcz6GErQL4WqoKGh0Ck3mR7uRnGWSfNSG
 kR1Kl7I=
 =Hz45
 -----END PGP SIGNATURE-----

Merge tag 'v6.3-rc2' into next

Merge with mainline to get of_property_present() and other newer APIs.
2023-03-17 04:01:30 -07:00
Dmitry Torokhov 9e03024ce2 ARM: spitz: include header defining input event codes
The board file for Sharp SL-Cxx00 Series of PDAs uses various KEY_*
defines, but does not include the relevant header directly and instead
relies on other headers to include it indirectly. With the upcoming
cleanup of matrix_keypad.h this indirection is now broken and we should
include the relevant header directly.

Reported: Guenter Roeck <linux@roeck-us.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/Y/U+3PZsbLw++SnG@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-02-23 22:12:47 -08:00
Arnd Bergmann e5b832386f ARM: pxa: restore mfp-pxa320.h
This file was removed in an earlier commit but is actually still
needed, so restore it.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: d6df7df7ae ("ARM: pxa: remove unused board files")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-08 22:10:39 +01:00
Arnd Bergmann ce79f3a1ad ARM: pxa: prune unused device support
pxa3xx is now DT-only, and the remaining pxa2xx board files
only use a subset of the possible devices, so remove all
definitions that are not referenced any more.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-20 11:24:08 +01:00
Arnd Bergmann 8ca79aaad8 ARM: pxa: remove unused pxa3xx-ulpi
This was only used by the cm-x300 board, which is now gone.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-20 11:24:04 +01:00
Arnd Bergmann 0ddc052416 ARM: pxa: remove irda leftover
irda support was removed a long time ago, so stop
registering the devices from the pxa machine.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-20 11:24:00 +01:00
Arnd Bergmann d711b8a298 ARM: pxa: remove pxa93x support
There is currently no devicetree support for pxa930 or pxa935
SoCs, and no board files remain. As it seems unlikely that anyone
is going to add DT support soon, let's drop the SoC specific code
now.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-20 11:23:56 +01:00
Arnd Bergmann d6df7df7ae ARM: pxa: remove unused board files
The majority of all pxa board files has not been touched in a long time,
and no users have spoken up in favor of keeping them around. This leaves
only support for the platforms that were already converted to DT, as
well as the gumstix and spitz/akita/borzoi machines that work in qemu
and can still be converted to DT later.

Cc: Ales Bardorfer <ales@i-tech.si>
Cc: Ales Snuparek <snuparek@atlas.cz>
Cc: Alex Osborne <ato@meshy.org>
Cc: Alex Osborne <bobofdoom@gmail.com>
Cc: Dirk Opfer <dirk@opfer-online.de>
Cc: Ian Molton <spyro@f2s.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Michael Petchkovsky <mkpetch@internode.on.net>
Cc: Nick Bane <nick@cecomputing.co.uk>
Cc: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Tomas Cech <sleep_walker@suse.cz>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-20 11:23:44 +01:00
Arnd Bergmann cd2d0d45a3 ARM: pxa: enable PXA310/PXA320 for DT-only build
After commit b5aaaa666a ("ARM: pxa: add Kconfig dependencies for
ATAGS based boards"), the default PXA build no longer includes support
for the board files that are considered unused.

As a side-effect of this, the PXA310 and PXA320 support is not built
into the kernel any more, even though it should work in principle as
long as the symbols are enabled. As Robert points out, there are dts
files for zylonite and cm-x300, though those have not made it into the
mainline kernel.

Link: https://lore.kernel.org/linux-arm-kernel/m2sfglh02h.fsf@free.fr/
Reported-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-09 17:00:13 +01:00
Arnd Bergmann 4b88615950
ARM: pxa: fix building with clang
The integrated assembler in clang does not understand the xscale
specific mra/mar instructions:

arch/arm/mach-pxa/pxa27x.c:136:15: error: unsupported architectural extension: xscale
        asm volatile(".arch_extension xscale\n\t"
arch/arm/mach-pxa/pxa27x.c:136:40: error: invalid instruction, did you mean: mcr, mla, mrc, mrs, msr?
        mra r2, r3, acc0

Since these are coprocessor features, the same can be expressed using
mrrc/mcrr, so use that for builds with IAS.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20221215162529.3659187-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-12-19 16:46:32 +01:00
Linus Torvalds 613b2a82f2 - Core Frameworks
- Change maintainer email address
    - Use acpi_dev_for_each_child() helper to walk the ACPI list
 
  - New Device Support
    - Add support for BCM2711 RPiVid ASB to Broadcom BCM2835
    - Add support for MT8195 dual-core RISC-V MCU to Chrome OS Embedded Controller
    - Add support for Regulator, RTC and Keys to MediaTek MT6357 PMIC
    - Add support for GPIO to X-Powers AXP20x PMIC
    - Add support for MT6331 and MT6332 to MediaTek MT6357 PMIC
    - Add support for Intel Meteor Lake-P PCI to Intel LPSS PCI
 
  - New Functionality
    - Add support for non-ACPI platforms; lpc_ich
 
  - Fix-ups
    - Use platform data instead of hard-coded values; bcm2835-pm
    - Make use of BIT/GENMASK macros; intel_soc_pmic_bxtwc
    - Use dev_err_probe() helper; intel_soc_pmic_chtwc, intel_soc_pmic_bxtwc
    - Use provided generic APIs / helpers; lpc_ich
    - Clean-up .remove() return values; asic3, t7l66xb, tc6387xb, tc6393xb
    - Use correct formatting specifiers; syscon
    - Replace sprintf() with sysfs_emit(); intel_soc_pmic_bxtwc
    - Automatically detect and fill USB endpoint pointers; dln2
    - Use more appropriate dev/platform/spi resources APIs; intel_soc_pmic_bxtwc
    - Make use of pm_sleep_ptr(); intel_soc_pmic_chtwc, intel_soc_pmic_bxtwc
    - Improve error handling; intel_soc_pmic_bxtwc
    - Use core driver API to create groups; intel_soc_pmic_bxtwc
    - Kconfig fix-ups; MFD_SUN6I_PRCM
    - Admin: whitespace/email addresses/etc; max77714, db8500-prcmu, ipaq-micro,
 			intel_soc_pmic_bxtwc
    - Remove duplicate/unused code/functionality; lpc_ich, twl-core, qcom-pm8008,
 			intel_soc_pmic_bxtwc
    - DT fix-ups / conversions; da9063, ti,j721e-system-controller, st,stm32-timers,
 			mt6397, qcom,tcsr, mps,mp2629, qcom-pm8xxx, fsl,imx8qxp-csr
 
  - Bug Fixes
    - Fix of_node reference leak; max77620
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmLs4QIACgkQUa+KL4f8
 d2ECNg/5ARW0sMXUV3lkSGZUSo3NnypXGwxvhpuAKV/Lyt0A05Oe5DBTkM7VsMha
 NNVuAPRKLrLFORd4t5D1C+jOjoekjxFhJyXhnTjcnEtyxouh+SxcFOBDbf6+aIwB
 1oPgQNiryRzrBnQWAscQJ1I/ADlMQnRCsWKTBN4JohqwLpQqiwjLDUpkwKOKqgbP
 Z53WOeB1lBctaoplyK07J3poJ1weURip+FT5KXDbeIsARtoNPFRLPzgkhLCdCEcd
 5lLxA9r7Flcooet0BduWwH85g85TakRKymhfSwMWzefruZLsNTIX9/I8zUwg27Mj
 PjDcZP91Q1DssETWBmfoYNqn8wl9+2RjCj1tCZVOzAIreRQpUCoQsXMO9NzaJfVr
 leg6NcuzsPRrjDIzJ/IyYgVpq2O5KfOhIO02+d7eU/JlAblE8kTZRSuX/BkCuc6L
 gcZ1D1hO325umJgeB63ZkwNzjTPQDgXm+cHH9uNX52shJCe+4l94pJEVM6L636EN
 B2ZOsx7+AJKn/aNdGfVoQ5qbOW4d5QTZudqFfkDvJzhGGjQugn3TxmcCueejYBMW
 9qCsV0eXmwe/uvSns+TAWRbSLaWxvMnx2GDyp9z1EH7vJMAFKnhapXhuv5KLLZmK
 lAEYizDMgZpAEZ5AaBgq8zEnFJGwXGPP6ubii6xCPH8XOcRkkwQ=
 =zP1M
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "Core Framework:
   - Change maintainer email address
   - Use acpi_dev_for_each_child() helper to walk the ACPI list

  New Device Support:
   - BCM2711 RPiVid ASB in Broadcom BCM2835
   - MT8195 dual-core RISC-V MCU in Chrome OS Embedded Controller
   - Regulator, RTC and Keys in MediaTek MT6357 PMIC
   - GPIO in X-Powers AXP20x PMIC
   - MT6331 and MT6332 in MediaTek MT6357 PMIC
   - Intel Meteor Lake-P PCI in Intel LPSS PCI

  New Functionality:
   - Add support for non-ACPI platforms; lpc_ich

  Fix-ups:
   - Use platform data instead of hard-coded values; bcm2835-pm
   - Make use of BIT/GENMASK macros; intel_soc_pmic_bxtwc
   - Use dev_err_probe() helper; intel_soc_pmic_chtwc,
     intel_soc_pmic_bxtwc
   - Use provided generic APIs / helpers; lpc_ich
   - Clean-up .remove() return values; asic3, t7l66xb, tc6387xb,
     tc6393xb
   - Use correct formatting specifiers; syscon
   - Replace sprintf() with sysfs_emit(); intel_soc_pmic_bxtwc
   - Automatically detect and fill USB endpoint pointers; dln2
   - Use more appropriate dev/platform/spi resources APIs;
     intel_soc_pmic_bxtwc
   - Make use of pm_sleep_ptr(); intel_soc_pmic_chtwc,
     intel_soc_pmic_bxtwc
   - Improve error handling; intel_soc_pmic_bxtwc
   - Use core driver API to create groups; intel_soc_pmic_bxtwc
   - Kconfig fix-ups; MFD_SUN6I_PRCM
   - Admin: whitespace/email addresses/etc; max77714, db8500-prcmu,
     ipaq-micro, intel_soc_pmic_bxtwc
   - Remove duplicate/unused code/functionality; lpc_ich, twl-core,
     qcom-pm8008, intel_soc_pmic_bxtwc
   - DT fix-ups / conversions; da9063, ti,j721e-system-controller,
     st,stm32-timers, mt6397, qcom,tcsr, mps,mp2629, qcom-pm8xxx,
     fsl,imx8qxp-csr

  Bug Fixes:
   - Fix of_node reference leak; max77620"

* tag 'mfd-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (49 commits)
  dt-bindings: mfd: stm32-timers: Move fixed string node names under 'properties'
  dt-bindings: mfd: st,stm32-timers: Correct 'resets' property name
  dt-bindings: mfd: syscon: Update Lee Jones' email address
  MAINTAINERS: Use Lee Jones' kernel.org address for Syscon submissions
  MAINTAINERS: Use Lee Jones' kernel.org address for MFD submissions
  mfd: sun6i-prcm: Update Kconfig description
  mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment
  mfd: intel_soc_pmic_bxtwc: Drop unneeded casting
  mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf()
  mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks
  mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR()
  mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
  mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device
  mfd: intel_soc_pmic_bxtwc: Use dev_err_probe()
  mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata()
  mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility
  mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
  mfd: intel-lpss: Add Intel Meteor Lake-P PCI IDs
  mfd: mt6397: Add basic support for MT6331+MT6332 PMIC
  mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  ...
2022-08-06 10:25:16 -07:00
Linus Torvalds c1c76700a0 SPDX changes for 6.0-rc1
Here is the set of SPDX comment updates for 6.0-rc1.
 
 Nothing huge here, just a number of updated SPDX license tags and
 cleanups based on the review of a number of common patterns in GPLv2
 boilerplate text.  Also included in here are a few other minor updates,
 2 USB files, and one Documentation file update to get the SPDX lines
 correct.
 
 All of these have been in the linux-next tree for a very long time.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYupz3g8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynPUgCgslaf2ssCgW5IeuXbhla+ZBRAzisAnjVgOvLN
 4AKdqbiBNlFbCroQwmeQ
 =v1sg
 -----END PGP SIGNATURE-----

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

Pull SPDX updates from Greg KH:
 "Here is the set of SPDX comment updates for 6.0-rc1.

  Nothing huge here, just a number of updated SPDX license tags and
  cleanups based on the review of a number of common patterns in GPLv2
  boilerplate text.

  Also included in here are a few other minor updates, two USB files,
  and one Documentation file update to get the SPDX lines correct.

  All of these have been in the linux-next tree for a very long time"

* tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (28 commits)
  Documentation: samsung-s3c24xx: Add blank line after SPDX directive
  x86/crypto: Remove stray comment terminator
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_406.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_398.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_391.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_319.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_298.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_179.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2)
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1)
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_160.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_152.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_147.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_133.RULE
  ...
2022-08-04 12:12:54 -07:00
Linus Torvalds 7d0d3fa733 ARM: boardfile deprecation for 6.0
Over the past ten years, new machine support was based on device tree,
 and an initial set of about 400 boards using ATAGS with boardfile
 for booting were grandfathered in, with about half of them either
 removed or converted to DT over time.
 
 Based on the recent mailing list discussion I started, I have now
 turned the findings into a set of patches that marks most board files as
 'depends on UNUSED_BOARD_FILES', leaving only 38 of the 196 boards.
 
 For the boards that are marked as unused, there are two final chances
 for potential users: The removal is scheduled to take place after the
 longterm stable kernel at the end of 2022, so users can stay on that
 version for another few years, and if anyone still has one of these
 machines and is planning to keep updating kernels beyond that version,
 they can speak up now to have their boards taken off the list again.
 
 Waiting for the LTS release also makes sure that there will be at
 least one longterm kernel that contains the recent multiplatform
 conversion along while still supporting all legacy boards.
 
 The short summary of the current status is:
 
  - The s3c24xx, cns3xxx, iop32x and mv78xx0 platforms have no known
    users and will be removed entirely.
 
  - The mmp and davinci platforms have DT support for the important
    machines and will become DT-only after this.
 
  - s3c64xx, dove, orion5x, and pxa keep some board files to allow
    those to be migrated over to DT more easily, but most board files
    are getting removed now. DT support on these platforms is partially
    working but requires changes to additional drivers for the other
    boards.
 
  - omap1, ep93xx, sa1100, footbridge and rpc have no DT support at
    the moment but have some boards with known users. Removing the board
    files that nobody uses should make it easier to try a DT conversion
    if anyone cares.
 
 There is no explicit timeline what happens with the boards that remain
 after this removal, but I expect to revisit this in the future, and
 with most boards gone, there will be a good time to do a treewide
 review of platform drivers that never gained DT support and have no
 remaining in-tree board files.
 
 Link: https://lore.kernel.org/linux-arm-kernel/CAK8P3a0Z9vGEQbVRBo84bSyPFM-LF+hs5w8ZA51g2Z+NsdtDQA@mail.gmail.com/
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLo+30ACgkQmmx57+YA
 GNnibw//anM6PmfEX9Oeh2sJb7B7scUOMYrhUiw7e//pJ3kD68thviWwkMC0O8x6
 05bjFscnCo+AXuZ6TKChFHDrZxJXdJzEpFmGaKVu9LAZjVBGjWaXVeI5xiTGn01b
 Og9tqPsRqHFfeo3MzrubVUmOv/lbceXoqrep7i+MHfYvmAMWwfGg54JChmABvYSZ
 6si4NNLj1U+Eav0uj9Ge2ucBfzN6z1nJeo6I68GXTuAjZcrtlgAEcgTK0X6yMnTF
 Sv3TzX/B3QG7t0Jib+PSYrDDVxqMJM+e+m8d/qyHFW5am/9ML/fSn2OyPYigfs1+
 0/dgh0+Qu6GG+Xjr+wx5DY7EE/uM9AqvdJiKhGWPfGv++K5H2r/wMeIvbmXlzlrr
 JRWpKXUHCPdcGKyouJlDOiT3XfBU7X1gfMUK6Os/WYLxLgPo+9+syQtJBMA2PtnJ
 USlS31vLJbitInDgj9DWtXagBvDvzaUdW9NBwHtE2I3FqsvSZXCqvTpNgkmX7a1v
 qYJuoMHeppFP6Ylq4Lcu+5DHR9rDfG4z35BC7KWC/7EIkzOapqtYjuzwZg5N5HM2
 NOm7gLigOmQl4Jue+2ziUGllo6knPNZdcnRZXUWt+pF77smQS+BSGXAm4xjuwn6B
 lPD8CQUN83QZdZtVkkvrC9rDGp3ZJCkII9XzvSBf/Cl+C+6ejqY=
 =wd/l
 -----END PGP SIGNATURE-----

Merge tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM boardfile deprecation from Arnd Bergmann:
 "Over the past ten years, new machine support was based on device tree,
  and an initial set of about 400 boards using ATAGS with boardfile for
  booting were grandfathered in, with about half of them either removed
  or converted to DT over time.

  Based on the recent mailing list discussion I started, I have now
  turned the findings into a set of patches that marks most board files
  as 'depends on UNUSED_BOARD_FILES', leaving only 38 of the 196 boards.

  For the boards that are marked as unused, there are two final chances
  for potential users: The removal is scheduled to take place after the
  longterm stable kernel at the end of 2022, so users can stay on that
  version for another few years, and if anyone still has one of these
  machines and is planning to keep updating kernels beyond that version,
  they can speak up now to have their boards taken off the list again.

  Waiting for the LTS release also makes sure that there will be at
  least one longterm kernel that contains the recent multiplatform
  conversion along while still supporting all legacy boards.

  The short summary of the current status is:

   - The s3c24xx, cns3xxx, iop32x and mv78xx0 platforms have no known
     users and will be removed entirely.

   - The mmp and davinci platforms have DT support for the important
     machines and will become DT-only after this.

   - s3c64xx, dove, orion5x, and pxa keep some board files to allow
     those to be migrated over to DT more easily, but most board files
     are getting removed now. DT support on these platforms is partially
     working but requires changes to additional drivers for the other
     boards.

   - omap1, ep93xx, sa1100, footbridge and rpc have no DT support at the
     moment but have some boards with known users. Removing the board
     files that nobody uses should make it easier to try a DT conversion
     if anyone cares.

  There is no explicit timeline what happens with the boards that remain
  after this removal, but I expect to revisit this in the future, and
  with most boards gone, there will be a good time to do a treewide
  review of platform drivers that never gained DT support and have no
  remaining in-tree board files"

Link: https://lore.kernel.org/linux-arm-kernel/CAK8P3a0Z9vGEQbVRBo84bSyPFM-LF+hs5w8ZA51g2Z+NsdtDQA@mail.gmail.com/

* tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  ARM: cns3xxx: add CONFIG_UNUSED_BOARD_FILES dependency
  ARM: iop32x: mark as unused
  ARM: s3c: mark most board files as unused
  ARM: omap1: add Kconfig dependencies for unused boards
  ARM: sa1100: mark most boards as unused
  ARM: footbridge: mark cats board for removal
  ARM: mmp: mark all board files for removal
  ARM: ep93xx: mark most board files as unused
  ARM: davinci: mark all ATAGS board files as unused
  ARM: orion: add ATAGS dependencies
  ARM: pxa: add Kconfig dependencies for ATAGS based boards
  ARM: add CONFIG_UNUSED_BOARD_FILES
  ARM: add ATAGS dependencies to non-DT platforms
2022-08-02 08:35:17 -07:00
Linus Walleij c5cdb92869
ARM: pxa2xx: Fix GPIO descriptor tables
Laurence reports:

"Kernel >5.18 on Zaurus has a bug where the power management code can't
talk to devices, emitting the following errors:

sharpsl-pm sharpsl-pm: Error: AC check failed: voltage -22.
sharpsl-pm sharpsl-pm: Charging Error!
sharpsl-pm sharpsl-pm: Warning: Cannot read main battery!

Looking at the recent changes, I found that commit 31455bbda2 ("spi:
pxa2xx_spi: Convert to use GPIO descriptors") replaced the deprecated
SPI chip select platform device code with a gpiod lookup table. However,
this didn't seem to work until I changed the `dev_id` member from the
device name to the bus id. I'm not entirely sure why this is necessary,
but I suspect it is related to the fact that in sysfs SPI devices are
attached under /sys/devices/.../dev_name/spi_master/spiB/spiB.C, rather
than directly to the device."

After reviewing the change I conclude that the same fix is needed
for all affected boards.

Fixes: 31455bbda2 ("spi: pxa2xx_spi: Convert to use GPIO descriptors")
Reported-by: Laurence de Bruxelles <lfdebrux@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220722114611.1517414-1-linus.walleij@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-22 15:03:08 +02:00
Arnd Bergmann b5aaaa666a ARM: pxa: add Kconfig dependencies for ATAGS based boards
Most of the traditional board files are no longer used by anyone and
will be removed next year, while the DT based machine support remains.

Adding a CONFIG_ATAGS dependency around all the board files means
that they now actaully get disabled when ATAGS support is left out,
and the individual boards that have no known users are marked
as depending on CONFIG_UNUSED_BOARD_FILES, with the plan to remove
them in early 2023 unless someone else shows interest.

Laurence de Bruxelles intends to work on converting the Spitz/Akita/Borzoi
family of Sharp Zaurus SL machines to DT, to make that easier those
remain for the moment.

In addition, the "Gumstix" machine is the one that is supported in
qemu with 256MB of RAM, which makes it particularly nice for testing,
I'm leaving it in hoping that someone can take care of converting it to
DT as well.

Finally, Marc Zyngier is still able to test the Zeus and Viper machines,
so these could be saved as well if anyone wants to conver them to DT.
This seems less likely, so I'm marking them as unused for the time being.

For the defconfig files, both the pxa3xx_defconfig and pxa_defconfig
now only enable the boards that are not marked as unused, while all the
other ones explicitly enable CONFIG_UNUSED_BOARD_FILES to still allow
building the kernels.

Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Laurence de Bruxelles <lfdebrux@gmail.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-22 13:11:21 +02:00
Uwe Kleine-König c55333064d mfd: tc6393xb: Make disable callback return void
All implementations return 0, so simplify accordingly.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220619082655.53728-1-u.kleine-koenig@pengutronix.de
2022-07-19 10:54:40 +01:00
Uwe Kleine-König 6e1f1b1c93 mfd: tc6387xb: Drop disable callback that is never called
The driver never calls the disable callback, so drop the member from
the platform struct and all callbacks from the actual platform datas.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220530192430.2108217-4-u.kleine-koenig@pengutronix.de
2022-07-19 10:54:38 +01:00
Thomas Gleixner 0fdebc5ec2 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1)
Based on the normalized pattern:

    this file is licensed under the terms of the gnu general public
    license version 2 this program is licensed as is without any warranty
    of any kind whether express or implied

extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

has been chosen to replace the boilerplate/reference.

Reviewed-by: Allison Randal <allison@lohutok.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10 14:51:35 +02:00
Linus Torvalds 96479c0980 ARM: multiplatform changes, part 2
The second part of the multiplatform changes now converts the
 Intel/Marvell PXA platform along with the rest. The patches went through
 several rebases before the merge window as bugs were found, so they
 remained separate.
 
 This has to touch a lot of drivers, in particular the touchscreen,
 pcmcia, sound and clk bits, to detach the driver files from the
 platform and board specific header files.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmKZKqsACgkQmmx57+YA
 GNnO/w//dgJBlkmoIIKlG2eJsvoUKwDt7MuLEMCqSqYYUSvMENFwKK66INMDIJ3l
 PmKf94JadlpBm2OB2vzW+D1EtaLGX9eXZkKD+vyB1I1yFkKdzEPcAfitfrRwe58E
 pR4nQd/jVL4UCY+pp442O1q9VvMpMV9P4ILJGPS/PpsD5CT9Gn8m9svIIuNuDRFd
 nwpyZC3l32jVLo9iuLmwZUvxtOWI3hTqZrnxhByBhlvtnGexRsq/VhfubK2uzBi1
 CyWHjqzOSmseGmsUDwv9LFqVV9YRCeisS3IElA5L0VgM0XvHKA+f9qyF7V6zI20g
 y9LtqhdAtiTpE/aUrOW2LDYaM/bc7RilYZrWchoZbCEsHhV4C+ld3QoTyxvGscvG
 tbznhvZKdUNX8LHS0J9NqIj1q1YGN5ei5r/C5R8DBj1q8VcTVnq3dms8xzVTd35o
 xS5BbLFliiI96jc7S6LaQizXheYjAfdPhmXUAxNXvWIVQ6SXnf8/U/RB9Zzjb8hm
 FH2Gu8m/Dh2MHKBBRWSVw8VahV0V7WiEaWeYuwwTbW1wUrsWiizVaPnqrt6Cq9DW
 oJZgBvktWEXUQz73qrnvwo9GjcKqAxaWKWq05hHKHKuLGezsPAyIhIKr51V2xqqw
 cp2OIMCsN5GYENOhHvt6BMRAI5iA4VyFDtWAqw9B6EIwno6N7Z4=
 =cnSb
 -----END PGP SIGNATURE-----

Merge tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull more ARM multiplatform updates from Arnd Bergmann:
 "The second part of the multiplatform changes now converts the
  Intel/Marvell PXA platform along with the rest. The patches went
  through several rebases before the merge window as bugs were found, so
  they remained separate.

  This has to touch a lot of drivers, in particular the touchscreen,
  pcmcia, sound and clk bits, to detach the driver files from the
  platform and board specific header files"

* tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (48 commits)
  ARM: pxa/mmp: remove traces of plat-pxa
  ARM: pxa: convert to multiplatform
  ARM: pxa/sa1100: move I/O space to PCI_IOBASE
  ARM: pxa: remove support for MTD_XIP
  ARM: pxa: move mach/*.h to mach-pxa/
  ARM: PXA: fix multi-cpu build of xsc3
  ARM: pxa: move plat-pxa to drivers/soc/
  ARM: mmp: rename pxa_register_device
  ARM: mmp: remove tavorevb board support
  ARM: pxa: remove unused mach/bitfield.h
  ARM: pxa: move clk register definitions to driver
  ARM: pxa: move smemc register access from clk to platform
  cpufreq: pxa3: move clk register access to clk driver
  ARM: pxa: remove get_clk_frequency_khz()
  ARM: pxa: pcmcia: move smemc configuration back to arch
  ASoC: pxa: i2s: use normal MMIO accessors
  ASoC: pxa: ac97: use normal MMIO accessors
  ASoC: pxa: use pdev resource for FIFO regs
  Input: wm97xx - get rid of irq_enable method in wm97xx_mach_ops
  Input: wm97xx - switch to using threaded IRQ
  ...
2022-06-02 15:23:54 -07:00
Arnd Bergmann 250c1a694f ARM: pxa: convert to multiplatform
PXA is now ready to be built into a single kernel with all the
other ARMv5 platforms, so change the Kconfig bit to finish it
off. The mach/uncompress.h support is the last bit that goes away,
getting replaced with the normal DEBUG_LL based approach.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:56:17 +02:00
Arnd Bergmann 645b302673 ARM: pxa/sa1100: move I/O space to PCI_IOBASE
PXA and StrongARM1100 traditionally map their I/O space 1:1 into virtual
memory, using a per-bus io_offset that matches the base address of the
ioremap mapping.

In order for PXA to work in a multiplatform config, this needs to
change so I/O space starts at PCI_IOBASE (0xfee00000). Since the pcmcia
soc_common support is shared with StrongARM1100, both have to change at
the same time. The affected machines are:

 - Anything with a PCMCIA slot now uses pci_remap_iospace, which
   is made available to PCMCIA configurations as well, rather than
   just PCI. The first PCMCIA slot now starts at port number 0x10000.

 - The Zeus and Viper platforms have PC/104-style ISA buses,
   which have a static mapping for both I/O and memory space at
   0xf1000000, which can no longer work. It does not appear to have
   any in-tree users, so moving it to port number 0 makes them
   behave like a traditional PC.

 - SA1100 does support ISA slots in theory, but all machines that
   originally enabled this appear to have been removed from the tree
   ages ago, and the I/O space is never mapped anywhere.

 - The Nanoengine machine has support for PCI slots, but looks
   like this never included I/O space, the resources only define the
   location for memory and config space.

With this, the definitions of __io() and IO_SPACE_LIMIT can be simplified,
as the only remaining cases are the generic PCI_IOBASE and the custom
inb()/outb() macros on RiscPC.  S3C24xx still has a custom inb()/outb()
in this here, but this is already removed in another branch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:56:17 +02:00
Arnd Bergmann 5414bea9a4 ARM: pxa: remove support for MTD_XIP
Using MTD-XIP does not work on multiplatform kernels because
it requires SoC specific register accesses to be done from
low-level flash handling functions in RAM while the rest of the
kernel sits in flash.

I found no evidence of anyone still actually using this feature,
so remove it from PXA to avoid spending a lot of time on
actually making it work.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:56:17 +02:00
Arnd Bergmann e6acc4062c ARM: pxa: move mach/*.h to mach-pxa/
None of the headers are included from outside of the mach-pxa
directory, so move them all in there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:56:17 +02:00
Arnd Bergmann 64dbc4dd7a ARM: pxa: move plat-pxa to drivers/soc/
There are two drivers in arch/arm/plat-pxa: mfp and ssp. Both
of them should ideally not be needed at all, as there are
proper subsystems to replace them.

OTOH, they are self-contained and can simply be normal
SoC drivers, so move them over there to eliminate one more
of the plat-* directories.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> (mach-pxa)
Acked-by: Lubomir Rintel <lkundrak@v3.sk> (mach-mmp)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:56:16 +02:00
Arnd Bergmann b72232b420 ARM: pxa: remove unused mach/bitfield.h
The sa1111.h header defines some constants using the bitfield
macros, but those are only used on sa1100, not on pxa, and the
users include the bitfield header through mach/hardware.h.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:56:16 +02:00
Arnd Bergmann 3c816d950a ARM: pxa: move clk register definitions to driver
The clock register definitions are now used (almost) exclusively in the
clk driver, and that relies on no other mach/*.h header files any more.

Remove the dependency on mach/pxa*-regs.h by addressing the registers
as offsets from a void __iomem * pointer, which is either passed from
a board file, or (for the moment) ioremapped at boot time from a hardcoded
address in case of DT (this should be moved into the DT of course).

Cc: linux-clk@vger.kernel.org
Acked-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:55:49 +02:00
Arnd Bergmann fd13f8117f ARM: pxa: move smemc register access from clk to platform
The get_sdram_rows() and get_memclkdiv() helpers need smemc
register that are separate from the clk registers, move
them out of the clk driver, and use an extern declaration
instead.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Link: https://lore.kernel.org/lkml/87pnielzo4.fsf@belgarion.home/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:55:49 +02:00
Arnd Bergmann 5c6603e741 cpufreq: pxa3: move clk register access to clk driver
The driver needs some low-level register access for setting
the core and bus frequencies. These registers are owned
by the clk driver, so move the low-level access into that
driver with a slightly higher-level interface and avoid
any machine header file dependencies.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:55:49 +02:00
Arnd Bergmann e0a3596eb8 ARM: pxa: remove get_clk_frequency_khz()
get_clk_frequency_khz() is not a proper name for a global function,
and there is only one caller.

Convert viper to use the properly namespaced
pxa25x_get_clk_frequency_khz() and remove the other references.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:55:49 +02:00
Arnd Bergmann 6a946f1bd5 ARM: pxa: pcmcia: move smemc configuration back to arch
Rather than poking at the smemc registers directly from the
pcmcia/pxa2xx_base driver, move those bits into machine file
to have a cleaner interface.

Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Link: https://lore.kernel.org/lkml/87d0egjzxk.fsf@belgarion.home/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:55:49 +02:00