summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2025-05-21can: rcar_canfd: Add max_cftml variable to struct rcar_canfd_hw_infoBiju Das
R-Car Gen3 has CFTML max positional value is 15 whereas on R-Car Gen4 it is 31. Add a max_cftml variable to struct rcar_canfd_hw_info to handle this difference. While at it, rename the parameter x->cftml in RCANFD_CFCC_CFTML macro to make it clear. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-12-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21can: rcar_canfd: Add max_aflpn variable to struct rcar_canfd_hw_infoBiju Das
R-Car Gen3 has maximum acceptance filter list page number of 31 whereas on R-Car Gen4 it is 127. Add max_aflpn variable to struct rcar_canfd_hw_info in order to support RZ/G3E that has max AFLPN of 63. While at it, rename the parameter x->page_num in RCANFD_GAFLECTR_AFLPN macro to make it clear. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-11-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21can: rcar_canfd: Add rnc_field_width variable to struct rcar_canfd_hw_infoBiju Das
The shift and w value in rcar_canfd_setrnc() are dictated by the field width: - R-Car Gen4 packs 2 values in a 32-bit word, using a field width of 16 bits, - R-Car Gen3 packs up to 4 values in a 32-bit word, using a field width of 8 bits. Add rnc_field_width variable to struct rcar_canfd_hw_info to handle this difference. The rnc_stride is 32 / rnc_field_width and the index parameter w is calculated by ch / rnc_stride. The shift value in rcar_canfd_setrnc() is computed by using (32 - (ch % rnc_stride + 1) * rnc_field_width). Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-10-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21can: rcar_canfd: Update RCANFD_GAFLCFG macroBiju Das
Update RCANFD_GAFLCFG macro by replacing the parameter ch->w, where w is the GAFLCFG index used in the hardware manual. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-9-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21can: rcar_canfd: Add rcar_canfd_setrnc()Biju Das
Add rcar_canfd_setrnc() to replace the macro RCANFD_GAFLCFG_SETRNC. While at it, replace int->unsigned int for local variables offset, page and num_rules in rcar_canfd_configure_afl_rules(). Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-8-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21can: rcar_canfd: Drop the mask operation in RCANFD_GAFLCFG_SETRNC macroBiju Das
Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro as the num_rules can never be larger than number of supported rules. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-7-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21can: rcar_canfd: Update RCANFD_GERFL_ERR macroBiju Das
Replace the macro RCANFD_GERFL_EEF0_7->RCANFD_GERFL_EEF. The macros RCANFD_GERFL_EEF* in RCANFD_GERFL_ERR can be replaced by FIELD_PREP() and drop the redundant macro RCANFD_GERFL_EEF(ch). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20250417054320.14100-6-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21can: rcar_canfd: Drop RCANFD_GAFLCFG_GETRNC macroBiju Das
Drop the unused macro RCANFD_GAFLCFG_GETRNC. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-5-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21can: rcar_canfd: Use of_get_available_child_by_name()Biju Das
Simplify rcar_canfd_probe() using of_get_available_child_by_name(). While at it, move of_node_put(child) inside the if block to avoid additional check if of_child is NULL. Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-4-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21nvmem: Add apple-spmi-nvmem driverHector Martin
Add a driver for a series of SPMI-attached PMICs present on Apple devices Reviewed-by: Neal Gompa <neal@gompa.dev> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: Hector Martin <marcan@marcan.st> Co-developed-by: Sasha Finkelstein <fnkl.kernel@gmail.com> Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://lore.kernel.org/r/20250509122452.11827-4-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21nvmem: Remove unused nvmem cell table supportGeert Uytterhoeven
Board files are deprecated by DT, and the last user of nvmem_add_cell_table() was removed by commit 2af4fcc0d3574482 ("ARM: davinci: remove unused board support") in v6.3. Hence remove all support for nvmem cell tables, and update the documentation. Device drivers can still register a single cell using nvmem_add_one_cell() (which was not documented before). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://lore.kernel.org/r/20250509122452.11827-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21nvmem: zynqmp_nvmem: unbreak driver after cleanupPeter Korsgaard
Commit 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") changed the driver to expect the device pointer to be passed as the "context", but in nvmem the context parameter comes from nvmem_config.priv which is never set - Leading to null pointer exceptions when the device is accessed. Fixes: 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") Cc: stable <stable@kernel.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Tested-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://lore.kernel.org/r/20250509122407.11763-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21nvmem: rmem: select CONFIG_CRC32Arnd Bergmann
The newly added crc checking leads to a link failure if CRC32 itself is disabled: x86_64-linux-ld: vmlinux.o: in function `rmem_eyeq5_checksum': rmem.c:(.text+0x52341b): undefined reference to `crc32_le_arch' Fixes: 7e606c311f70 ("nvmem: rmem: add CRC validation for Mobileye EyeQ5 NVMEM") Cc: stable <stable@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://lore.kernel.org/r/20250509122407.11763-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21Merge tag 'iio-fixes-for-6.15b' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO: 2nd set of fixes for 6.15 (or 6.16 merge window) Usual mixed bag. adi,ad4851 - Avoid a buffer overrun due to bug in pointer arithmetic. adi,ad7173 - Fix compiling if gpiolib is not enabled adi,ad7606 - Fix raw reads for 18-bit chips by ensuring we mask out upper bits as some SPI controllers do not do so for 18bit words. - Fix wrong masking for register writes. adi,ad7944 - Mask high bits for raw reads. adi,axi-adc - Add check on whether the busy flag has cleared before first access. invensense,icm42600 - Fix the temperature offset to take scale into account. nxp,fxls8962af - Fix temperature to be in milli degrees Celsius not degrees. - Fix sign of temperature channel. * tag 'iio-fixes-for-6.15b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: accel: fxls8962af: Fix temperature scan element sign iio: accel: fxls8962af: Fix temperature calculation iio: adc: ad7944: mask high bits on direct read iio: adc: ad4851: fix ad4858 chan pointer handling iio: imu: inv_icm42600: Fix temperature calculation iio: dac: adi-axi-dac: fix bus read iio: adc: ad7606_spi: fix reg write value mask iio: adc: ad7606: fix raw read for 18-bit chips iio: adc: ad7173: fix compiling without gpiolib
2025-05-21w1: Avoid -Wflex-array-member-not-at-end warningsGustavo A. R. Silva
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for on-stack definitions of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warnings: drivers/w1/w1_netlink.c:198:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/w1/w1_netlink.c:219:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Reviewed-by: Kees Cook <kees@kernel.org> Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org> Link: https://lore.kernel.org/r/Z_RflBe5iDGTMFjV@kspp Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250513105326.27385-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21Merge tag 'mux-drv-6.16' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into char-misc-next Krzysztof writes: Mux drivers for v6.16 Few cleanups and fixes for the mux drivers: 1. Simplify with spi_get_device_match_data(). 2. Fix -Wunused-const-variable and -Wvoid-pointer-to-enum-cast warnings. 3. GPIO mux: add optional regulator for Lenovo T14s laptop headset. 4. MMIO mux: avoid using syscon's device_node_to_regmap(), due to changes in the syscon code. * tag 'mux-drv-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux: mux: adgs1408: fix Wvoid-pointer-to-enum-cast warning mux: gpio: add optional regulator support dt-bindings: mux: add optional regulator binding to gpio mux mux: mmio: Do not use syscon helper to build regmap mux: adg792a: remove incorrect of_match_ptr annotation mux: adgs1408: simplify with spi_get_device_match_data() mux: mmio: Add missing word in error message
2025-05-21Merge tag 'mhi-for-v6.16' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== - Fix conflict between MHI power up and SYSERR state transitions by issuing MHI reset only if the device is in SYSERR state while in SBL/PBL EEs. The device won't respond to reset if it is not in SYSERR state in SBL/PBL EEs. - Remove redundant call to pci_assign_resource() since PCI core calls this API internally. - Add Telit FN920C04 modem which is based on Qcom SDX35 chipset. * tag 'mhi-for-v6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Add Telit FN920C04 modem support bus: mhi: host: pci_generic: Remove redundant assign resource usage bus: mhi: host: Fix conflict between power_up and SYSERR
2025-05-21Merge tag 'mhi-fixes-for-v6.15' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Endpoint ============ - Increment the rd_offset after writing the buffer to avoid MHI host accessing the incomplete/wrong buffer element. * tag 'mhi-fixes-for-v6.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: ep: Update read pointer only after buffer is written
2025-05-21Merge tag 'fpga-for-6.16-rc1' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 6.16-rc1 - Peter hands over the maintain role of m10bmc-sec driver to Matthew. - Qasim's change fix potential NULL pointer for fpga test. All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun <yilun.xu@intel.com> * tag 'fpga-for-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt() fpga: m10bmc-sec: change contact for secure update driver
2025-05-21Merge tag 'counter-updates-for-6.16' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: Counter updates for 6.16 An update to allow for larger count values in interrupt-cnt. * tag 'counter-updates-for-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: interrupt-cnt: Convert atomic_t -> atomic_long_t
2025-05-21Merge tag 'counter-fixes-for-6.15' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: Counter fixes for 6.15 A fix to prevent a race condition when accessing the Count enable component in interrupt-cnt. * tag 'counter-fixes-for-6.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: interrupt-cnt: Protect enable/disable OPs with mutex
2025-05-21perf/apple_m1: Remove driver-specific throttle supportKan Liang
The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250520181644.2673067-10-kan.liang@linux.intel.com
2025-05-21perf/arm: Remove driver-specific throttle supportKan Liang
The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Leo Yan <leo.yan@arm.com> Link: https://lore.kernel.org/r/20250520181644.2673067-9-kan.liang@linux.intel.com
2025-05-21staging: rtl8723bs: remove unnecessary braces for single statement blocksDavid Tadokoro
Remove all unnecessary braces for single-statement blocks in `os_dep/recv_linux.c` to conform to code style rules. Warnings reported by checkpatch.pl: * WARNING: braces {} are not necessary for single statement blocks * WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: David Tadokoro <davidbtadokoro@usp.br> Link: https://lore.kernel.org/r/20250521075831.485199-1-davidbtadokoro@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: rtl8723bs: Removed multiple blank lines of rtw_pwrctrl.cRogério Fernandes Pereira
Removed multiple blank lines in file rtw_pwrctrl.c Found by checkpatch.pl Signed-off-by: Rogério Fernandes Pereira <rfp2005@gmail.com> Link: https://lore.kernel.org/r/20250503202430.6053-1-rfp2005@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750le_setBLANK`Eric Florin
Rename `hw_sm750le_setBLANK` to `hw_sm750le_set_blank` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750le_setBLANK> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/b49d1a00628a3475fdfbff4055d8347d35a802a9.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750_setBLANK`Eric Florin
Rename `hw_sm750_setBLANK` to `hw_sm750_set_blank` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750_setBLANK> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/e00a39ffba89e000fdf8dc277166297d995aa891.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750_setColReg`Eric Florin
Rename `hw_sm750_setColReg` to `hw_sm750_set_col_reg` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750_setColReg> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/3d4bb87742eee4a6792bbdae893256f621ffffe6.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750_crtc_setMode`Eric Florin
Rename `hw_sm750_crtc_setMode` to `hw_sm750_crtc_set_mode` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750_crtc_setMode> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/40d4a1f5b05bcb0eefdd787b9df329fceb96105e.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750_crtc_checkMode`Eric Florin
Rename `hw_sm750_crtc_checkMode` to `hw_sm750_crtc_check_mode` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750_crtc_checkMode> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/546e9abb8eac1be75f47b51460ab69a5736d8a99.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750_output_setMode`Eric Florin
Rename `hw_sm750_output_setMode` to `hw_sm750_output_set_mode` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750_output_setMode> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/32daa589cf80d2f6f67ed257aa9397128a5458d2.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750le_deWait`Eric Florin
Rename `hw_sm750le_deWait` to `hw_sm750le_de_wait` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750le_deWait> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/0e5332f7758ad24cc5bca36671fd811c87881db7.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750_deWait`Eric Florin
Rename `hw_sm750_deWait` to `hw_sm750_de_wait` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750_deWait> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/2d94a42ca51de9fddddb64f74e217dfb2e0c7d1c.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: sm750fb: rename `hw_sm750_initAccel`Eric Florin
Rename `hw_sm750_initAccel` to `hw_sm750_init_accel` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: <hw_sm750_initAccel> Signed-off-by: Eric Florin <ericflorin@google.com> Link: https://lore.kernel.org/r/3c84dccaf38161d6de6ff560d4f10bb3d344cc51.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: gpib: switch to kmalloc(sizeof(*status))Andreas Kleinbichler
Fix checkpatch warning: Prefer kmalloc(sizeof(*status)...) over kmalloc(sizeof(struct gpib_status_byte)...) Signed-off-by: Andreas Kleinbichler <andi.kleinbichler@gmail.com> Link: https://lore.kernel.org/r/aCdY-OgvoTUjcIeF@andreas-VirtualBox Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: gpib: Fix secondary address restrictionDave Penkler
GPIB secondary addresses have valid values between 0 and 31 inclusive. The Make Secondary Address function MSA, used to form the protocol byte, was using the gpib_address_restrict function erroneously restricting the address range to 0 through 30. Remove the call to gpib_address_restrict and simply trim the address to 5 bits. Fixes: 2da03e7e31aa ("staging: gpib: Add user api include files") Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250520155100.5808-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: gpib: Fix uapi include header guard nameDave Penkler
When gpib_user.h was renamed to gpio.h the include guard name was not changed accordingly. Change the include guard name to correspond with the file name and cleanup the comments after the #endif. Fixes: c7184cbf5530 ("staging: gpib: Rename common include file") Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250509113014.9105-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: gpib: Avoid unused variable warningDave Penkler
This addresses a warning produced by make W=1 with the configuration parameter CONFIG_GPIB_PCMCIA=y ines/ines_gpib.c:1115:28: warning: variable 'dev' set but not used [-Wunused-but-set-variable] Remove the declaration and assignment of the unused variable. Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250502072150.32714-4-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: gpib: Declare driver entry points staticDave Penkler
Many of this driver's entry points were unecessarily not declared static. Remove the declarations from the include file. Make the declarations static in the .c file. Remove an uneccessary forward declaration in the .c file. Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250502072150.32714-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21staging: gpib: Fix PCMCIA config identifierDave Penkler
The PCMCIA config identifier in the ines_exit_module function was never changed because it was misspelled in the original commit. Update the config parameter to use the correct identifier from gpib/Kconfig Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver") Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250502072150.32714-2-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: add VT_GETCONSIZECSRPOS to retrieve console size and cursor positionNicolas Pitre
The console dimension and cursor position are available through the /dev/vcsa interface already. However the /dev/vcsa header format uses single-byte fields therefore those values are clamped to 255. As surprizing as this may seem, some people do use 240-column 67-row screens (a 1920x1080 monitor with 8x16 pixel fonts) which is getting close to the limit. Monitors with higher resolution are not uncommon these days (3840x2160 producing a 480x135 character display) and it is just a matter of time before someone with, say, a braille display using the Linux VT console and BRLTTY on such a screen reports a bug about missing and oddly misaligned screen content. Let's add VT_GETCONSIZECSRPOS for the retrieval of console size and cursor position without byte-sized limitations. The actual console size limit as encoded in vt.c is 32767x32767 so using a short here is appropriate. Then this can be used to get the cursor position when /dev/vcsa reports 255. The screen dimension may already be obtained using TIOCGWINSZ and adding the same information to VT_GETCONSIZECSRPOS might be redundant. However applications that care about cursor position also care about display size and having 2 separate system calls to obtain them separately is wasteful. Also, the cursor position can be queried by writing "\e[6n" to a tty and reading back the result but that may be done only by the actual application using that tty and not a sideline observer. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20250520171851.1219676-3-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: bracketed paste supportNicolas Pitre
This is comprised of 3 aspects: - Take note of when applications advertise bracketed paste support via "\e[?2004h" and "\e[?2004l". - Insert bracketed paste markers ("\e[200~" and "\e[201~") around pasted content in paste_selection() when bracketed paste is active. - Add TIOCL_GETBRACKETEDPASTE to return bracketed paste status so user space daemons implementing cut-and-paste functionality (e.g. gpm, BRLTTY) may know when to insert bracketed paste markers. Link: https://en.wikipedia.org/wiki/Bracketed-paste Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250520171851.1219676-2-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: remove VT_RESIZE and VT_RESIZEX from vt_compat_ioctl()Nicolas Pitre
They are listed amon those cmd values that "treat 'arg' as an integer" which is wrong. They should instead fall into the default case. Probably nobody ever relied on that code since 2009 but still. Fixes: e92166517e3c ("tty: handle VT specific compat ioctls in vt driver") Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/pr214s15-36r8-6732-2pop-159nq85o48r7@syhkavp.arg Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: process the full-width ASCII fallback range programmaticallyNicolas Pitre
This shaves about 170 bytes from ucs.o. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20250507141535.40655-9-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: make use of ucs_get_fallback() when glyph is unavailableNicolas Pitre
Attempt to display a fallback character when given character doesn't have an available glyph. The substitution may not be as good as the original character but still way more helpful than a squared question mark. Example substitutions: À -> A, ç -> c, ø -> o, ─ -> -, © -> C, etc. See gen_ucs_fallback_table.py for a comprehensive list. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20250507141535.40655-8-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: add ucs_get_fallback()Nicolas Pitre
This is the code querying the newly introduced tables. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20250507141535.40655-7-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: create ucs_fallback_table.h_shipped with gen_ucs_fallback_table.pyNicolas Pitre
The generated table maps complex characters to their simpler fallback forms for a terminal display when corresponding glyphs are unavailable. A page-based approach is used to reduce compiled binary footprint. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20250507141535.40655-6-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: introduce gen_ucs_fallback_table.py to create ucs_fallback_table.hNicolas Pitre
The generated table maps complex characters to their simpler fallback forms for a terminal display when corresponding glyphs are unavailable. This includes diacritics, symbols as well as many drawing characters. Fallback characters aren't perfect replacements, obviously. But they are still far more useful than a bunch of squared question marks. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250507141535.40655-5-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: move glyph determination to a separate functionNicolas Pitre
No logical changes. Make it easier for enhancements to come. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20250507141535.40655-4-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-21vt: make sure displayed double-width characters are remembered as suchNicolas Pitre
And to do so we ensure the Unicode screen buffer is initialized when double-width characters are encountered. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20250507141535.40655-3-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>