The put_device(&stm->dev) call will trigger stm_device_release() which
frees "stm" so the vfree(stm) on the next line is a double free.
Fixes: 389b6699a2aa ("stm class: Fix stm device initialization order")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-2-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The usual mixed bag from towards the end of the cycle.
Changes since take 1. Fixed the fixes tag and indeed fixed a rebase I
messed up on the same fix.
New devices support
===================
invensense,icm42600
- Support the ICM-42686-P a high range device going up to 32g and 4000 dps
New features
============
adi,ad7944
- Add support for chain mode in which many ADCs may be daisy chained and
read out via a single long read.
adi,ad9467/backend library
- Add bus tuning related interfaces.
adi,axi-adc
- Add control for the AXI clock - seems always enabled early in boot for other
reasons, but the driver should not rely on that..
Cleanups and minor or late breaking fixes
=========================================
Micrsoft/ACPI mount matrix handling.
- Replace several implementations of the Microsoft defined ROTM ACPI
method with a single one.
multiple drivers
- Don't call the result of wait_for_completion() timeout as it's
more accurate as time_left.
adi,ad7266
- Stop setting the iio_dev->masklength as it's done by the IIO core and
should not be set from drivers.
adi,ad799x
- Some checkpatch type fixes.
adi,ad9839
- Ensure compelte MU_CNT1 is written during lock phase.
adi,axi-dac
- Fix inverted parameter.
adi,adis16475
- Drop documentation of non existent sysfs files.
avago,apds9306
- Fix an off by one error that overly restricts the range of persistence
and adaptive thresholds that the driver accepts.
freescale,mxs-lradc
- Stop setting the iio_dev->masklength as it's done by the IIO core and
should not be set from drivers.
invensense,timestamp library
- Fix timestamp vs interupt alignment and aovid soms glitches that
occured when switching sampling frequency.
microchip,mcp3564
- Make use of device_for_each_child_node_scoped() to allow early release
without manual fwnode_handle_put().
microchip,mcp9600
- Allow for negative temperatures.
microchip,pac1934
- Avoid an out of bounds array index.
richtek,rtq6056
- Use iio_device_claim_direct_scoped() to automate lock release and simplify
the code.
sensortek,stk3110
- Drop a likely incorrect ACPI ID. No known users of this ID and it's
not a valid ACPI ID.
ti,ads1015
- Make use of device_for_each_child_node_scoped() to allow early release
without manual fwnode_handle_put().
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmY1LaoRHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FojEZA//escavmkn31Q+hQFjaiYsr4YiLFMH2n4a
qvRoiEoJgE9b1NDBzECSwN4OKqSZVlUxlX02wp2ntBWFFR5s1bXQKP1AL6QDpbgw
Fc2BtJqoUvZ4E983NCmABCCln20Xyp1OqKYYkbwEINkL6yrr0/rOHHD4iXz++dhh
QK1dmyUXuHqUbcF+yYJpo0WszWJjKJ0mwJi507v1KeDQPJWx5pygkPFgoJYluxvs
iV525ZdOr4uNu30NbS4Rsh/RSJN9a+7VVJaYQBUsfLNf3/Z0xiM9OBTtiKUZt3k0
olL6qo/B+/Akyo9ftch0sbUPrULR9LEPC8ue/XYc8fbVhaJ6Y6/6/5LHK9VV3MCR
4ygJb7e5ohlaiYcSQeraxATgqRX1qXMHwfcQOjS6LJ3VDTo+Uu6eQhkCcMyuoefk
/cO12Z9F6CPCfo2aXAdT6ehnGhwwoWAZvTIHiaIairiWNyl39BNe0+Px8M6TUdZt
rSICiVZLu4j6lMBlMJymH6Y63t/F7vNmLBUSgnHvuolvq9xAyBiWfuNd1EdhhCt7
ynt/AEb3y9HcDrEEkcSEbbeuvLkKHI5KoZ7zeZgOc5Po8n8o/3Kle6W2Q6pZvWNN
/5HlDRvhbpZXcAwXrtX8RjIfq/broFI4JkIhoPx0dNwtJYbJtEDHQgNG1jH/UGOE
DCl7Cyu2RpA=
=2jqG
-----END PGP SIGNATURE-----
Merge tag 'iio-for-6.10b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
IIO: 2nd set of new device support, features and cleanup for 6.10 (take 2)
The usual mixed bag from towards the end of the cycle.
Changes since take 1. Fixed the fixes tag and indeed fixed a rebase I
messed up on the same fix.
New devices support
===================
invensense,icm42600
- Support the ICM-42686-P a high range device going up to 32g and 4000 dps
New features
============
adi,ad7944
- Add support for chain mode in which many ADCs may be daisy chained and
read out via a single long read.
adi,ad9467/backend library
- Add bus tuning related interfaces.
adi,axi-adc
- Add control for the AXI clock - seems always enabled early in boot for other
reasons, but the driver should not rely on that..
Cleanups and minor or late breaking fixes
=========================================
Micrsoft/ACPI mount matrix handling.
- Replace several implementations of the Microsoft defined ROTM ACPI
method with a single one.
multiple drivers
- Don't call the result of wait_for_completion() timeout as it's
more accurate as time_left.
adi,ad7266
- Stop setting the iio_dev->masklength as it's done by the IIO core and
should not be set from drivers.
adi,ad799x
- Some checkpatch type fixes.
adi,ad9839
- Ensure compelte MU_CNT1 is written during lock phase.
adi,axi-dac
- Fix inverted parameter.
adi,adis16475
- Drop documentation of non existent sysfs files.
avago,apds9306
- Fix an off by one error that overly restricts the range of persistence
and adaptive thresholds that the driver accepts.
freescale,mxs-lradc
- Stop setting the iio_dev->masklength as it's done by the IIO core and
should not be set from drivers.
invensense,timestamp library
- Fix timestamp vs interupt alignment and aovid soms glitches that
occured when switching sampling frequency.
microchip,mcp3564
- Make use of device_for_each_child_node_scoped() to allow early release
without manual fwnode_handle_put().
microchip,mcp9600
- Allow for negative temperatures.
microchip,pac1934
- Avoid an out of bounds array index.
richtek,rtq6056
- Use iio_device_claim_direct_scoped() to automate lock release and simplify
the code.
sensortek,stk3110
- Drop a likely incorrect ACPI ID. No known users of this ID and it's
not a valid ACPI ID.
ti,ads1015
- Make use of device_for_each_child_node_scoped() to allow early release
without manual fwnode_handle_put().
* tag 'iio-for-6.10b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (41 commits)
iio: temperature: mcp9600: Fix temperature reading for negative values
iio: adc: PAC1934: fix accessing out of bounds array index
iio: invensense: fix timestamp glitches when switching frequency
iio: invensense: fix interrupt timestamp alignment
iio: dac: ad9739a: write complete MU_CNT1 register during lock
iio: pressure: zpa2326: use 'time_left' variable with wait_for_completion_interruptible_timeout()
iio: adc: twl6030-gpadc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
iio: adc: stm32-dfsdm-adc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
iio: adc: stm32-adc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
iio: adc: intel_mrfld_adc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
iio: adc: fsl-imx25-gcq: use 'time_left' variable with wait_for_completion_interruptible_timeout()
iio: adc: exynos_adc: use 'time_left' variable with wait_for_completion_timeout()
iio: adc: ad_sigma_delta: use 'time_left' variable with wait_for_completion_timeout()
iio: adc: ti-ads1015: use device_for_each_child_node_scoped()
iio: adc: ad799x: Prefer to use octal permission
iio: adc: ad799x: add blank line to avoid warning messages
iio: adc: ad799x: change 'unsigned' to 'unsigned int' declaration
iio: adc: mcp3564: Use device_for_each_child_node_scoped()
iio: adc: ad9467: support digital interface calibration
iio: adc: adi-axi-adc: support digital interface calibration
...
This pull request contains the interconnect changes for the 6.10-rc1 merge
window. It contains some small driver changes listed below:
Driver changes:
- Cleanup sm6115 QoS port numbering.
- Fix incorrect port value in qcm2290 driver.
Signed-off-by: Georgi Djakov <djakov@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJmNK6fAAoJEIDQzArG2BZjYtQP/3SjjMcXKV0eDjrH1AKwbg+c
B3ePdDExkKa5sDi2X4a2TEz/cQD8pVb8BhtI7SR4uqbsYGHHAAqeXvPz2fw6am0z
XVAMFZ6CkQIBDAIxJ0rPjc3LJ8GxXjipFnI0L5hLFRjNmGV9r7TS3Q7m/1OrTLHm
YP6sS5LvPm0nfJfaELI+WPdO3mTol48owV5CDkkFwMWMB3E9kf/hTaBcP+q9h+5b
Kr92jH4jq5cwp57mfIUXZlohK0S8owJutk3aCB1uC7eun9HFKvb1ejKl4GXowbPi
SUC5FZwA/GThvMjVhbF2qcuzg6QGaR6HhnvAwHCmusXek1p7DwpHx/LUq7m6pv70
YYHwoe9cepL/Oii1fuUmveW23fzHWXcryv1zucB5o4hqTDFxSUL5ctHTpFiULrYx
kkRiNIwc6VusH6sJ2jYqG/L+TBnkEiiuQ/Pl2kmtwqlJ7n1JqbFq4XNHfknfnWIb
35rqZ1jommQ1eR2Z6suCyOSCBOuC0YwNknVjshpGDzfn+6m5bNnQDYgi44TfYenA
d3jSkxO3VixEIIYgnILoKxa2NepBhwGMJTcpFbvvaA9zeSHGoE4QSk4iA2cwV6Fp
SM0Ovbw1fN22efyEcbCLlQbVLQ4CN2+w+lnjcTSI9CONlopo0hCjw/rMdkUVlX7a
9jlmrMZEY0NwmrqyxEbo
=UapV
-----END PGP SIGNATURE-----
Merge tag 'icc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next
Georgi writes:
interconnect changes for 6.10
This pull request contains the interconnect changes for the 6.10-rc1 merge
window. It contains some small driver changes listed below:
Driver changes:
- Cleanup sm6115 QoS port numbering.
- Fix incorrect port value in qcm2290 driver.
Signed-off-by: Georgi Djakov <djakov@kernel.org>
* tag 'icc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment
interconnect: qcom: sm6115: Unspaghettify SNoC QoS port numbering
Temperature is stored as 16bit value in two's complement format. Current
implementation ignores the sign bit. Make it aware of the sign bit by
using sign_extend32.
Fixes: 3f6b9598b6df ("iio: temperature: Add MCP9600 thermocouple EMF converter")
Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Tested-by: Andrew Hepp <andrew.hepp@ahepp.dev>
Link: https://lore.kernel.org/r/20240424185913.1177127-1-dima.fedrau@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Fix accessing out of bounds array index for average
current and voltage measurements. The device itself has
only 4 channels, but in sysfs there are "fake"
channels for the average voltages and currents too.
Fixes: 0fb528c8255b ("iio: adc: adding support for PAC193x")
Reported-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Marius Cristea <marius.cristea@microchip.com>
Closes: https://lore.kernel.org/linux-iio/20240405-embellish-bonnet-ab5f10560d93@wendy/
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240425114232.81390-1-marius.cristea@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
When a sensor is running and there is a FIFO frequency change due to
another sensor turned on/off, there are glitches on timestamp. Fix that
by using only interrupt timestamp when there is the corresponding sensor
data in the FIFO.
Delete FIFO period handling and simplify internal functions.
Update integration inside inv_mpu6050 and inv_icm42600 drivers.
Fixes: 0ecc363ccea7 ("iio: make invensense timestamp module generic")
Cc: Stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240426094835.138389-1-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Coverity spotted that event_msg is controlled by user-space,
event_msg->event_data.event is passed to event_deliver() and used
as an index without sanitization.
This change ensures that the event index is sanitized to mitigate any
possibility of speculative information leaks.
This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.
Only compile tested, no access to HW.
Fixes: 1d990201f9bb ("VMCI: event handling implementation.")
Cc: stable <stable@kernel.org>
Signed-off-by: Hagar Gamal Halim Hemdan <hagarhem@amazon.com>
Link: https://lore.kernel.org/stable/20231127193533.46174-1-hagarhem%40amazon.com
Link: https://lore.kernel.org/r/20240430085916.4753-1-hagarhem@amazon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table. Pin controllers are
considered core components, so usually they are built-in, however these
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430091657.35428-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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() will be renamed to .remove().
Trivially convert the slimbus drivers 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>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430091657.35428-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Currently we have auto suspend delay of 1s which is
very high and it takes long time to driver for runtime
suspend after use case is done.
Hence to optimize runtime PM ops, reduce auto suspend
delay to 100ms.
Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430091657.35428-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
nvmem_device is used at one place while registering nvmem
device and it is not required to be present in efuse struct
for just this purpose.
Drop nvmem_device and manage with nvmem device stack variable.
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-12-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Document the QFPROM block found on SC8280XP.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-11-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emails to Shyam bounce (reason: 585 5.1.1 <sthella@codeaurora.org>:
Recipient address rejected: undeliverable address: No such user here.)
so change the maintainer to be me. I work on qcom,spmi-sdam as well
as other PMIC peripheral devices.
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-10-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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() will be 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>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-8-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
devm_device_add_groups() is being removed from the kernel, so move the
nvmem driver to use device_add_groups() instead. The logic is
identical, when the device is removed the driver core will properly
clean up and remove the groups, and the memory used by the attribute
groups will be freed because it was created with dev_* calls, so this is
functionally identical overall.
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240430084921.33387-7-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-6-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Core in nvmem_layout_driver_register() already sets the .owner, so
driver does not need to.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Core in nvmem_layout_driver_register() already sets the .owner, so
driver does not need to.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Modules registering driver with nvmem_layout_driver_register() might
forget to set .owner field. The field is used by some of other kernel
parts for reference counting (try_module_get()), so it is expected that
drivers will set it.
Solve the problem by moving this task away from the drivers to the core
code, just like we did for platform_driver in
commit 9447057eaff8 ("platform_device: use a macro instead of
platform_driver_register").
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
After a successful pci_iomap_range() call, pci_iounmap() should be called
in the error handling path, as already done in the remove function.
Add the missing call.
The corresponding call was added in the remove function in commit
5ee109828e73 ("VMCI: dma dg: allocate send and receive buffers for DMA
datagrams")
Fixes: e283a0e8b7ea ("VMCI: dma dg: add MMIO access to registers")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Vishnu Dasa <vishnu.dasa@broadcom.com>
Link: https://lore.kernel.org/r/a35bbc3876ae1da70e49dafde4435750e1477be3.1713961553.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CoreSight/hwtracing updates for the next release includes:
- ACPI power management support for CoreSight legacy components, via migration
from AMBA to platform device
- Fixes for ETE register save/restore during CPU Idle.
- ACPI support TMC for Scatter-Gather mode.
- his_ptt driver update to set the parent device for PMU and documentation fixes
- Qcomm Trace component DT binding fixes
- Miscellaneous cleanups
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEuFy0byloRoXZHaWBxcXRZPKyBqEFAmYzcecACgkQxcXRZPKy
BqEyrw//fsxpXrjt9Uz1QSmpEH+5eV//RQIO8vOOibihLrQYYMl8ZrwHp1n0lS0B
Cj9P6MIRs8XztOBh5f0w57NoUOD9eJJ4/BdPRpixDPyZsm3acV/7JFMh1TIYQG6z
ETlRGr5GRlLlx6VXkytMVfxRCtNlPR3PA3/fy5QR5BQ74ux+AlxuiX5krk6pEvak
j8Vf35eNofqIDjNvr8ffY59kxDP+ULtiv+JWfAW+hzjjlQd+RxyamLUSJHr5Mh1N
AqFjt+bqCVoT7MdtZoCrLX1b4gcgi1W/55Ph3ODdvy9vwErj2MpaNAW4829I5m1l
dK5WmXFSQ/vb6UGj5laIu4ssZ0sMShu4jzatiGBBSo4FwAazSg2Lk3F6gNhXHBE2
iyrU+Pr8mRnxh59FDtnldCD1ww0cUPZOQz29aNwNy1x52nkeEMOg2KYx3sXy/Sbx
TK5qJ7Fv6DOEZ/fWDPxvZjKM8IbsvJI2XTL7WyyCt3hOT+bcdzQIwnlS8q+EdBL/
zk/HAdb6/IA1vyg3kgmTCejC0EXwklME01UTs591HQ6U0iG+YxlklFFXLL9sw4Ij
v6FVAbrtsgC8ov9UtmECqvjUlkZ5pwXkFU0php51R0MKvOWEU7vSxhtIjzvTumhu
/lxyAQA+V112RWQS3nlxmUq3FWbqXIiFZSo1zvTavhxOtMVg06s=
=yu6I
-----END PGP SIGNATURE-----
Merge tag 'coresight-next-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next
Suzuki writes:
coresight: hwtracing subsystem updates for v6.10
CoreSight/hwtracing updates for the next release includes:
- ACPI power management support for CoreSight legacy components, via migration
from AMBA to platform device
- Fixes for ETE register save/restore during CPU Idle.
- ACPI support TMC for Scatter-Gather mode.
- his_ptt driver update to set the parent device for PMU and documentation fixes
- Qcomm Trace component DT binding fixes
- Miscellaneous cleanups
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
* tag 'coresight-next-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: (28 commits)
hwtracing: hisi_ptt: Assign parent for event_source device
Documentation: ABI + trace: hisi_ptt: update paths to bus/event_source
coresight: tmc: Enable SG capability on ACPI based SoC-400 TMC ETR devices
coresight: Docs/ABI/testing/sysfs-bus-coresight-devices: Fix spelling errors
coresight: tpiu: Convert to platform remove callback returning void
coresight: tmc: Convert to platform remove callback returning void
coresight: stm: Convert to platform remove callback returning void
coresight: debug: Convert to platform remove callback returning void
coresight: catu: Convert to platform remove callback returning void
coresight: Remove duplicate linux/amba/bus.h header
coresight: stm: Remove duplicate linux/acpi.h header
coresight: etm4x: Fix access to resource selector registers
coresight: etm4x: Safe access for TRCQCLTR
coresight: etm4x: Do not save/restore Data trace control registers
coresight: etm4x: Do not hardcode IOMEM access for register restore
coresight: debug: Move ACPI support from AMBA driver to platform driver
coresight: stm: Move ACPI support from AMBA driver to platform driver
coresight: tmc: Move ACPI support from AMBA driver to platform driver
coresight: tpiu: Move ACPI support from AMBA driver to platform driver
coresight: catu: Move ACPI support from AMBA driver to platform driver
...
Currently the PMU device appears directly under /sys/devices/
Only root busses should appear there, so instead assign the pmu->dev
parent to be the PCI device.
Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240412161057.14099-31-Jonathan.Cameron@huawei.com
To allow for assigning a suitable parent to the struct pmu device
update the documentation to describe the device via the event_source
bus where it will remain accessible.
For the ABI documention file also rename the file as it is named
after the path.
Reviewed-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240412161057.14099-30-Jonathan.Cameron@huawei.com
This detects and enables the scatter gather capability (SG) on ACPI based
Soc-400 TMC ETR devices via a new property called 'arm-armhc97c-sg-enable'.
The updated ACPI spec can be found below, which contains this new property.
https://developer.arm.com/documentation/den0067/latest/
This preserves current handling for the property 'arm,scatter-gather' both
on ACPI and DT based platforms i.e the presence of the property is checked
instead of the value.
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: James Clark <james.clark@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240404072934.940760-1-anshuman.khandual@arm.com
========
- Added a new API mhi_power_down_keep_dev() to not destroy the struct dev
associated with the MHI channels during MHI power down. This is useful in
scenarios such as system suspend/hibernation where the probability of
channels coming back is very high. So the PM maintainer suggested not to
destroy the struct dev in those cases.
This API is introduced for fixing the failure reported in the ath11k driver
during resume from system suspend.
NOTE: Due to the API dependency, the patch adding the API is pushed to an
immutable branch (mhi-immutable) and merged into both mhi and ath trees. But
the merge commit is not visible in mhi tree due to git being smart with
'fast-forward'.
- Added an optional sysfs entry to force the MHI devices to enter the Emergency
Download (EDL) mode to download the firmware from host.
- Added EDL mode support for Qcom SDX75/65/55 modems as per the MHI spec v1.2,
Chapter 13.2. This involves writing a cookie to the EDL doorbell registers and
then triggering the device reset from host.
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEZ6VDKoFIy9ikWCeXVZ8R5v6RzvUFAmYxxQoACgkQVZ8R5v6R
zvX1EggAmWakz+JrSzSJMkoc0aQDrtpfclnVnuSh0hcH/ospNw9N09AmnadFmKJN
Q9ALHlM9cI+YcgpZsfr+B6OPJj4U2Oieq9ynMbn4RdVPKeN2kwnjfUBtlVKJqwvU
+dt+k/WKgfxIMPnNSOclpG+KI8syZZASIaA2zEV1Xq3zBVWXmgzyswCMG7/VIcsL
ByEb4m0ZZLS7W/T2xqXbf26Www1BCkqK0kCLIb8JGOTNZW8gtOQyjY5ceeE2VVR0
8T0/8LAvzmXE+0QpwnwLm6TlW8nubCEA4aiULpswrSPpsrdNi+ma2s+ggiPDK3N4
pewlUkKo2BbCSLl5zFK+X9aS6ze5Mg==
=ktJy
-----END PGP SIGNATURE-----
Merge tag 'mhi-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next
Manivannan writes:
MHI Host
========
- Added a new API mhi_power_down_keep_dev() to not destroy the struct dev
associated with the MHI channels during MHI power down. This is useful in
scenarios such as system suspend/hibernation where the probability of
channels coming back is very high. So the PM maintainer suggested not to
destroy the struct dev in those cases.
This API is introduced for fixing the failure reported in the ath11k driver
during resume from system suspend.
NOTE: Due to the API dependency, the patch adding the API is pushed to an
immutable branch (mhi-immutable) and merged into both mhi and ath trees. But
the merge commit is not visible in mhi tree due to git being smart with
'fast-forward'.
- Added an optional sysfs entry to force the MHI devices to enter the Emergency
Download (EDL) mode to download the firmware from host.
- Added EDL mode support for Qcom SDX75/65/55 modems as per the MHI spec v1.2,
Chapter 13.2. This involves writing a cookie to the EDL doorbell registers and
then triggering the device reset from host.
* tag 'mhi-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi:
bus: mhi: host: pci_generic: Add generic edl_trigger to allow devices to enter EDL mode
bus: mhi: host: Add a new API for getting channel doorbell offset
bus: mhi: host: Add sysfs entry to force device to enter EDL
bus: mhi: host: Add mhi_power_down_keep_dev() API to support system suspend/hibernation
Counter header file is updated to include only headers that are actually
use.
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZjAh3gAKCRC1SFbKvhIj
K1tHAQC8AApDIWPiiDvE0equxyIYlxIvSOrMbpl9VF3Wns6HtQD+JlAJGb2ApmEa
8KsbxFXC1JjoShI5gpmNA32+6gN88w4=
=+hBX
-----END PGP SIGNATURE-----
Merge tag 'counter-updates-for-6.10b' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next
William writes:
Second set of Counter updates for 6.10
Counter header file is updated to include only headers that are actually
use.
* tag 'counter-updates-for-6.10b' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter:
counter: Don't use "proxy" headers
As specified by the datasheet we should write the value 0x3 (enable
plus tracking gain) into the MU_CNT1 register during the MU lock phase.
Currently we were only setting the enable bit (bit 0) as the tracking
gain default value is already set to 1. While we should be mostly fine
in assuming the tracking gain will have the value it should, better to
explicitly write it. On top of that the datasheet also states to
re-attempt the writes in case the lock fails which we were not doing for
the tracking gain bit.
Lastly, the recommended value for the MU phase slope lock (bit 6) is 0
but for some reason the default value is 1 and hence, we were not
changing it accordingly.
Note there was no problem with the MU lock mechanism so this is not
being treated as a fix but rather an improvement.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240429-ad9739a-improv-v1-1-c076a06a697d@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:
timeout = wait_for_completion_interruptible_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-9-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:
timeout = wait_for_completion_interruptible_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-8-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:
timeout = wait_for_completion_interruptible_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-7-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:
timeout = wait_for_completion_interruptible_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-6-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:
timeout = wait_for_completion_interruptible_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-5-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:
timeout = wait_for_completion_interruptible_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-4-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:
timeout = wait_for_completion_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-3-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:
timeout = wait_for_completion_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240429113313.68359-2-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This loop definition removes the need for manual releasing of the
fwnode_handle in early exit paths (here an error path) allow
simplification of the code and reducing the chance of future
modifications not releasing fwnode_handle correctly.
Co-developed-by: Luiza Soezima <lbrsoezima@usp.br>
Signed-off-by: Luiza Soezima <lbrsoezima@usp.br>
Co-developed-by: Sabrina Araujo <sabrinaaraujo@usp.br>
Signed-off-by: Sabrina Araujo <sabrinaaraujo@usp.br>
Signed-off-by: Lincoln Yuji <lincolnyuji@usp.br>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20240429132233.6266-1-lincolnyuji@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Octal permissions are preferred over the symbolics ones
for readbility. This ceases warning message pointed by checkpatch.
Co-developed-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Gustavo Rodrigues <ogustavo@usp.br>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240428194326.2836387-4-ogustavo@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Add a blank line before if statement to avoid warning messages pointed by
checkpatch.
Co-developed-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Gustavo Rodrigues <ogustavo@usp.br>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240428194326.2836387-3-ogustavo@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Prefer 'unsigned int' instead of bare use of 'unsigned' declarations to
to improve code readbility. This ceases one of the warning messages
pointed by checkpatch.
Co-developed-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Gustavo Rodrigues <ogustavo@usp.br>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240428194326.2836387-2-ogustavo@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Switching to the _scoped() version removes the need for manual
calling of fwnode_handle_put() in the paths where the code
exits the loop early. In this case that's all in error paths.
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reviewed-by: Marius Cristea <marius.cristea@microchip.com>
Link: https://lore.kernel.org/r/20240428174020.1832825-2-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To make sure that we have the best timings on the serial data interface
we should calibrate it. This means going through the device supported
values and see for which ones we get a successful result. To do that, we
use a prbs test pattern both in the IIO backend and in the frontend
devices. Then for each of the test points we see if there are any
errors. Note that the backend is responsible to look for those errors.
As calibrating the interface also requires that the data format is disabled
(the one thing being done in ad9467_setup()), ad9467_setup() was removed
and configuring the data fomat is now part of the calibration process.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-7-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Implement the new IIO backend APIs for calibrating the data
digital interfaces.
While at it, removed the tabs in 'struct adi_axi_adc_state' and used
spaces for the members.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-6-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
In one of the following patches, we'll have some new functionality that
requires reads/writes on registers bigger than 0x8000. Hence, as this is
an highly flexible core, don't bother in setting 'max_register' and
remove it from regmap_config.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-5-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This is in preparation for supporting interface tuning in one for the
devices using the axi-adc backend. The new added interfaces are all
needed for that calibration:
* iio_backend_test_pattern_set();
* iio_backend_chan_status();
* iio_backend_iodelay_set();
* iio_backend_data_sample_trigger().
Interface tuning is the process of going through a set of known points
(typically by the frontend), change some clk or data delays (or both)
and send/receive some known signal (so called test patterns in this
change). The receiving end (either frontend or the backend) is
responsible for validating the signal and see if it's good or not. The
goal for all of this is to come up with ideal delays at the data
interface level so we can have a proper, more reliable data transfer.
Also note that for some devices we can change the sampling rate
(which typically means changing some reference clock) and that can
affect the data interface. In that case, it's import to run the tuning
algorithm again as the values we had before may no longer be the best (or
even valid) ones.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-2-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Using tabs and maintaining the start of the docs aligned is a pain and
may lead to lot's of unrelated changes when adding new members. Hence,
let#s change things now and just have a simple space after the member
name.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-1-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
We can only access the IP core registers if the bus clock is enabled. As
such we need to get and enable it and not rely on anyone else to do it.
Note this clock is a very fundamental one that is typically enabled
pretty early during boot. Independently of that, we should really rely on
it to be enabled.
Fixes: ef04070692a2 ("iio: adc: adi-axi-adc: add support for AXI ADC IP core")
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-4-6361fc3ba1cc@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>