Li Zetao [Thu, 10 Aug 2023 11:50:49 +0000 (19:50 +0800)]
misc: eeprom/idt_89hpesx: Use devm_kmemdup to replace devm_kmalloc + memcpy
Use the helper function devm_kmemdup() rather than duplicating its
implementation, which helps to enhance code readability.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://lore.kernel.org/r/20230810115049.2104099-1-lizetao1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ruan Jinjie [Thu, 10 Aug 2023 12:16:08 +0000 (20:16 +0800)]
misc: eeprom/idt_89hpesx: Switch to memdup_user_nul() helper
Use memdup_user_nul() helper instead of open-coding to simplify the code.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://lore.kernel.org/r/20230810121608.2110328-1-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Fri, 11 Aug 2023 19:26:23 +0000 (21:26 +0200)]
Merge tag 'mhi-for-v6.6' of git://git./linux/kernel/git/mani/mhi into char-misc-next
Manivannan writes:
MHI Host
========
Core
----
- Skipped MHI reset if the device is in RDDM EE (Ramdump mode) since the device
cannot process reset request.
- Updated the sysfs contact details to use MHI list instead of bouncing
codeaurora email ids.
- Added support to allow MHI client drivers to provide the device firmware via
a pointer. This is required to support new firmware format to be used by
ath11k drivers.
- Used vcalloc instead of vzalloc to protect against multiplication overflows.
- Removed decrementing one unused parameter.
pci_generic
-----------
- Added support for MHI SW channels (IP_SW0) so that the host can transfer data
from devices over networking interface through this specific channel.
- Added support for a clone of Quectel RM520N-GL modem which uses a different
PID as it is targeted for laptop usecase.
- Added support for a clone of Quectel EM160R-GL modem which uses a different
PID as it is targeted for laptop usecase.
- Added support for another clone of Quectel RM520N-GL modem which uses a
different PID as it is targeted for Lenovo laptop usecase.
- Added support for Dell DW5932e modem (both eSIM and non-eSIM variants).
- Added support for Telit FE990 modem.
* tag 'mhi-for-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi:
bus: mhi: host: pci_generic: add support for Telit FE990 modem
bus: mhi: host: remove unused-but-set parameter
bus: mhi: host: pci_generic: Add support for Quectel RM520N-GL Lenovo variant
bus: mhi: host: allow MHI client drivers to provide the firmware via a pointer
docs: ABI: sysfs-bus-mhi: Update contact info
bus: mhi: host: use vmalloc_array and vcalloc
bus: mhi: host: pci_generic: Add support for Dell DW5932e
bus: mhi: host: pci_generic: Add support for Quectel RM520N-GL modem
bus: mhi: host: pci_generic: Add support for Quectel EM160R-GL modem
bus: mhi: host: pci_generic: Add support for IP_SW0 channels
bus: mhi: host: Skip MHI reset if device is in RDDM
Greg Kroah-Hartman [Fri, 11 Aug 2023 19:24:31 +0000 (21:24 +0200)]
Merge tag 'fsi-for-v6.6' of git://git./linux/kernel/git/joel/fsi into char-misc-next
Joen writes:
FSI changes for v6.6
* New drivers for the I2C Responder master and SCOM device
* Misc janitor fixes
* tag 'fsi-for-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi:
fsi: fix some spelling mistakes in comment
fsi: master-ast-cf: Add MODULE_FIRMWARE macro
docs: ABI: fix spelling/grammar in SBEFIFO timeout interface
fsi: Add I2C Responder SCOM driver
fsi: Add IBM I2C Responder virtual FSI master
dt-bindings: fsi: Document the IBM I2C Responder virtual FSI master
fsi: Lock mutex for master device registration
fsi: Improve master indexing
fsi: core: Switch to ida_alloc/free
fsi: core: Fix legacy minor numbering
fsi: core: Add trace events for scan and unregister
fsi: aspeed: Reset master errors after CFAM reset
fsi: sbefifo: Remove limits on user-specified read timeout
fsi: sbefifo: Add configurable in-command timeout
fsi: sbefifo: Don't check status during probe
fsi: Use of_match_table for bus matching if specified
fsi: Add aliased device numbering
fsi: Move fsi_slave structure definition to header
fsi: Use of_property_read_reg() to parse "reg"
fsi: Explicitly include correct DT includes
Greg Kroah-Hartman [Fri, 11 Aug 2023 19:22:33 +0000 (21:22 +0200)]
Merge tag 'iio-for-6.6a' of https://git./linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
1st set of IIO new device support, features and cleanup for 6.6
New device support
* adi,ad8366
- Add support for the HMC792 digital attenuator (mostly chip specific data)
* alwinner,sun20i-gpadc
- New driver for the integrated ADC on a number of allwinner SoCs
including dt-binding documentation.
* microchip,mcp4728
- New driver for this quad channel DAC. Includes dt-bindings.
* miramems, da280
- Add ID for DA217 accelerometer which is compatible with the da280.
* murata,irs-d200
- New driver for this passive infrared sensor typically used for human
detection. Includes bindings and a few pieces of new ABI to
cover a case of needing to count a number of repeats of an event
before reporting it.
* rohm,bu27008
- Add initial support for the BU27010 RGB + flickering sensor to this
driver. Substantial refactoring was needed to enable this.
Features
* adi,admv8818
- Add mode that bypasses the input and output filters.
* amlogic,meson
- Support control of the MUX on channel 7, exposed as multiple channels.
- Support channel labels.
* sensirion,scd4x
- Add pressure compensation. Controlled via an 'output' pressure channel.
* ti,lmp92040
- Add IIO buffered supported (read via chrdev).
* vishay,vcnl4000
- Add proximity interrupt support for vcnl4200.
- Add proximity integration time control for vcnl4200.
- Add illuminance integration time control for vcnl4040 and vcnl4200.
- Add calibration bias, proximity and illuminance event period, and
oversampling ratio control for vcnl4040 and vncl4200.
Cleanup and minor fixes
* core
- Tidy up handling of set_trigger_state() callback return values
to consistently assume no positive return values.
- Use min() rather than min_t() in a case where types were clearly
the same.
- Drop some else statements that follow continue with a loop or
a returns.
- White space and comment format cleanup.
- Use sysfs_match_string() helper to improve readability.
- Use krealloc_array() to make it explicit a krealloc is for an array
of structures, not just one.
* tools
- Tidy up potential overflow in array index.
* tree wide
- Fix up includes for DT related headers.
- Drop some error prints in places where as similar error message
is printed by the function being called.
- Tidy up handling of return value from platform_get_irq() to no longer
take into account 0 as a value that might be returned. Similar for
fwnode_irq_get().
* adi,ad7192
- Add missing error check and improved debug logging.
- Use sysfs_emit_at() rather than open coded variant.
* adi,adis16475
- Drop unused scan element enum entries.
- Specify that a few more devices support burst32 mode.
* adi,admv1013
- Enable all required regulators and document as required in the
dt-binding.
* adi,admv1014
- Make all regulators required in the dt-binding as the device needs
them all enabled.
* adi,adxl313
- Fix wrong enum values being used in the i2c_device_id table.
- Use i2c_get_match_data() to reduce open coded handling of the
various id tables.
* allwinner,gpadc
- Make the kconfig text more specific to make space for separate drivers
for other Allwinner devices.
* amlogic,meson
- Drop unused timestamp channels as no buffer support.
- Various minor reorganizations to enable addition of support channel 7
MUX.
- Initialize some default values to account for potential previous user
since reboot.
* qcom,spmi-adc5
- Add ADC5_GPIO2_100K_PU support to driver to line up with bindings.
* qcom,spmi-adc7
- Use predefined channel ID definitions rather than values.
* invensense, common
- Factor out the timestamp handling to a module used by both mpu6050 and
icm42600.
* invensense,mpu6050
- Read as many FIFO elements as possible in one bus access.
* men,s188
- Drop redundant initialization of driver owner field.
* microchip,mcp4018 and mcp4531
- Use i2c_get_match_data() instead of open coding. Includes making the
data format the same for the i2c_device_id and firmware match
tables.
* semtech,sx9310
- dt-bindings: Add reference to IIO schema to provide the label property.
* semtech,sx9324
- dt-bindings: Add reference to IIO schema to provide the label property.
* st,stm32-adc
- Use devm_platform_get_and_ioremap_resource() instead of open coded
version.
* st,stm-lptimer-trigger
- Drop setting platform drvdata as it wasn't then used.
* ti,ads1015
- Fix wrong dt binding description of ti,datarate for some devices.
* vishay,vcnl4200
- Move to switch statements for channel type checking to make later
additions simpler.
* tag 'iio-for-6.6a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (73 commits)
Documentation: ABI: testing: admv8818: add bypass
drivers: iio: filter: admv8818: add bypass mode
iio: light: bd27008: Support BD27010 RGB
iio: light: bu27008: add chip info
dt-bindings: iio: ROHM BU27010 RGBC + flickering sensor
iio: add MCP4728 I2C DAC driver
dt-bindings: iio: dac: add mcp4728.yaml
drivers: iio: admv1013: add vcc regulators
dt-bindings: iio: admv1013: add vcc regulators
iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata()
iio: adc: men_z188_adc: Remove redundant initialization owner in men_z188_driver
dt-bindings: iio: admv1014: make all regs required
iio: cdc: ad7150: relax return value check for IRQ get
iio: mb1232: relax return value check for IRQ get
iio: adc: fix the return value handle for platform_get_irq()
tools: iio: iio_generic_buffer: Fix some integer type and calculation
iio: potentiometer: mcp4531: Use i2c_get_match_data()
iio: potentiometer: mcp4018: Use i2c_get_match_data()
iio: core: Fix issues and style of the comments
iio: core: Switch to krealloc_array()
...
Daniele Palmas [Fri, 4 Aug 2023 09:40:39 +0000 (11:40 +0200)]
bus: mhi: host: pci_generic: add support for Telit FE990 modem
Add support for Telit FE990 that has the same configuration as FN990:
$ lspci -vv
04:00.0 Unassigned class [ff00]: Qualcomm Device 0308
Subsystem: Device 1c5d:2015
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/20230804094039.365102-1-dnlplm@gmail.com
[mani: minor update to commit subject and adjusted comment]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Arnd Bergmann [Fri, 11 Aug 2023 13:45:41 +0000 (15:45 +0200)]
bus: mhi: host: remove unused-but-set parameter
Clang warns about a parameter that is decremented but never evaluated here:
bus/mhi/host/main.c:803:13: error: parameter 'event_quota' set but not used [-Werror,-Wunused-but-set-parameter]
u32 event_quota)
Remove the access to the variable to avoid that warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://lore.kernel.org/r/20230811134547.3231160-1-arnd@kernel.org
[mani: minor spelling fix to commit message]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Yu Zhe [Fri, 3 Feb 2023 08:37:21 +0000 (16:37 +0800)]
fsi: fix some spelling mistakes in comment
Fix typos in comment.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20230203083721.23455-1-yuzhe@nfschina.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Juerg Haefliger [Wed, 28 Jun 2023 09:50:39 +0000 (11:50 +0200)]
fsi: master-ast-cf: Add MODULE_FIRMWARE macro
The module loads firmware so add a MODULE_FIRMWARE macro to provide that
information via modinfo.
Fixes:
6a794a27daca ("fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire")
Cc: stable@vger.kernel.org # 4.19+
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Link: https://lore.kernel.org/r/20230628095039.26218-1-juerg.haefliger@canonical.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Randy Dunlap [Mon, 10 Jul 2023 05:23:05 +0000 (22:23 -0700)]
docs: ABI: fix spelling/grammar in SBEFIFO timeout interface
Correct spelling problems as identified by codespell.
Correct one grammar error.
Fixes:
9a93de620e0a ("docs: ABI: testing: Document the SBEFIFO timeout interface")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Eddie James <eajames@linux.ibm.com>
Cc: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20230710052305.29611-1-rdunlap@infradead.org
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:57 +0000 (14:56 -0500)]
fsi: Add I2C Responder SCOM driver
The I2CR has the capability to directly perform SCOM operations,
circumventing the need to drive the FSI2PIB engine. Add a new
driver to perform SCOM operations through the I2CR.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-15-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:56 +0000 (14:56 -0500)]
fsi: Add IBM I2C Responder virtual FSI master
The I2C Responder (I2CR) is an I2C device that translates I2C commands
to CFAM or SCOM operations, effectively implementing an FSI master and
bus.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-14-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:55 +0000 (14:56 -0500)]
dt-bindings: fsi: Document the IBM I2C Responder virtual FSI master
The I2C Responder translates I2C commands to CFAM or SCOM operations,
effectively implementing an FSI master.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230612195657.245125-13-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Wed, 9 Aug 2023 18:08:14 +0000 (13:08 -0500)]
fsi: Lock mutex for master device registration
Because master device registration may cause hub master scans, or
user scans may begin before device registration has ended, so the
master scan lock must be held while registering the device.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230809180814.151984-3-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Wed, 9 Aug 2023 18:08:13 +0000 (13:08 -0500)]
fsi: Improve master indexing
Master indexing is problematic if a hub is rescanned while the
root master is being rescanned. Always allocate an index for the
FSI master, and set the device name if it hasn't already been set.
Move the call to ida_free to the bottom of master unregistration
and set the number of links to 0 in case another call to scan
comes in before the device is removed.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230809180814.151984-2-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:53 +0000 (14:56 -0500)]
fsi: core: Switch to ida_alloc/free
ida_simple_get/remove are deprecated, so switch to ida_alloc/free.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-11-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:52 +0000 (14:56 -0500)]
fsi: core: Fix legacy minor numbering
The legacy minor numbering shifts the chip id too much,
resulting in ids that overlap with regular ids. Since there
are only 2 bits for 4 types, only shift the chip id by 2
to fit the legacy ids in their reserved space.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-10-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:51 +0000 (14:56 -0500)]
fsi: core: Add trace events for scan and unregister
Add more trace events for the scanning and unregistration
functions for debug purposes.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20230612195657.245125-9-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:50 +0000 (14:56 -0500)]
fsi: aspeed: Reset master errors after CFAM reset
It has been observed that sometimes the FSI master will return all 0xffs
after a CFAM has been taken out of reset, without presenting any error.
Resetting the FSI master errors resolves the issue.
Fixes:
4a851d714ead ("fsi: aspeed: Support CFAM reset GPIO")
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-8-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:49 +0000 (14:56 -0500)]
fsi: sbefifo: Remove limits on user-specified read timeout
There's no reason to limit the user here. The way the driver is
designed, extremely large transfers require extremely long timeouts.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-7-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:48 +0000 (14:56 -0500)]
fsi: sbefifo: Add configurable in-command timeout
A new use case for the SBEFIFO requires a long in-command timeout
as the SBE processes each part of the command before clearing the
upstream FIFO for the next part of the command.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-6-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:47 +0000 (14:56 -0500)]
fsi: sbefifo: Don't check status during probe
The status check during probe doesn't serve any purpose. Any attempt
to use the SBEFIFO will result in the same check and cleanup.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-5-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:46 +0000 (14:56 -0500)]
fsi: Use of_match_table for bus matching if specified
Since we have two scom drivers, use the standard of matching if
the driver specifies a table so that the right devices go to the
right driver.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-4-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:45 +0000 (14:56 -0500)]
fsi: Add aliased device numbering
The I2C and SPI subsystems can use an aliased name to number the device.
Add similar support to the FSI subsystem for any device type.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-3-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Eddie James [Mon, 12 Jun 2023 19:56:44 +0000 (14:56 -0500)]
fsi: Move fsi_slave structure definition to header
Some FSI drivers may have need of the slave definition, so
move it to a header file. Also use one macro for obtaining a
pointer to the fsi_master structure.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-2-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Rob Herring [Fri, 9 Jun 2023 18:30:56 +0000 (12:30 -0600)]
fsi: Use of_property_read_reg() to parse "reg"
Use the recently added of_property_read_reg() helper to get the
untranslated "reg" address value.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230609183056.1765183-1-robh@kernel.org
Signed-off-by: Joel Stanley <joel@jms.id.au>
Rob Herring [Tue, 18 Jul 2023 20:55:08 +0000 (14:55 -0600)]
fsi: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230718205508.1790932-1-robh@kernel.org
Signed-off-by: Joel Stanley <joel@jms.id.au>
Greg Kroah-Hartman [Tue, 8 Aug 2023 08:53:30 +0000 (10:53 +0200)]
Merge tag 'peci-next-6.6-rc1' of git://git./linux/kernel/git/iwi/linux into char-misc-next
Iwona writes:
Update peci-next for v6.6-rc1
* Add Intel Sapphire Rapids support.
* Add Nuvoton controller driver.
* tag 'peci-next-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/iwi/linux:
arm64: dts: nuvoton: Add PECI controller node
ARM: dts: nuvoton: Add PECI controller node
peci: Add peci-npcm controller driver
dt-bindings: Add bindings for peci-npcm
hwmon: (peci/dimmtemp) Add Sapphire Rapids support
hwmon: (peci/cputemp) Add Intel Sapphire Rapids support
peci: cpu: Add Intel Sapphire Rapids support
Antoniu Miclaus [Mon, 31 Jul 2023 08:49:27 +0000 (11:49 +0300)]
Documentation: ABI: testing: admv8818: add bypass
Add documentation for the use of the bypass filter mode.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20230731084928.8302-2-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Antoniu Miclaus [Mon, 31 Jul 2023 08:49:26 +0000 (11:49 +0300)]
drivers: iio: filter: admv8818: add bypass mode
Add filter bypass mode, which bypasses the low pass filter, high pass
filter and disables/unregister the clock rate notifier.
Currently a feature like bypassing the filter is not achievable
straightforward and not very deductive. The user has to look through the
code and call the set_lpf_3db_frequency and set_hpf_3db_frequency iio
attributes from the user interface using the corner cases (freq >
largest lpf supported by the part, respectively freq < smallest hpf
supported by the part). Moreover, in such case of bypassing the filter,
the input clock rate change might mess up things so we want to make sure
that it is disabled. Also, the feature will help emphasizing the filter
behavior, therefore adding it in the userspace will ease the
charcaterization of the filter's effects when active/disabled.
It was requested by users of the driver to ease the interaction with
different configuration modes of the device.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20230731084928.8302-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Matti Vaittinen [Wed, 2 Aug 2023 07:37:12 +0000 (10:37 +0300)]
iio: light: bd27008: Support BD27010 RGB
The ROHM BU27010 is an RGBC sensor with a flickering detection FIFO. The
RGBC+IR sensor functionality is largely similar to what the BU27008 has.
There are some notable things though:
- gain setting is once again new and exotic. Now, there is 6bit gain
setting where 4 of the bits are common to all channels and 2 bits
can be configured separately for each channel. The BU27010 has
similar "1X on other channels vs 2X on IR when selector is 0x0"
gain design as BU27008 had. So, we use same gain setting policy for
BU27010 as we did for BU27008 - driver sets same gain selector for all
channels but shows the gains separately for all channels so users
can (at least in theory) detect this 1X vs 2X madness...
- BU27010 has suffled all the control register bitfields to new
addresses and bit positions while still keeping the register naming
same.
- Some more power/reset control is added.
- FIFO for "flickering detection" is added.
The control register suffling made this slightly nasty. Still, it is
easier for maintenance perspective to add the BU27010 support in BU27008
driver because - even though the bit positions/addresses were changed -
most of the driver structure can be re-used. Writing own driver for
BU27010 would mean plenty of duplicate code albeit a tad more clarity.
The flickering FIFO is not supported by the driver.
Add BU27010 RGBC+IR support to rohm-bu27008 driver.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/111cd217ccece1c1f16ab4287532dc4e1ddb8a3f.1690958450.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Matti Vaittinen [Wed, 2 Aug 2023 07:36:53 +0000 (10:36 +0300)]
iio: light: bu27008: add chip info
The ROHM BU27010 RGB + flickering sensor is in many regards similar to
the BU27008. Prepare for adding support for BU27010 by allowing
chip-specific properties to be brought from the of_device_id data.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/d5994648033d5513993b8d72eb186ddda211b5ac.1690958450.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Matti Vaittinen [Wed, 2 Aug 2023 07:36:34 +0000 (10:36 +0300)]
dt-bindings: iio: ROHM BU27010 RGBC + flickering sensor
The ROHM BU27010 is a sensor with 6 photodiodes (red, green, blue, clear,
IR and flickering detection) with five configurable channels. Red, green
and flickering detection being always available and two out of the rest
three (blue, clear, IR) can be selected to be simultaneously measured.
Typical application is adjusting LCD/OLED backlight of TVs, mobile phones
and tablet PCs.
Add binding document for ROHM BU27010.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/717d30694ba6864b8c28772d7478bed93ea10138.1690958450.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Duke Xin (辛安文) [Mon, 7 Aug 2023 03:04:54 +0000 (20:04 -0700)]
bus: mhi: host: pci_generic: Add support for Quectel RM520N-GL Lenovo variant
Quectel's RM520N-GL Lenovo variant is same as that of the existing
RM520N-GL modem and uses the same config. But this one is designed for
Lenovo laptop usecase, hence Quectel got a new PID.
Signed-off-by: Duke Xin(辛安文) <duke_xinanwen@163.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Link: https://lore.kernel.org/r/20230807030454.37255-1-duke_xinanwen@163.com
[mani: tweaked subject and commit message a bit]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Iwona Winiarska [Thu, 27 Jul 2023 20:21:26 +0000 (22:21 +0200)]
arm64: dts: nuvoton: Add PECI controller node
Add PECI controller node with all required information.
Reviewed-by: Tomer Maimon <tmaimon77@gmail.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230727202126.1477515-5-iwona.winiarska@intel.com
Iwona Winiarska [Thu, 27 Jul 2023 20:21:25 +0000 (22:21 +0200)]
ARM: dts: nuvoton: Add PECI controller node
Add PECI controller node with all required information.
Reviewed-by: Tomer Maimon <tmaimon77@gmail.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230727202126.1477515-4-iwona.winiarska@intel.com
Tomer Maimon [Thu, 27 Jul 2023 20:21:24 +0000 (22:21 +0200)]
peci: Add peci-npcm controller driver
Add support for Nuvoton NPCM BMC hardware to the Platform Environment
Control Interface (PECI) subsystem.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Signed-off-by: Tyrone Ting <warp5tw@gmail.com>
Co-developed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230727202126.1477515-3-iwona.winiarska@intel.com
Tomer Maimon [Thu, 27 Jul 2023 20:21:23 +0000 (22:21 +0200)]
dt-bindings: Add bindings for peci-npcm
Add device tree bindings for the peci-npcm controller driver.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Signed-off-by: Tyrone Ting <warp5tw@gmail.com>
Co-developed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230727202126.1477515-2-iwona.winiarska@intel.com
Patrick Rudolph [Tue, 25 Jul 2023 10:43:53 +0000 (12:43 +0200)]
hwmon: (peci/dimmtemp) Add Sapphire Rapids support
Extend the functionality of hwmon (peci/dimmtemp) for Sapphire Rapids
platform.
Add the corresponding Sapphire Rapids ID and threshold code.
The patch has been tested on a 4S system with 64 DIMMs installed.
Verified read of DIMM temperature thresholds & temperature.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230725104354.33920-3-Naresh.Solanki@9elements.com
Patrick Rudolph [Tue, 25 Jul 2023 10:43:52 +0000 (12:43 +0200)]
hwmon: (peci/cputemp) Add Intel Sapphire Rapids support
Add support to read DTS for reading Intel Sapphire Rapids platform.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230725104354.33920-2-Naresh.Solanki@9elements.com
Naresh Solanki [Tue, 25 Jul 2023 10:43:51 +0000 (12:43 +0200)]
peci: cpu: Add Intel Sapphire Rapids support
Add support for detection of Intel Sapphire Rapids processor based on
CPU family & model.
Sapphire Rapids Xeon processors with the family set to 6 and the
model set to INTEL_FAM6_SAPPHIRERAPIDS_X. The data field for this entry
is "spr".
Tested the patch series with AST2600 BMC with 4S Intel Sapphire Rapids
processors & verified by reading cpu & dimm temperature.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230725104354.33920-1-Naresh.Solanki@9elements.com
Andrea Collamati [Thu, 3 Aug 2023 12:56:35 +0000 (14:56 +0200)]
iio: add MCP4728 I2C DAC driver
MCP4728 is a 12-bit quad channel DAC with I2C interface.
support for:
* per-channel gain
* per-channel power state
* per-channel power down mode control
* per-channel vref selection internal/vdd
* store current state to on-chip EEPROM
Signed-off-by: Andrea Collamati <andrea.collamati@gmail.com>
Link: https://lore.kernel.org/r/a0933003ed3c855f9d80d6ce0a40add2b6f0ba36.1691066050.git.andrea.collamati@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andrea Collamati [Thu, 3 Aug 2023 12:56:34 +0000 (14:56 +0200)]
dt-bindings: iio: dac: add mcp4728.yaml
Add documentation for MCP4728
Signed-off-by: Andrea Collamati <andrea.collamati@gmail.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/d93dd116cfa7f958c038c0c62993071ea48451d2.1691066050.git.andrea.collamati@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Antoniu Miclaus [Mon, 31 Jul 2023 09:44:55 +0000 (12:44 +0300)]
drivers: iio: admv1013: add vcc regulators
Add regulators for the VCC supplies of the admv1013.
The patch aims to align the implementation with the current admv1014
driver where all the VCC supplies are handled as regulators.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20230731094455.26742-2-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Antoniu Miclaus [Mon, 31 Jul 2023 09:44:54 +0000 (12:44 +0300)]
dt-bindings: iio: admv1013: add vcc regulators
Add bindings for the VCC regulators of the ADMV1013 microware
upconverter.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230731094455.26742-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andrei Coardos [Wed, 2 Aug 2023 12:09:15 +0000 (15:09 +0300)]
iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata()
This function call was found to be unnecessary as there is no equivalent
platform_get_drvdata() call to access the private data of the driver. Also,
the private data is defined in this driver, so there is no risk of it being
accessed outside of this driver file.
Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
Link: https://lore.kernel.org/r/20230802120915.25631-1-aboutphysycs@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Li Zetao [Fri, 4 Aug 2023 10:09:38 +0000 (18:09 +0800)]
iio: adc: men_z188_adc: Remove redundant initialization owner in men_z188_driver
The module_mcb_driver() will set "THIS_MODULE" to driver.owner when
register a mcb_driver, so it is redundant initialization to set
driver.owner in men_z188_driver statement. Remove it for clean code.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/r/20230804100938.100435-1-lizetao1@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Radu Bacrau [Thu, 27 Jul 2023 19:29:07 +0000 (14:29 -0500)]
firmware: stratix10-rsu: query spt addresses
Extend Intel Remote System Update (RSU) driver to get SPT
(Sub-Partition Table) addresses. The query SPT address can be used
to determine if the RSU QSPI layout is 32kB or 64kB aligned.
The alignment can be determined by minus the upper with the lower of
the SPT addresses.
This patch depends on patch:
firmware: stratix10-svc: Generic Mailbox Command
Signed-off-by: Radu Bacrau <radu.bacrau@intel.com>
Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20230727192907.982070-2-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Teh Wen Ping [Thu, 27 Jul 2023 19:29:06 +0000 (14:29 -0500)]
firmware: stratix10-svc: Generic Mailbox Command
Add generic mailbox command that can support SDM command. User can use this
command to send SDM mailbox command. User have to specified an input file
which contain the command data and an output file for SDM response to be
copied over.
Signed-off-by: Teh Wen Ping <wen.ping.teh@intel.com>
Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20230727192907.982070-1-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alper Nebi Yasak [Tue, 25 Jul 2023 17:43:33 +0000 (20:43 +0300)]
firmware: coreboot: framebuffer: Allow building with simpledrm
The coreboot framebuffer driver registers a "simple-framebuffer" device
based on the information from the firmware, after checking that it's
compatible with the formats listed in simplefb.h. It was added before
simpledrm, and its Kconfig marked as dependent on the simplefb driver.
The simpledrm driver can also handle "simple-framebuffer" devices and
the coreboot framebuffer works fine with it on a 'Lick' Chromebook.
Allow building the coreboot framebuffer driver with simpledrm as well.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20230725174334.887485-1-alpernebiyasak@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Zev Weiss [Fri, 23 Jun 2023 14:28:05 +0000 (16:28 +0200)]
peci: Constify struct peci_controller_ops
As with most ops structs, we never modify it at runtime, and keeping
function pointers in read-only memory is generally a good thing
security-wise.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Link: https://lore.kernel.org/r/20230327224315.11135-1-zev@bewilderbeest.net
Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230623142805.577612-1-iwona.winiarska@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Herring [Mon, 17 Jul 2023 15:03:55 +0000 (09:03 -0600)]
cdx: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Nipun Gupta <nipun.gupta@amd.com>
Link: https://lore.kernel.org/r/20230717150355.1749845-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Zhang Shurong [Sat, 22 Jul 2023 15:29:51 +0000 (23:29 +0800)]
uio: pruss: fix to check return value of platform_get_irq() in pruss_probe()
The platform_get_irq might be failed and return a negative result. So
there should have an error handling code.
Fixed this by adding an error handling code.
Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
Link: https://lore.kernel.org/r/tencent_8E383752B54E5BF860711E500AD8A8971208@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Clark [Mon, 24 Jul 2023 14:49:41 +0000 (07:49 -0700)]
dma-buf/sync_file: Fix docs syntax
Fixes the warning:
include/uapi/linux/sync_file.h:77: warning: Function parameter or member 'num_fences' not described in 'sync_file_info'
Fixes:
2d75c88fefb2 ("staging/android: refactor SYNC IOCTLs")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20230724145000.125880-1-robdclark@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chengfeng Ye [Thu, 29 Jun 2023 18:29:41 +0000 (18:29 +0000)]
misc: bcm_vk: Fix potential deadlock on &vk->ctx_lock
As &vk->ctx_lock is acquired by timer bcm_vk_hb_poll() under softirq
context, other process context code should disable irq or bottom-half
before acquire the same lock, otherwise deadlock could happen if the
timer preempt the execution while the lock is held in process context
on the same CPU.
Possible deadlock scenario
bcm_vk_open()
-> bcm_vk_get_ctx()
-> spin_lock(&vk->ctx_lock)
<timer iterrupt>
-> bcm_vk_hb_poll()
-> bcm_vk_blk_drv_access()
-> spin_lock_irqsave(&vk->ctx_lock, flags) (deadlock here)
This flaw was found using an experimental static analysis tool we are
developing for irq-related deadlock, which reported the following
warning when analyzing the linux kernel 6.4-rc7 release.
[Deadlock]: &vk->ctx_lock
[Interrupt]: bcm_vk_hb_poll
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_msg.c:176
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_dev.c:512
[Locking Unit]: bcm_vk_ioctl
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_dev.c:1181
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_dev.c:512
[Deadlock]: &vk->ctx_lock
[Interrupt]: bcm_vk_hb_poll
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_msg.c:176
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_dev.c:512
[Locking Unit]: bcm_vk_ioctl
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_dev.c:1169
[Deadlock]: &vk->ctx_lock
[Interrupt]: bcm_vk_hb_poll
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_msg.c:176
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_dev.c:512
[Locking Unit]: bcm_vk_open
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_msg.c:216
[Deadlock]: &vk->ctx_lock
[Interrupt]: bcm_vk_hb_poll
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_msg.c:176
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_dev.c:512
[Locking Unit]: bcm_vk_release
-->/root/linux/drivers/misc/bcm-vk/bcm_vk_msg.c:306
As suggested by Arnd, the tentative patch fix the potential deadlocks
by replacing the timer with delay workqueue. x86_64 allyesconfig using
GCC shows no new warning. Note that no runtime testing was performed
due to no device on hand.
Signed-off-by: Chengfeng Ye <dg573847474@gmail.com>
Acked-by: Scott Branden <scott.branden@broadcom.com>
Tested-by: Desmond Yan <desmond.branden@broadcom.com>
Tested-by: Desmond Yan <desmond.yan@broadcom.com>
Link: https://lore.kernel.org/r/20230629182941.13045-1-dg573847474@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Baoquan He [Fri, 7 Jul 2023 13:58:48 +0000 (21:58 +0800)]
pcmcia : make PCMCIA depend on HAS_IOMEM
On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.
Here let depend PCMCIA on HAS_IOMEM so that it won't be built to
cause below compiling error if PCI is unset.
------
ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
cistpl.c:(.text+0x1202): undefined reference to `ioremap'
ld: cistpl.c:(.text+0x13b0): undefined reference to `iounmap'
ld: cistpl.c:(.text+0x14a6): undefined reference to `iounmap'
ld: cistpl.c:(.text+0x1544): undefined reference to `ioremap'
ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
cistpl.c:(.text+0x3f14): undefined reference to `iounmap'
------
Besides, many other Kconfig option, e.g IPWIRELESS, PCMCIA_PCNET,
PCMCIA_FMVJ18X, PCMCIA_SMC91C92 which depends on PCMCIA also will
cause compiling error if enabled.
------
ERROR: modpost: "iounmap" [drivers/tty/ipwireless/ipwireless.ko] undefined!
ERROR: modpost: "ioremap" [drivers/tty/ipwireless/ipwireless.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/ethernet/8390/pcnet_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/ethernet/8390/pcnet_cs.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/ethernet/fujitsu/fmvj18x_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/ethernet/fujitsu/fmvj18x_cs.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/ethernet/smsc/smc91c92_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/ethernet/smsc/smc91c92_cs.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/ethernet/xircom/xirc2ps_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/ethernet/xircom/xirc2ps_cs.ko] undefined!
ERROR: modpost: "devm_ioremap" [drivers/net/ethernet/altera/altera_tse.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/arcnet/com90xx.ko] undefined!
------
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Link: https://lore.kernel.org/r/20230707135852.24292-5-bhe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Baoquan He [Fri, 7 Jul 2023 13:58:47 +0000 (21:58 +0800)]
misc: open-dice: make OPEN_DICE depend on HAS_IOMEM
On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.
Here let OPEN_DICE depend on HAS_IOMEM so that it won't be built
to cause below compiling error if PCI is unset:
------
ERROR: modpost: "devm_memremap" [drivers/misc/open-dice.ko] undefined!
ERROR: modpost: "devm_memunmap" [drivers/misc/open-dice.ko] undefined!
------
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Derek Kiernan <derek.kiernan@amd.com>
Cc: Dragan Cvetic <dragan.cvetic@amd.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230707135852.24292-4-bhe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Baoquan He [Fri, 7 Jul 2023 13:58:46 +0000 (21:58 +0800)]
char: xillybus: make XILLYBUS_OF depend on HAS_IOMEM
On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.
Here let XILLYBUS_OF depend on HAS_IOMEM so that it won't be built
to cause below compiling error if PCI is unset:
------
ERROR: modpost: "devm_platform_ioremap_resource" [drivers/char/xillybus/xillybus_of.ko] undefined!
------
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Eli Billauer <eli.billauer@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230707135852.24292-3-bhe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ruan Jinjie [Wed, 26 Jul 2023 18:07:07 +0000 (18:07 +0000)]
misc: hi6421-spmi-pmic: Remove redundant dev_err()
There is no need to call the dev_err() function directly to print a custom
message when handling an error from the platform_get_irq() function as it
is going to display an appropriate error message in case of a failure.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230726180707.2486808-1-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Herring [Tue, 18 Jul 2023 14:31:01 +0000 (08:31 -0600)]
misc: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Acked-by: Andrew Donnellan <ajd@linux.ibm.com> # cxl
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230718143102.1065481-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 10 Jul 2023 08:23:11 +0000 (10:23 +0200)]
misc: tps6594-esm: 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().
There are two calls that can go wrong in tps6594_esm_remove(); for both
there is already an error message. Not returning the error code has the
only side effect of suppressing (another) error message by the core
about the error being ignored. So tps6594_esm_remove() can be converted
to return void without any loss.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230710082311.3474785-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Fri, 7 Jul 2023 07:33:43 +0000 (09:33 +0200)]
misc: tps6594-pfsm: 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230707073343.3396477-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yangtao Li [Fri, 7 Jul 2023 02:42:23 +0000 (10:42 +0800)]
misc: xilinx_tmr_manager: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20230707024224.78907-3-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yangtao Li [Fri, 7 Jul 2023 02:42:22 +0000 (10:42 +0800)]
misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20230707024224.78907-2-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yangtao Li [Fri, 7 Jul 2023 02:42:21 +0000 (10:42 +0800)]
misc: atmel-ssc: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230707024224.78907-1-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kumaravel Thiagarajan [Tue, 20 Jun 2023 14:35:20 +0000 (20:05 +0530)]
misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX EEPROM via NVMEM sysfs
Microchip's pci1xxxx is an unmanaged PCIe3.1a switch for consumer,
industrial, and automotive applications. This switch integrates OTP
and EEPROM to enable customization of the part in the field.
This patch adds support to read and write into PCI1XXXX EEPROM
via NVMEM sysfs.
Signed-off-by: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
Co-developed-by: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
Signed-off-by: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
Co-developed-by: Vaibhaav Ram T.L <vaibhaavram.tl@microchip.com>
Signed-off-by: Vaibhaav Ram T.L <vaibhaavram.tl@microchip.com>
Link: https://lore.kernel.org/r/20230620143520.858-3-vaibhaavram.tl@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kumaravel Thiagarajan [Tue, 20 Jun 2023 14:35:19 +0000 (20:05 +0530)]
misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX OTP via NVMEM sysfs
Microchip's pci1xxxx is an unmanaged PCIe3.1a switch for consumer,
industrial, and automotive applications. This switch integrates OTP
and EEPROM to enable customization of the part in the field. This
patch adds support to read and write into PCI1XXXX OTP via NVMEM sysfs.
Signed-off-by: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
Co-developed-by: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
Signed-off-by: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
Co-developed-by: Vaibhaav Ram T.L <vaibhaavram.tl@microchip.com>
Signed-off-by: Vaibhaav Ram T.L <vaibhaavram.tl@microchip.com>
Link: https://lore.kernel.org/r/20230620143520.858-2-vaibhaavram.tl@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thomas Weißschuh [Sun, 9 Jul 2023 21:18:00 +0000 (23:18 +0200)]
dyndbg: add source filename to prefix
Printing the line number without the file is of limited usefulness.
Knowing the filename also makes it also easier to relate the logged
information to the controlfile.
Example:
# modprobe test_dynamic_debug
# echo 'file test_dynamic_debug.c =pfsl' > /proc/dynamic_debug/control
# echo 1 > /sys/module/test_dynamic_debug/parameters/do_prints
# dmesg | tail -2
[ 71.802212] do_cats:lib/test_dynamic_debug.c:103: test_dd: doing categories
[ 71.802227] do_levels:lib/test_dynamic_debug.c:123: test_dd: doing levels
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Jason Baron <jbaron@akamai.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20230709-dyndbg-filename-v2-3-fd83beef0925@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thomas Weißschuh [Sun, 9 Jul 2023 21:17:59 +0000 (23:17 +0200)]
dyndbg: increase PREFIX_SIZE to 128
A follow-up patch will add the possibility to print the filename as part
of the prefix.
Increase the maximum prefix size to accommodate this.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20230709-dyndbg-filename-v2-2-fd83beef0925@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thomas Weißschuh [Sun, 9 Jul 2023 21:17:58 +0000 (23:17 +0200)]
dyndbg: constify opt_array
It is never modified, so mark it const.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20230709-dyndbg-filename-v2-1-fd83beef0925@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Fri, 28 Jul 2023 07:09:31 +0000 (09:09 +0200)]
binderfs: Drop unused #include <linux/radix-tree.h>
binderfs.c doens't use any of the symbols provided by linux/radix-tree.h
and compiles just fine without this include. So drop the #include.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230728070931.589823-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wang Ming [Thu, 13 Jul 2023 08:06:37 +0000 (16:06 +0800)]
android: Remove error checking for debugfs_create_dir()
It is expected that most callers should _ignore_ the errors
return by debugfs_create_dir() in binder_init().
Signed-off-by: Wang Ming <machel@vivo.com>
Link: https://lore.kernel.org/r/20230713080649.1893-1-machel@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kalle Valo [Thu, 27 Jul 2023 10:04:28 +0000 (13:04 +0300)]
bus: mhi: host: allow MHI client drivers to provide the firmware via a pointer
Currently MHI loads the firmware image from the path provided by client
devices. ath11k needs to support firmware image embedded along with meta
data (named as firmware-2.bin). So allow the client driver to request the
firmware file from user space on it's own and provide the firmware image
data and size to MHI via a pointer struct mhi_controller::fw_data.
This is an optional feature, if fw_data is NULL MHI load the firmware using
the name from struct mhi_controller::fw_image string as before.
Tested with ath11k and WCN6855 hw2.0.
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://lore.kernel.org/r/20230727100430.3603551-2-kvalo@kernel.org
[mani: wrapped commit message to 75 columns]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Jeffrey Hugo [Wed, 28 Jun 2023 18:23:46 +0000 (12:23 -0600)]
docs: ABI: sysfs-bus-mhi: Update contact info
@codeaurora.org email addresses are no longer valid and will bounce to
sender. Also, Bhaumik has previously indicated he is no longer interested
in participating in MHI bus discussions.
Update contact info from Bhaumik to the mhi mail list so that mails will
be routed to the MHI maintainers and interested parties.
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/20230628182346.3855-1-quic_jhugo@quicinc.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Antoniu Miclaus [Mon, 31 Jul 2023 14:44:04 +0000 (17:44 +0300)]
dt-bindings: iio: admv1014: make all regs required
Make the regulators required in the dt bindings.
Despite the fact that the datasheet is not explicit enough, all the
specifications of the part are built around these pins being supplied.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230731144404.389255-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Matti Vaittinen [Tue, 1 Aug 2023 12:02:47 +0000 (15:02 +0300)]
iio: cdc: ad7150: relax return value check for IRQ get
fwnode_irq_get[_byname]() were changed to not return 0 anymore. The
special error case where device-tree based IRQ mapping fails can't no
longer be reliably detected from this return value. This yields a
functional change in the driver where the mapping failure is treated as
an error.
The mapping failure can occur for example when the device-tree IRQ
information translation call-back(s) (xlate) fail, IRQ domain is not
found, IRQ type conflicts, etc. In most cases this indicates an error in
the device-tree and special handling is not really required.
One more thing to note is that ACPI APIs do not return zero for any
failures so this special handling did only apply on device-tree based
systems.
Drop the special handling for DT mapping failures as these can no longer
be separated from other errors at driver side. Change all failures in
IRQ getting to be handled by continuing without the events instead of
aborting the probe upon certain errors.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/3ad1c6f195ead3dfa8711235e1dead139d27f700.1690890774.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Matti Vaittinen [Tue, 1 Aug 2023 12:02:10 +0000 (15:02 +0300)]
iio: mb1232: relax return value check for IRQ get
fwnode_irq_get() was changed to not return 0 anymore.
Drop check for return value 0.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/9e18cf49a8bb581a84c3fa548ea577e2a3eb840d.1690890774.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Greg Kroah-Hartman [Mon, 31 Jul 2023 07:31:38 +0000 (09:31 +0200)]
Merge 6.5-rc4 into char-misc-next
We need the char-misc fixes in here as well for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 30 Jul 2023 20:23:47 +0000 (13:23 -0700)]
Linux 6.5-rc4
Linus Torvalds [Sun, 30 Jul 2023 19:54:31 +0000 (12:54 -0700)]
Merge tag 'spi-fix-v6.5-rc3' of git://git./linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown:
"A bunch of fixes for the Qualcomm QSPI driver, fixing multiple issues
with the newly added DMA mode - it had a number of issues exposed when
tested in a wider range of use cases, both race condition style issues
and issues with different inputs to those that had been used in test"
* tag 'spi-fix-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: spi-qcom-qspi: Add mem_ops to avoid PIO for badly sized reads
spi: spi-qcom-qspi: Fallback to PIO for xfers that aren't multiples of 4 bytes
spi: spi-qcom-qspi: Add DMA_CHAIN_DONE to ALL_IRQS
spi: spi-qcom-qspi: Call dma_wmb() after setting up descriptors
spi: spi-qcom-qspi: Use GFP_ATOMIC flag while allocating for descriptor
spi: spi-qcom-qspi: Ignore disabled interrupts' status in isr
Linus Torvalds [Sun, 30 Jul 2023 19:52:05 +0000 (12:52 -0700)]
Merge tag 'regulator-fix-v6.5-rc3' of git://git./linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown:
"A couple of small fixes for the the mt6358 driver, fixing error
reporting and a bootstrapping issue"
* tag 'regulator-fix-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: mt6358: Fix incorrect VCN33 sync error message
regulator: mt6358: Sync VCN33_* enable status after checking ID
Linus Torvalds [Sun, 30 Jul 2023 18:57:51 +0000 (11:57 -0700)]
Merge tag 'usb-6.5-rc4' of git://git./linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are a set of USB driver fixes for 6.5-rc4. Include in here are:
- new USB serial device ids
- dwc3 driver fixes for reported issues
- typec driver fixes for reported problems
- gadget driver fixes
- reverts of some problematic USB changes that went into -rc1
All of these have been in linux-next with no reported problems"
* tag 'usb-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits)
usb: misc: ehset: fix wrong if condition
usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
usb: cdns3: fix incorrect calculation of ep_buf_size when more than one config
usb: gadget: call usb_gadget_check_config() to verify UDC capability
usb: typec: Use sysfs_emit_at when concatenating the string
usb: typec: Iterate pds array when showing the pd list
usb: typec: Set port->pd before adding device for typec_port
usb: typec: qcom: fix return value check in qcom_pmic_typec_probe()
Revert "usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()"
Revert "usb: xhci: tegra: Fix error check"
USB: gadget: Fix the memory leak in raw_gadget driver
usb: gadget: core: remove unbalanced mutex_unlock in usb_gadget_activate
Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
Revert "xhci: add quirk for host controllers that don't update endpoint DCS"
USB: quirks: add quirk for Focusrite Scarlett
usb: xhci-mtk: set the dma max_seg_size
MAINTAINERS: drop invalid usb/cdns3 Reviewer e-mail
usb: dwc3: don't reset device side if dwc3 was configured as host-only
usb: typec: ucsi: move typec_set_mode(TYPEC_STATE_SAFE) to ucsi_unregister_partner()
usb: ohci-at91: Fix the unhandle interrupt when resume
...
Linus Torvalds [Sun, 30 Jul 2023 18:51:36 +0000 (11:51 -0700)]
Merge tag 'tty-6.5-rc4' of git://git./linux/kernel/git/gregkh/tty
Pull tty/serial fixes from Greg KH:
"Here are some small TTY and serial driver fixes for 6.5-rc4 for some
reported problems. Included in here is:
- TIOCSTI fix for braille readers
- documentation fix for minor numbers
- MAINTAINERS update for new serial files in -rc1
- minor serial driver fixes for reported problems
All of these have been in linux-next with no reported problems"
* tag 'tty-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: 8250_dw: Preserve original value of DLF register
tty: serial: sh-sci: Fix sleeping in atomic context
serial: sifive: Fix sifive_serial_console_setup() section
Documentation: devices.txt: reconcile serial/ucc_uart minor numers
MAINTAINERS: Update TTY layer for lists and recently added files
tty: n_gsm: fix UAF in gsm_cleanup_mux
TIOCSTI: always enable for CAP_SYS_ADMIN
Linus Torvalds [Sun, 30 Jul 2023 18:47:56 +0000 (11:47 -0700)]
Merge tag 'staging-6.5-rc4' of git://git./linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are three small staging driver fixes for 6.5-rc4 that resolve
some reported problems. These fixes are:
- fix for an old bug in the r8712 driver
- fbtft driver fix for a spi device
- potential overflow fix in the ks7010 driver
All of these have been in linux-next with no reported problems"
* tag 'staging-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER
staging: r8712: Fix memory leak in _r8712_init_xmit_priv()
Linus Torvalds [Sun, 30 Jul 2023 18:44:00 +0000 (11:44 -0700)]
Merge tag 'char-misc-6.5-rc4' of git://git./linux/kernel/git/gregkh/char-misc
Pull char driver and Documentation fixes from Greg KH:
"Here is a char driver fix and some documentation updates for 6.5-rc4
that contain the following changes:
- sram/genalloc bugfix for reported problem
- security-bugs.rst update based on recent discussions
- embargoed-hardware-issues minor cleanups and then partial revert
for the project/company lists
All of these have been in linux-next for a while with no reported
problems, and the documentation updates have all been reviewed by the
relevant developers"
* tag 'char-misc-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
misc/genalloc: Name subpools by of_node_full_name()
Documentation: embargoed-hardware-issues.rst: add AMD to the list
Documentation: embargoed-hardware-issues.rst: clean out empty and unused entries
Documentation: security-bugs.rst: clarify CVE handling
Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
Linus Torvalds [Sun, 30 Jul 2023 18:27:22 +0000 (11:27 -0700)]
Merge tag 'probes-fixes-v6.5-rc3' of git://git./linux/kernel/git/trace/linux-trace
Pull probe fixes from Masami Hiramatsu:
- probe-events: add NULL check for some BTF API calls which can return
error code and NULL.
- ftrace selftests: check fprobe and kprobe event correctly. This fixes
a miss condition of the test command.
- kprobes: do not allow probing functions that start with "__cfi_" or
"__pfx_" since those are auto generated for kernel CFI and not
executed.
* tag 'probes-fixes-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
kprobes: Prohibit probing on CFI preamble symbol
selftests/ftrace: Fix to check fprobe event eneblement
tracing/probes: Fix to add NULL check for BTF APIs
Linus Torvalds [Sun, 30 Jul 2023 18:19:08 +0000 (11:19 -0700)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm
Pull kvm fixes from Paolo Bonzini:
"x86:
- Do not register IRQ bypass consumer if posted interrupts not
supported
- Fix missed device interrupt due to non-atomic update of IRR
- Use GFP_KERNEL_ACCOUNT for pid_table in ipiv
- Make VMREAD error path play nice with noinstr
- x86: Acquire SRCU read lock when handling fastpath MSR writes
- Support linking rseq tests statically against glibc 2.35+
- Fix reference count for stats file descriptors
- Detect userspace setting invalid CR0
Non-KVM:
- Remove coccinelle script that has caused multiple confusion
("debugfs, coccinelle: check for obsolete DEFINE_SIMPLE_ATTRIBUTE()
usage", acked by Greg)"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (21 commits)
KVM: selftests: Expand x86's sregs test to cover illegal CR0 values
KVM: VMX: Don't fudge CR0 and CR4 for restricted L2 guest
KVM: x86: Disallow KVM_SET_SREGS{2} if incoming CR0 is invalid
Revert "debugfs, coccinelle: check for obsolete DEFINE_SIMPLE_ATTRIBUTE() usage"
KVM: selftests: Verify stats fd is usable after VM fd has been closed
KVM: selftests: Verify stats fd can be dup()'d and read
KVM: selftests: Verify userspace can create "redundant" binary stats files
KVM: selftests: Explicitly free vcpus array in binary stats test
KVM: selftests: Clean up stats fd in common stats_test() helper
KVM: selftests: Use pread() to read binary stats header
KVM: Grab a reference to KVM for VM and vCPU stats file descriptors
selftests/rseq: Play nice with binaries statically linked against glibc 2.35+
Revert "KVM: SVM: Skip WRMSR fastpath on VM-Exit if next RIP isn't valid"
KVM: x86: Acquire SRCU read lock when handling fastpath MSR writes
KVM: VMX: Use vmread_error() to report VM-Fail in "goto" path
KVM: VMX: Make VMREAD error path play nice with noinstr
KVM: x86/irq: Conditionally register IRQ bypass consumer again
KVM: X86: Use GFP_KERNEL_ACCOUNT for pid_table in ipiv
KVM: x86: check the kvm_cpu_get_interrupt result before using it
KVM: x86: VMX: set irr_pending in kvm_apic_update_irr
...
Linus Torvalds [Sun, 30 Jul 2023 18:12:32 +0000 (11:12 -0700)]
Merge tag 'locking_urgent_for_v6.5_rc4' of git://git./linux/kernel/git/tip/tip
Pull locking fix from Borislav Petkov:
- Fix a rtmutex race condition resulting from sharing of the sort key
between the lock waiters and the PI chain tree (->pi_waiters) of a
task by giving each tree their own sort key
* tag 'locking_urgent_for_v6.5_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
locking/rtmutex: Fix task->pi_waiters integrity
Linus Torvalds [Sun, 30 Jul 2023 18:05:35 +0000 (11:05 -0700)]
Merge tag 'x86_urgent_for_v6.5_rc4' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from Borislav Petkov:
- AMD's automatic IBRS doesn't enable cross-thread branch target
injection protection (STIBP) for user processes. Enable STIBP on such
systems.
- Do not delete (but put the ref instead) of AMD MCE error thresholding
sysfs kobjects when destroying them in order not to delete the kernfs
pointer prematurely
- Restore annotation in ret_from_fork_asm() in order to fix kthread
stack unwinding from being marked as unreliable and thus breaking
livepatching
* tag 'x86_urgent_for_v6.5_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/cpu: Enable STIBP on AMD if Automatic IBRS is enabled
x86/MCE/AMD: Decrement threshold_bank refcount when removing threshold blocks
x86: Fix kthread unwind
Linus Torvalds [Sun, 30 Jul 2023 17:59:19 +0000 (10:59 -0700)]
Merge tag 'irq_urgent_for_v6.5_rc4' of git://git./linux/kernel/git/tip/tip
Pull irq fixes from Borislav Petkov:
- Work around an erratum on GIC700, where a race between a CPU handling
a wake-up interrupt, a change of affinity, and another CPU going to
sleep can result in a lack of wake-up event on the next interrupt
- Fix the locking required on a VPE for GICv4
- Enable Rockchip 3588001 erratum workaround for RK3588S
- Fix the irq-bcm6345-l1 assumtions of the boot CPU always be the first
CPU in the system
* tag 'irq_urgent_for_v6.5_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/gic-v3: Workaround for GIC-700 erratum 2941627
irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3588S
irqchip/gic-v4.1: Properly lock VPEs when doing a directLPI invalidation
irq-bcm6345-l1: Do not assume a fixed block to cpu mapping
Tomas Winkler [Sun, 16 Jul 2023 08:10:43 +0000 (11:10 +0300)]
mei: gsc: add module description
For completeness add gsc module description.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20230716081043.3092690-4-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christophe JAILLET [Fri, 21 Jul 2023 20:26:27 +0000 (22:26 +0200)]
mei: pxp: Keep a const qualifier when calling mei_cldev_send()
The API has been fixed in commit
0912ef4855e8 ("mei: constify passed
buffers and structures"), so there is no more need to drop the const
qualifier and the comment can be removed as-well.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/23c078181575e65ff660f993bc6eb38753b3d5e7.1689971167.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Herring [Fri, 28 Jul 2023 13:48:45 +0000 (07:48 -0600)]
char: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230728134845.3224553-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Brian Norris [Mon, 24 Jul 2023 08:12:47 +0000 (16:12 +0800)]
MAINTAINERS: Add drivers/firmware/google/ entry
These are mostly used for Chrome platforms, so group it in with the same
mailing list, repo, and (one) committer.
Signed-off-by: Brian Norris <briannorris@chromium.org>
Acked-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-By: Benson Leung <bleung@chromium.org>
Acked-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20230724081247.678784-1-tzungbi@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wang Ming [Thu, 27 Jul 2023 19:37:50 +0000 (14:37 -0500)]
firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
The devm_memremap() function returns error pointers.
It never returns NULL. Fix the check.
Fixes:
7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver")
Cc: stable@vger.kernel.org
Signed-off-by: Wang Ming <machel@vivo.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20230727193750.983795-1-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Usyskin [Sun, 16 Jul 2023 08:10:42 +0000 (11:10 +0300)]
mei: obtain firmware version only on gsc.
Modern GSC firmwares have both static and dynamic MKHI clients.
Avoid expensive dynamic client call for firmware version retrieval,
in case the firmware version is already retrieved from the fix address
client in bus_fixup().
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20230716081043.3092690-3-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Usyskin [Sun, 16 Jul 2023 08:10:41 +0000 (11:10 +0300)]
mei: bus: enable asynchronous suspend.
Enable asynchronous suspend for devices on MEI bus,
required for gsc.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20230716081043.3092690-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Usyskin [Sun, 16 Jul 2023 08:10:40 +0000 (11:10 +0300)]
mei: log firmware status on hw_start failure.
In order to extend debug information log firmware status details
when waiting for firmware ready status fails.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20230716081043.3092690-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Randy Dunlap [Fri, 28 Jul 2023 01:11:20 +0000 (18:11 -0700)]
x86/APM: drop the duplicate APM_MINOR_DEV macro
This source file already includes <linux/miscdevice.h>, which contains
the same macro. It doesn't need to be defined here again.
Fixes:
874bcd00f520 ("apm-emulation: move APM_MINOR_DEV to include/linux/miscdevice.h")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: x86@kernel.org
Cc: Sohil Mehta <sohil.mehta@intel.com>
Cc: Corentin Labbe <clabbe.montjoie@gmail.com>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Link: https://lore.kernel.org/r/20230728011120.759-1-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 30 Jul 2023 03:49:13 +0000 (20:49 -0700)]
Merge tag '6.5-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fixes from Steve French:
"Four small SMB3 client fixes:
- two reconnect fixes (to address the case where non-default
iocharset gets incorrectly overridden at reconnect with the
default charset)
- fix for NTLMSSP_AUTH request setting a flag incorrectly)
- Add missing check for invalid tlink (tree connection) in ioctl"
* tag '6.5-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: add missing return value check for cifs_sb_tlink
smb3: do not set NTLMSSP_VERSION flag for negotiate not auth request
cifs: fix charset issue in reconnection
fs/nls: make load_nls() take a const parameter