Commit Graph

1266388 Commits

Author SHA1 Message Date
Thorsten Blum
203b283cc1 virt: acrn: Fix typos
- s/need/needs/
- s/No/Not/

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Link: https://lore.kernel.org/r/20240418214143.1253-3-thorsten.blum@toblux.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:59:44 +02:00
Sicong Huang
5c9c5d7f26 greybus: Fix use-after-free bug in gb_interface_release due to race condition.
In gb_interface_create, &intf->mode_switch_completion is bound with
gb_interface_mode_switch_work. Then it will be started by
gb_interface_request_mode_switch. Here is the relevant code.
if (!queue_work(system_long_wq, &intf->mode_switch_work)) {
	...
}

If we call gb_interface_release to make cleanup, there may be an
unfinished work. This function will call kfree to free the object
"intf". However, if gb_interface_mode_switch_work is scheduled to
run after kfree, it may cause use-after-free error as
gb_interface_mode_switch_work will use the object "intf".
The possible execution flow that may lead to the issue is as follows:

CPU0                            CPU1

                            |   gb_interface_create
                            |   gb_interface_request_mode_switch
gb_interface_release        |
kfree(intf) (free)          |
                            |   gb_interface_mode_switch_work
                            |   mutex_lock(&intf->mutex) (use)

Fix it by canceling the work before kfree.

Signed-off-by: Sicong Huang <congei42@163.com>
Link: https://lore.kernel.org/r/20240416080313.92306-1-congei42@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:59:41 +02:00
Huai-Yuan Liu
fbf740aeb8 ppdev: Add an error check in register_device
In register_device, the return value of ida_simple_get is unchecked,
in witch ida_simple_get will use an invalid index value.

To address this issue, index should be checked after ida_simple_get. When
the index value is abnormal, a warning message should be printed, the port
should be dropped, and the value should be recorded.

Fixes: 9a69645dde ("ppdev: fix registering same device name")
Signed-off-by: Huai-Yuan Liu <qq810974084@gmail.com>
Link: https://lore.kernel.org/r/20240412083840.234085-1-qq810974084@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:59:38 +02:00
Alexander Shishkin
f866b65322 intel_th: pci: Add Lunar Lake support
Add support for the Trace Hub in Lunar Lake.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20240429130119.1518073-16-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:23 +02:00
Alexander Shishkin
a4f813c3ec intel_th: pci: Add Meteor Lake-S CPU support
Add support for the Trace Hub in Meteor Lake-S CPU.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20240429130119.1518073-15-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:23 +02:00
Alexander Shishkin
c4a30def56 intel_th: pci: Add Meteor Lake-S support
Add support for the Trace Hub in Meteor Lake-S.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20240429130119.1518073-14-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Alexander Shishkin
2e1da7efab intel_th: pci: Add Sapphire Rapids SOC support
Add support for the Trace Hub in Sapphire Rapids SOC.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20240429130119.1518073-13-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Alexander Shishkin
854afe461b intel_th: pci: Add Granite Rapids SOC support
Add support for the Trace Hub in Granite Rapids SOC.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20240429130119.1518073-12-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Alexander Shishkin
e44937889b intel_th: pci: Add Granite Rapids support
Add support for the Trace Hub in Granite Rapids.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20240429130119.1518073-11-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Randy Dunlap
76e9f4389d intel_th: msu: Fix kernel-doc warnings
Correct function comments to prevent kernel-doc warnings
found when using "W=1".

msu.c:77: warning: Function parameter or member 'msc' not described in 'msc_window'
msu.c:122: warning: bad line:
msu.c:760: warning: No description found for return value of 'msc_configure'
msu.c:1309: warning: Function parameter or member 'nr_pages' not described in 'msc_buffer_alloc'
msu.c:1309: warning: Function parameter or member 'nr_wins' not described in 'msc_buffer_alloc'
msu.c:1309: warning: Excess function parameter 'size' description in 'msc_buffer_alloc'
msu.c:1376: warning: No description found for return value of 'msc_buffer_free_unless_used'
msu.c:1444: warning: No description found for return value of 'msc_win_to_user'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-10-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Colin Ian King
988001c735 intel_th: Remove redundant initialization of pointer outp
The pointer outp is being initialized with a value that is never
read. All the reads of outp occur after outp has neen set to an
appropriate value rather than using the first value is initialized
with. The assignment is redundant and can be removed.

Cleans up clang scan warning:
drivers/hwtracing/intel_th/sth.c:73:15: warning: Value stored to
'outp' during its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-9-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Li Zhijian
212886f5d9 intel_th: Convert sprintf/snprintf to sysfs_emit
Per filesystems/sysfs.rst, show() should only use sysfs_emit()
or sysfs_emit_at() when formatting the value to be returned to user space.

coccinelle complains that there are still a couple of functions that use
snprintf(). Convert them to sysfs_emit().

sprintf() will be converted as weel if they have.

Generally, this patch is generated by
make coccicheck M=<path/to/file> MODE=patch \
COCCI=scripts/coccinelle/api/device_attr_show.cocci

No functional change intended

Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-8-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Ricardo B. Marliere
8dc0b2d385 intel_th: Constify the struct device_type usage
Since commit aed65af1cc ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
intel_th_source_device_type, intel_th_output_device_type,
intel_th_switch_device_type and intel_th_device_type variables to be
constant structures as well, placing it into read-only memory which can not
be modified at runtime.

Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-7-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Uwe Kleine-König
1592e84c7d intel_th: 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() 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>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-6-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:22 +02:00
Mikhail Lappo
3c72059290 stm class: sys-t: Improve ftrace source handling
Package messages from ftrace source with SyS-T Structured Binary Data
(later SBD) header and 64-bit ID. This provides modification-free
compatibility between ftrace and SyS-T arguments structure by applying
0xFFFF mask on message ID.

This happens due to the fact that SBD and ftrace structures have the
same principle of data storage: <header><args binary blob>.

The headers are bit-to-bit compatible and both contain event/catalog ID
with the exception, that ftrace header contains more fields within 64
bits which needs to be masked during encoding process, since SBD
standard doesn't support mask of ID field.

        0       15  16   23  24     31  32   39  40  63
ftrace: <event_id>  <flags>  <preempt>  <-pid->  <---->
SBD:    <------- msg_id ------------------------------>

Signed-off-by: Mikhail Lappo <miklelappo@gmail.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-5-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:21 +02:00
Mikhail Lappo
ee27f44e15 stm class: Propagate source type to protocols
Pass stm source type via stm_write() to allow different handling on
protocol level.

The measure above should allow protocol level encoder to differentiate
and accordingly pack the messages. As an example SyS-T might get use of
ftrace message ID's and instead of applying regular header, pack them
as SyS-T catalog or SyS-T Structured Binary Data message to allow proper
decoding on the other side.

Signed-off-by: Mikhail Lappo <miklelappo@gmail.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-4-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:21 +02:00
Mikhail Lappo
07cf835689 stm class: Add source type
Currently kernel HW tracing infrastrtucture and specifically its SyS-T
part treats all source data in the same way. Treating and encoding
different trace data sources differently might allow decoding software
to make use of e.g. ftrace event ids by converting them to a SyS-T
message catalog.

The solution is to keep source type stored within stm_source_data
structure to allow different handling by stm output/protocol.
Currently we only differentiate between STM_USER and STM_FTRACE sources.

Signed-off-by: Mikhail Lappo <miklelappo@gmail.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-3-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:57:21 +02:00
Dan Carpenter
3df463865b stm class: Fix a double free in stm_register_device()
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: 389b6699a2 ("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>
2024-05-04 18:57:21 +02:00
Greg Kroah-Hartman
1565fce99b 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().
 -----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
  ...
2024-05-04 09:48:52 +02:00
Greg Kroah-Hartman
eacdd8e36d 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>
 -----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
2024-05-04 09:47:38 +02:00
Dimitri Fedrau
827dca3129 iio: temperature: mcp9600: Fix temperature reading for negative values
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: 3f6b9598b6 ("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>
2024-05-03 11:48:56 +01:00
Marius Cristea
51fafb3cd7 iio: adc: PAC1934: fix accessing out of bounds array index
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: 0fb528c825 ("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>
2024-05-03 11:48:56 +01:00
Jean-Baptiste Maneyrol
bf8367b00c iio: invensense: fix timestamp glitches when switching frequency
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: 0ecc363cce ("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>
2024-05-03 11:48:56 +01:00
Hagar Gamal Halim Hemdan
8003f00d89 vmci: prevent speculation leaks by sanitizing event in event_deliver()
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: 1d990201f9 ("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>
2024-05-03 07:28:53 +02:00
Krzysztof Kozlowski
35230d3105 slimbus: qcom-ctrl: fix module autoloading
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>
2024-05-03 07:28:16 +02:00
Uwe Kleine-König
880b33b058 slimbus: 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() 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>
2024-05-03 07:28:16 +02:00
Viken Dadhaniya
4286dbcecc slimbus: qcom-ngd-ctrl: Reduce auto suspend delay
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>
2024-05-03 07:28:16 +02:00
Mukesh Ojha
2a1ad6b752 nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct
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>
2024-05-03 07:26:39 +02:00
Konrad Dybcio
a5888ae5b3 dt-bindings: nvmem: Add compatible for SC8280XP
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>
2024-05-03 07:26:38 +02:00
David Collins
dc5d404351 dt-bindings: nvmem: qcom,spmi-sdam: update maintainer
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>
2024-05-03 07:26:38 +02:00
Mukesh Ojha
e2c7d6e023 dt-bindings: nvmem: Add compatible for sm8450, sm8550 and sm8650
Document QFPROM compatible for sm8450, sm8550 and sm8650 SoCs.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240430084921.33387-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-03 07:26:38 +02:00
Uwe Kleine-König
693d2f6299 nvmem: lpc18xx_eeprom: 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() 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>
2024-05-03 07:26:38 +02:00
Greg Kroah-Hartman
8d8fc146dd nvmem: core: switch to use device_add_groups()
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>
2024-05-03 07:26:38 +02:00
Krzysztof Kozlowski
154c1ec943 nvmem: sprd: fix module autoloading
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>
2024-05-03 07:26:38 +02:00
Krzysztof Kozlowski
dc3d88ade8 nvmem: sc27xx: fix module autoloading
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>
2024-05-03 07:26:38 +02:00
Krzysztof Kozlowski
23fd602f21 nvmem: layouts: sl28vpd: drop driver owner initialization
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>
2024-05-03 07:26:38 +02:00
Krzysztof Kozlowski
21833338ec nvmem: layouts: onie-tlv: drop driver owner initialization
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>
2024-05-03 07:26:38 +02:00
Krzysztof Kozlowski
6d0ca4a2a7 nvmem: layouts: store owner from modules with nvmem_layout_driver_register()
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 9447057eaf ("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>
2024-05-03 07:26:38 +02:00
Christophe JAILLET
73df3d6f2e VMCI: Fix an error handling path in vmci_guest_probe_device()
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
5ee109828e ("VMCI: dma dg: allocate send and receive buffers for DMA
datagrams")

Fixes: e283a0e8b7 ("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>
2024-05-03 07:25:28 +02:00
Greg Kroah-Hartman
d629cfcfed 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>
 -----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
  ...
2024-05-03 07:13:54 +02:00
Jonathan Cameron
9b47d9982d hwtracing: hisi_ptt: Assign parent for event_source device
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
2024-05-02 11:36:11 +01:00
Jonathan Cameron
1f82d58ddb Documentation: ABI + trace: hisi_ptt: update paths to bus/event_source
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
2024-05-02 11:36:11 +01:00
Anshuman Khandual
8877ef45ef coresight: tmc: Enable SG capability on ACPI based SoC-400 TMC ETR devices
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
2024-05-01 11:12:02 +01:00
Jean-Baptiste Maneyrol
0340dc4c82 iio: invensense: fix interrupt timestamp alignment
Restrict interrupt timestamp alignment for not overflowing max/min
period thresholds.

Fixes: 0ecc363cce ("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/20240426135814.141837-1-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-05-01 08:26:36 +01:00
Greg Kroah-Hartman
33075a03f4 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.
 -----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
2024-05-01 07:17:29 +02:00
Greg Kroah-Hartman
1ddfcad01d FPGA Manager changes for 6.10-rc1
FPGA MGR core:
 
 - Marco's change adds module owner parameter for all registration APIs.
 
 FPGA test:
 
 - Macro's change uses KUnit devices instead of platform devices.
 
 DFL:
 
 - Peter's change cleans up unused symbols.
 
 Xlinux:
 
 - Charles adds SelectMAP interface reprogramming support.
 - Andy's header inclusion cleanup.
 
 Altera:
 
 - Krzysztof & Christophe's cleanup for drivers
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYIADEWIQSgSJpClIeaArXyudb8twOBpKCM2gUCZjBbQRMceWlsdW4ueHVA
 aW50ZWwuY29tAAoJEPy3A4GkoIzaPikA/AhgKjW8PrU1V7QGLs4fI2XsXYujy64+
 RFjFqFppw9l7AP9FZRuj5wpHHXJbGCRw75JocqBxLWAVZ9cUxsaEZFE9AQ==
 =haws
 -----END PGP SIGNATURE-----

Merge tag 'fpga-for-6.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next

Xu writes:

FPGA Manager changes for 6.10-rc1

FPGA MGR core:

- Marco's change adds module owner parameter for all registration APIs.

FPGA test:

- Macro's change uses KUnit devices instead of platform devices.

DFL:

- Peter's change cleans up unused symbols.

Xlinux:

- Charles adds SelectMAP interface reprogramming support.
- Andy's header inclusion cleanup.

Altera:

- Krzysztof & Christophe's cleanup for drivers

* tag 'fpga-for-6.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga:
  fpga: region: add owner module and take its refcount
  fpga: dfl: remove unused member pdata from struct dfl_{afu,fme}
  fpga: dfl: remove unused function is_dfl_feature_present()
  fpga: ice40-spi: Don't use "proxy" headers
  fpga: tests: use KUnit devices instead of platform devices
  fpga: altera-cvp: Remove an unused field in struct altera_cvp_conf
  fpga: altera: drop driver owner assignment
  fpga: xilinx-core: add new gpio names for prog and init
  fpga: xilinx-selectmap: add new driver
  dt-bindings: fpga: xlnx,fpga-selectmap: add DT schema
  fpga: xilinx-spi: extract a common driver core
  fpga: bridge: add owner module and take its refcount
  fpga: manager: add owner module and take its refcount
2024-04-30 09:23:46 +02:00
Greg Kroah-Hartman
1245489b35 Second set of Counter updates for 6.10
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
2024-04-30 09:22:37 +02:00
Nuno Sa
561e2e3e90 iio: dac: ad9739a: write complete MU_CNT1 register during lock
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>
2024-04-29 21:11:12 +01:00
Wolfram Sang
8d0c937616 iio: pressure: zpa2326: use 'time_left' variable with wait_for_completion_interruptible_timeout()
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>
2024-04-29 21:06:18 +01:00
Wolfram Sang
b0329b3c7e iio: adc: twl6030-gpadc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
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>
2024-04-29 21:06:18 +01:00