Uwe Kleine-König [Wed, 21 Feb 2024 09:53:51 +0000 (10:53 +0100)]
misc: sram: 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: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/946ebc33a01bf700171257cd219fbe8626bc0c99.1708508896.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Wed, 21 Feb 2024 09:53:50 +0000 (10:53 +0100)]
misc: open-dice: 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: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/8e7179794ffbcaa4ad3d0db50cc4aa03f377fc8c.1708508896.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Wed, 21 Feb 2024 09:53:49 +0000 (10:53 +0100)]
mei: vsc: 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: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/8e14f0b1cea107e613fa0075b3379a9f1e7ef63f.1708508896.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Wed, 21 Feb 2024 09:53:48 +0000 (10:53 +0100)]
misc: hisi_hikey_usb: 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: John Stultz <jstultz@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/8775e9573fec55c5fc04151800829e9aeafc5dda.1708508896.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Wed, 21 Feb 2024 09:53:47 +0000 (10:53 +0100)]
misc: fastrpc: 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: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/d138bc7f6ec39038d2b5a23478fc036a41988bde.1708508896.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Wed, 21 Feb 2024 09:53:46 +0000 (10:53 +0100)]
cxl: 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: Andrew Donnellan <ajd@linux.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/add08320eef9ea20ceca78648370590a4bd447b0.1708508896.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Wed, 21 Feb 2024 09:53:45 +0000 (10:53 +0100)]
misc: atmel-ssc: 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: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/45719fc31bb893bb9ab1450057e9cb7f399e9ee2.1708508896.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Shevchenko [Mon, 4 Mar 2024 18:08:29 +0000 (20:08 +0200)]
misc: hisi_hikey_usb: Remove unused of_gpio.h
of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/r/20240304180829.1201726-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Shevchenko [Mon, 4 Mar 2024 18:07:37 +0000 (20:07 +0200)]
misc: hi6421-spmi-pmic: Remove unused of_gpio.h
of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240304180737.1201566-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Shevchenko [Mon, 4 Mar 2024 18:06:43 +0000 (20:06 +0200)]
misc: eeprom_93xx46: Remove unused of_gpio.h
of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240304180643.1201319-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sakari Ailus [Mon, 19 Feb 2024 19:58:07 +0000 (21:58 +0200)]
mei: vsc: Assign pinfo fields in variable declaration
Assign all possible fields of pinfo in variable declaration, instead of
just zeroing it there.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com>
Link: https://lore.kernel.org/r/20240219195807.517742-4-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sakari Ailus [Mon, 19 Feb 2024 19:58:06 +0000 (21:58 +0200)]
mei: vsc: Don't use sleeping condition in wait_event_timeout()
vsc_tp_wakeup_request() called wait_event_timeout() with
gpiod_get_value_cansleep() which may sleep, and does so as the
implementation is that of gpio-ljca.
Move the GPIO state check outside the call.
Fixes:
566f5ca97680 ("mei: Add transport driver for IVSC device")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com>
Link: https://lore.kernel.org/r/20240219195807.517742-3-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sakari Ailus [Mon, 19 Feb 2024 19:58:05 +0000 (21:58 +0200)]
mei: vsc: Call wake_up() in the threaded IRQ handler
The hard IRQ handler vsc_tp_irq() is called with a raw spinlock taken.
wake_up() acquires a spinlock, a sleeping lock on PREEMPT_RT. This leads
to sleeping in atomic context.
Move the wake_up() call to the threaded IRQ handler vsc_tp_thread_isr()
where it can be safely called.
Fixes:
566f5ca97680 ("mei: Add transport driver for IVSC device")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com>
Link: https://lore.kernel.org/r/20240219195807.517742-2-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bjorn Helgaas [Thu, 29 Feb 2024 18:13:00 +0000 (12:13 -0600)]
mei: me: remove unnecessary NULL pointer checks
The .shutdown(), .remove(), and power management callbacks are never called
unless .probe() has already returned success, which means it has set
drvdata to a non-NULL pointer, so "dev" can never be NULL in the other
callbacks.
Remove the unnecessary checks.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20240229181300.352077-4-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bjorn Helgaas [Thu, 29 Feb 2024 18:12:59 +0000 (12:12 -0600)]
mei: txe: remove unnecessary NULL pointer checks
The .shutdown(), .remove(), and power management callbacks are never called
unless .probe() has already returned success, which means it has set
drvdata to a non-NULL pointer, so "dev" can never be NULL in the other
callbacks.
Remove the unnecessary checks.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20240229181300.352077-3-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bjorn Helgaas [Thu, 29 Feb 2024 18:12:58 +0000 (12:12 -0600)]
mei: gsc: remove unnecessary NULL pointer checks
The .remove() and power management callbacks are never called unless
.probe() has already returned success, which means it has set drvdata to a
non-NULL pointer, so "dev" can never be NULL in the other callbacks.
Remove the unnecessary checks.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20240229181300.352077-2-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Sat, 2 Mar 2024 19:02:18 +0000 (20:02 +0100)]
Merge tag 'iio-for-6.9b' of https://git./linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
IIO: 2nd set of new device support, cleanups and features for 6.9
New device support
=================
adi,hmc425a
- Add support for LTC6373 Instrumentation Amplifier.
microchip,pac1934
- New driver supporting PAC1931, PAC1932, PAC1933 and PAC1934 power monitoring
chips with accumulators.
voltafield,af8133j
- New driver for the AF8133J 3 axis magnetometer.
Docs
====
New general documentation of device buffers, and a specific section on
the adi,adis16475 IMU
Features
========
kionix,kxcjk-1013
- Add support for ACPI ROTM (Microsoft defined ACPI method) to get rotation
matrix.
ti,tmp117
- Add missing vcc-supply control and binding.
Cleanups and minor fixes
========================
Tree-wide
- Corrected headers to remove linux/of.h from a bunch of drivers
that only had it to get to linux/mod_devicetable.h
- dt binding cleanup to drop redundant type from label properties.
adi,hmc425a
- Fix constraints on GPIO array sizes for different devices.
adi,ltc2983
- Use spi_get_device_match_data instead of open coding similar.
- Update naming of fw parsing function to reflect that it is not longer
dt only.
- Set the chip name explicitly to reduce fragility resulting from different
entries in the various ID tables.
bosch,bmg160
- Add spi-max-frequency property and limit to dt-binding.
microchip,mcp320x
- Use devm_* to simplify device removal and error handling.
nxp,imx93
- Drop a non existent 4th interrupt from bindings.
qcom,mp8xxx-xoadc
- Drop unused kerneldoc
renesas,isl29501
- Actually use the of_match table.
rockchip,saradc
- Fix channel bitmask
- Fix write masks
- Replace custom handling of optional reset control with how it should be
done.
ti,ads1298
- Fix error code to not return a successfully obtained regulator.
- Avoid a divide by zero when setting frequency.
ti,hdc2010
- Add missing interrupts dt binding property
vishay,veml6075
- Make vdd-supply required in the dt-binding.
* tag 'iio-for-6.9b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (42 commits)
dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency
dt-bindings: iio: adc: imx93: drop the 4th interrupt
iio: proximity: isl29501: make use of of_device_id table
iio: adc: qcom-pm8xxx-xoadc: drop unused kerneldoc struct pm8xxx_chan_info member
dt-bindings: iio: adc: drop redundant type from label
dt-bindings: iio: ti,tmp117: add optional label property
MAINTAINERS: Add an entry for AF8133J driver
iio: magnetometer: add a driver for Voltafield AF8133J magnetometer
dt-bindings: iio: magnetometer: Add Voltafield AF8133J
dt-bindings: vendor-prefix: Add prefix for Voltafield
iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive
iio: adc: rockchip_saradc: use mask for write_enable bitfield
iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2
dt-bindings: iio: light: vishay,veml6075: make vdd-supply required
iio: adc: adding support for PAC193x
dt-bindings: iio: adc: adding support for PAC193X
iio: temperature: ltc2983: explicitly set the name in chip_info
iio: temperature: ltc2983: rename ltc2983_parse_dt()
iio: temperature: ltc2983: make use of spi_get_device_match_data()
iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq()
...
Greg Kroah-Hartman [Sat, 2 Mar 2024 19:01:17 +0000 (20:01 +0100)]
Merge tag 'fpga-for-6.9-rc1' of git://git./linux/kernel/git/fpga/linux-fpga into char-misc-next
Xu writes:
FPGA Manager changes for 6.9-rc1
DFL:
- Ricardo's change makes dfl_bus_type const.
FPGA MGR core:
- Marco's change removes redundant checks for bridge ops.
All patches have been reviewed on the mailing list, and have been in the
last linux-next releases (as part of our for-next branch).
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
* tag 'fpga-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga:
fpga: remove redundant checks for bridge ops
fpga: dfl: make dfl_bus_type const
Greg Kroah-Hartman [Sat, 2 Mar 2024 18:58:26 +0000 (19:58 +0100)]
Merge tag 'coresight-next-v6.9' of git://git./linux/kernel/git/coresight/linux into char-misc-next
Suzuki writes:
coresight: hwtracing subsystem updates for v6.9
Changes targeting Linux v6.9 include:
- CoreSight: Enable W=1 warnings as default
- CoreSight: Clean up sysfs/perf mode handling for tracing
- Support for Qualcomm TPDM CMB Dataset
- Miscellaneous fixes to the CoreSight subsystem
- Fix for hisi_ptt PMU to reject events targeting other PMUs
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
* tag 'coresight-next-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: (32 commits)
coresight-tpda: Change qcom,dsb-element-size to qcom,dsb-elem-bits
dt-bindings: arm: qcom,coresight-tpdm: Rename qcom,dsb-element-size
hwtracing: hisi_ptt: Move type check to the beginning of hisi_ptt_pmu_event_init()
coresight: tpdm: Fix build break due to uninitialised field
coresight: etm4x: Set skip_power_up in etm4_init_arch_data function
coresight-tpdm: Add msr register support for CMB
dt-bindings: arm: qcom,coresight-tpdm: Add support for TPDM CMB MSR register
coresight-tpdm: Add timestamp control register support for the CMB
coresight-tpdm: Add pattern registers support for CMB
coresight-tpdm: Add support to configure CMB
coresight-tpda: Add support to configure CMB element
coresight-tpdm: Add CMB dataset support
dt-bindings: arm: qcom,coresight-tpdm: Add support for CMB element size
coresight-tpdm: Optimize the useage of tpdm_has_dsb_dataset
coresight-tpdm: Optimize the store function of tpdm simple dataset
coresight: Add helper for setting csdev->mode
coresight: Add a helper for getting csdev->mode
coresight: Add helper for atomically taking the device
coresight: Add explicit member initializers to coresight_dev_type
coresight: Remove unused stubs
...
Greg Kroah-Hartman [Sat, 2 Mar 2024 18:57:35 +0000 (19:57 +0100)]
Merge tag 'mhi-for-v6.9' of git://git./linux/kernel/git/mani/mhi into char-misc-next
Manivannan writes:
MHI Host
========
- Added new MHI_PM_SYS_ERR_FAIL state to the MHI state machine to properly
cleanup the channel state if the device fails to respond to the MHI reset
during SYS_ERR handling. This issue was discovered with the Qualcomm AIC100 AI
accelerator device.
- Modified the code that reads and exposes the OEM_PK_HASH registers through
sysfs to read them on-demand instead of reading once during boot. Qualcomm
AIC100 devices support provisioning the keys dynamically, so this allows the
users to know the upto date information.
- Added tracepoint support to expose the debug information over tracefs.
- Reverted the commit that reads the MHI device revision from the device during
boot. This is done because the read info was not used anywhere (dead code) and
also it is not possible to read the revision info from all the devices.
- Constified the modem config for Telit FN980 modem as required by the MHI core.
MHI Endpoint
============
- Replaced kzalloc() with kcalloc() in an effort to avoid integer overflows
during multiplication. Even though there is no potential overflow in the
endpoint code, this is done for the sake of uniformity and best practice.
- Fixed the kmem_cache_create() failure check to use the correct variable.
* tag 'mhi-for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi:
bus: mhi: host: pci_generic: constify modem_telit_fn980_hw_v1_config
bus: mhi: host: Change the trace string for the userspace tools mapping
bus: mhi: ep: check the correct variable in mhi_ep_register_controller()
Revert "bus: mhi: core: Add support for reading MHI info from device"
bus: mhi: host: Add tracing support
bus: mhi: ep: Use kcalloc() instead of kzalloc()
bus: mhi: host: Read PK HASH dynamically
bus: mhi: host: Add MHI_PM_SYS_ERR_FAIL state
Marco Felsch [Wed, 21 Feb 2024 17:43:05 +0000 (18:43 +0100)]
dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency
Make use of the common spi-peripheral-props.yaml to pull in the common
spi device properties and limit the spi-max-frequency to 10 MHz as this
is the max. frequency if VDDIO >= 1.62V.
Note all listed devices can either operate in I2C or in SPI mode.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240221174305.3423039-1-m.felsch@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Peng Fan [Mon, 26 Feb 2024 13:08:25 +0000 (21:08 +0800)]
dt-bindings: iio: adc: imx93: drop the 4th interrupt
Per i.MX93 Reference Mannual Rev.4, 12/2013, there is no interrupt 268,
so drop it.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240226130826.3824251-1-peng.fan@oss.nxp.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sun, 25 Feb 2024 20:16:54 +0000 (21:16 +0100)]
iio: proximity: isl29501: make use of of_device_id table
Reference the of_device_id table in the driver structure, so it will be
used for module autoloading and device matching. This fixes clang W=1
warning:
isl29501.c:999:34: error: unused variable 'isl29501_i2c_matches' [-Werror,-Wunused-const-variable]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240225201654.49450-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sun, 25 Feb 2024 20:27:44 +0000 (21:27 +0100)]
iio: adc: qcom-pm8xxx-xoadc: drop unused kerneldoc struct pm8xxx_chan_info member
Drop description of non-existing 'struct pm8xxx_chan_info' member:
qcom-pm8xxx-xoadc.c:386: warning: Excess struct member 'scale_fn_type' description in 'pm8xxx_chan_info'
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240225202744.60500-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Mon, 26 Feb 2024 12:30:04 +0000 (13:30 +0100)]
dt-bindings: iio: adc: drop redundant type from label
dtschema defines label as string, so $ref in other bindings is
redundant.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240226123004.91061-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Marco Felsch [Mon, 26 Feb 2024 12:12:33 +0000 (13:12 +0100)]
dt-bindings: iio: ti,tmp117: add optional label property
Add the support to provide an optional label like we do for ADC
channels to identify the device more easily.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240226121234.545662-1-m.felsch@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Ondrej Jirman [Thu, 22 Feb 2024 01:13:38 +0000 (02:13 +0100)]
MAINTAINERS: Add an entry for AF8133J driver
As I am submitting the driver and have the device to test. I'll maintain
the driver.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Link: https://lore.kernel.org/r/20240222011341.3232645-5-megi@xff.cz
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Icenowy Zheng [Thu, 22 Feb 2024 01:13:37 +0000 (02:13 +0100)]
iio: magnetometer: add a driver for Voltafield AF8133J magnetometer
AF8133J is a simple I2C-connected magnetometer, without interrupts.
Add a simple IIO driver for it.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Dalton Durst <dalton@ubports.com>
Signed-off-by: Shoji Keita <awaittrot@shjk.jp>
Co-developed-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Reviewed-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Link: https://lore.kernel.org/r/20240222011341.3232645-4-megi@xff.cz
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Icenowy Zheng [Thu, 22 Feb 2024 01:13:36 +0000 (02:13 +0100)]
dt-bindings: iio: magnetometer: Add Voltafield AF8133J
Voltafield AF8133J is a simple magnetometer sensor produced by Voltafield
Technology Corp, with dual power supplies (one for core and one for I/O)
and active-low reset pin.
The sensor has configurable range 1.2 - 2.2 mT and a software controlled
standby mode.
Add a device tree binding for it.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Ondřej Jirman <megi@xff.cz>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240222011341.3232645-3-megi@xff.cz
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Icenowy Zheng [Thu, 22 Feb 2024 01:13:35 +0000 (02:13 +0100)]
dt-bindings: vendor-prefix: Add prefix for Voltafield
Voltafile Technology Corp. is a company that produces MEMS sensors.
Add a DT vendor prefix for it.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Ondřej Jirman <megi@xff.cz>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240222011341.3232645-2-megi@xff.cz
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Quentin Schulz [Fri, 23 Feb 2024 12:45:23 +0000 (13:45 +0100)]
iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive
devm_reset_control_get_optional_exclusive does what this driver is
trying to do in its probe function, therefore let's switch over to that
subsystem function.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240223-saradcv2-chan-mask-v1-3-84b06a0f623a@theobroma-systems.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Quentin Schulz [Fri, 23 Feb 2024 12:45:22 +0000 (13:45 +0100)]
iio: adc: rockchip_saradc: use mask for write_enable bitfield
Some of the registers on the SARADCv2 have bits write protected except
if another bit is set. This is usually done by having the lowest 16 bits
store the data to write and the highest 16 bits specify which of the 16
lowest bits should have their value written to the hardware block.
The write_enable mask for the channel selection was incorrect because it
was just the value shifted by 16 bits, which means it would only ever
write bits and never clear them. So e.g. if someone starts a conversion
on channel 5, the lowest 4 bits would be 0x5, then starts a conversion
on channel 0, it would still be 5.
Instead of shifting the value by 16 as the mask, let's use the OR'ing of
the appropriate masks shifted by 16.
Note that this is not an issue currently because the only SARADCv2
currently supported has a reset defined in its Device Tree, that reset
resets the SARADC controller before starting a conversion on a channel.
However, this reset is handled as optional by the probe function and
thus proper masking should be used in the event an SARADCv2 without a
reset ever makes it upstream.
Fixes:
757953f8ec69 ("iio: adc: rockchip_saradc: Add support for RK3588")
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20240223-saradcv2-chan-mask-v1-2-84b06a0f623a@theobroma-systems.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Quentin Schulz [Fri, 23 Feb 2024 12:45:21 +0000 (13:45 +0100)]
iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2
The SARADCv2 on RK3588 (the only SoC currently supported that has an
SARADCv2) selects the channel through the channel_sel bitfield which is
the 4 lowest bits, therefore the mask should be GENMASK(3, 0) and not
GENMASK(15, 0).
Fixes:
757953f8ec69 ("iio: adc: rockchip_saradc: Add support for RK3588")
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240223-saradcv2-chan-mask-v1-1-84b06a0f623a@theobroma-systems.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Javier Carrasco [Fri, 23 Feb 2024 13:01:33 +0000 (14:01 +0100)]
dt-bindings: iio: light: vishay,veml6075: make vdd-supply required
The VEML6075 requires a single supply to operate. The property already
exists in the bindings and it is used in the example, but it is still
not on the list of required properties.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240223-veml6075_vdd-v1-1-ac76509b1998@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Marius Cristea [Thu, 22 Feb 2024 16:42:06 +0000 (18:42 +0200)]
iio: adc: adding support for PAC193x
This is the iio driver for Microchip
PAC193X series of Power Monitor with Accumulator chip family.
Signed-off-by: Marius Cristea <marius.cristea@microchip.com>
Link: https://lore.kernel.org/r/20240222164206.65700-3-marius.cristea@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Marius Cristea [Thu, 22 Feb 2024 16:42:05 +0000 (18:42 +0200)]
dt-bindings: iio: adc: adding support for PAC193X
This is the device tree schema for iio driver for
Microchip PAC193X series of Power Monitors with Accumulator.
Signed-off-by: Marius Cristea <marius.cristea@microchip.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240222164206.65700-2-marius.cristea@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Thu, 22 Feb 2024 12:55:55 +0000 (13:55 +0100)]
iio: temperature: ltc2983: explicitly set the name in chip_info
Getting the part name with 'spi_get_device_id(spi)->name' is not a very
good pattern. Hence, explicitly add the name in the struct chip_info and
use that instead.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240222-ltc2983-misc-improv-v1-4-cf7d4457e98c@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Thu, 22 Feb 2024 12:55:53 +0000 (13:55 +0100)]
iio: temperature: ltc2983: rename ltc2983_parse_dt()
Rename ltc2983_parse_dt() to ltc2983_parse_fw() as there's no explicit
dependency on devicetree. No functional change intended...
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240222-ltc2983-misc-improv-v1-2-cf7d4457e98c@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Thu, 22 Feb 2024 12:55:52 +0000 (13:55 +0100)]
iio: temperature: ltc2983: make use of spi_get_device_match_data()
Use spi_get_device_match_data() as it simplifies the code. No functional
change intended...
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240222-ltc2983-misc-improv-v1-1-cf7d4457e98c@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dan Carpenter [Thu, 22 Feb 2024 06:15:37 +0000 (09:15 +0300)]
iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq()
The "val" variable comes from the user so we need to ensure that it's not
zero. In fact, all negative values are invalid as well. Add a check for
that.
Fixes:
00ef7708fa60 ("iio: adc: ti-ads1298: Add driver")
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/c32c9087-86de-423b-8101-67b4a7f9d728@moroto.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dan Carpenter [Thu, 22 Feb 2024 06:14:25 +0000 (09:14 +0300)]
iio: adc: ti-ads1298: Fix error code in probe()
There is a copy and paste bug here, it should be "reg_vref" instead of
"reg_avdd". The "priv->reg_avdd" variable is zero so it ends up
returning success.
Fixes:
00ef7708fa60 ("iio: adc: ti-ads1298: Add driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/r/5f393a87-ca8b-4e68-a6f4-a79f75a91ccb@moroto.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Ramona Gradinariu [Wed, 21 Feb 2024 08:58:48 +0000 (10:58 +0200)]
docs: iio: add documentation for adis16475 driver
Add documentation for adis16475 driver which describes
the driver device files and shows how the user may use the
ABI for various scenarios (configuration, measurement, etc.).
Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com>
Link: https://lore.kernel.org/r/20240221085848.991413-4-ramona.gradinariu@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Ramona Gradinariu [Wed, 21 Feb 2024 08:58:47 +0000 (10:58 +0200)]
docs: iio: add documentation for device buffers
Add documentation for IIO device buffers describing buffer
attributes and how data is structured in buffers using
scan elements.
Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com>
Link: https://lore.kernel.org/r/20240221085848.991413-3-ramona.gradinariu@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Ramona Gradinariu [Wed, 21 Feb 2024 08:58:46 +0000 (10:58 +0200)]
docs: iio: Refactor index.rst
Refactor index.rst such that it contains a section for generic
documentation and a section for Kernel Drivers documentation.
Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com>
Link: https://lore.kernel.org/r/20240221085848.991413-2-ramona.gradinariu@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dumitru Ceclan [Tue, 20 Feb 2024 15:34:53 +0000 (17:34 +0200)]
iio: amplifiers: hmc425a: add support for LTC6373 Instrumentation Amplifier
This adds support for LTC6373 36 V Fully-Differential Programmable-Gain
Instrumentation Amplifier with 25 pA Input Bias Current.
The user can program the gain to one of seven available settings through
a 3-bit parallel interface (A2 to A0).
Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240220153553.2432-6-mitrutzceclan@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dumitru Ceclan [Tue, 20 Feb 2024 15:34:51 +0000 (17:34 +0200)]
iio: amplifiers: hmc425a: use pointers in match table
Change the match table to use pointers instead of device ids.
Remove type from state as it is not used anymore.
Also make the chip_info structures const.
Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240220153553.2432-4-mitrutzceclan@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dumitru Ceclan [Tue, 20 Feb 2024 15:34:49 +0000 (17:34 +0200)]
iio: amplifiers: hmc425a: move conversion logic
Move gain-dB<->code conversion logic from read_raw and write_raw to
chip_info callbacks.
Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240220153553.2432-2-mitrutzceclan@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dumitru Ceclan [Tue, 20 Feb 2024 15:34:52 +0000 (17:34 +0200)]
dt-bindings: iio: hmc425a: add entry for LTC6373
The LTC6373 is a silicon, 3-bit Fully-Differential digital instrumentation
amplifier that supports the following programmable gains (Vout/Vin):
G = 0.25, 0.5, 1, 2, 4, 8, 16 + Shutdown.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com>
Link: https://lore.kernel.org/r/20240220153553.2432-5-mitrutzceclan@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dumitru Ceclan [Tue, 20 Feb 2024 15:34:50 +0000 (17:34 +0200)]
dt-bindings: iio: hmc425a: add conditional GPIO array size constraints
ADRF5740 and HMC540S have a 4 bit parallel interface.
Update ctrl-gpios description and min/maxItems values depending on the
matched compatible to correctly reflect the hardware properties.
Fixes:
79f2ff6461e7 ("dt-bindings: iio: hmc425a: add entry for ADRF5740 Attenuator")
Fixes:
20f87a9a26be ("dt-bindings: iio: hmc425a: add entry for HMC540S")
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com>
Link: https://lore.kernel.org/r/20240220153553.2432-3-mitrutzceclan@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Josua Mayer [Mon, 19 Feb 2024 14:48:21 +0000 (15:48 +0100)]
dt-bindings: iio: humidity: hdc20x0: add optional interrupts property
HDC2010 and HDC2080 humidity sensors both have an interrupt / data-ready
signal which can be used for signaling to the host.
Add binding for "interrupts" property so that boards wiring this signal
may describe the connection.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Josua Mayer <josua@solid-run.com>
Link: https://lore.kernel.org/r/20240219-iio-hdc20x0-interrupt-binding-v7-1-c8ffb39c3768@solid-run.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Thomas Haemmerle [Mon, 19 Feb 2024 13:11:14 +0000 (14:11 +0100)]
iio: temperature: tmp117: add support for vcc-supply
Add support to specify the VCC supply which is required to power the
device. According the datasheet 7.3.1 Power Up, the device needs 1.5ms
after the supply voltage reaches the operating range before the
communcation can begin.
Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.kernel.org/r/20240219131114.134607-2-m.felsch@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Thomas Haemmerle [Mon, 19 Feb 2024 13:11:13 +0000 (14:11 +0100)]
dt-bindings: iio: ti,tmp117: add vcc supply binding
Add the binding to specify the vcc supply. We can't make it required
since this would break the backward compatibility.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.kernel.org/r/20240219131114.134607-1-m.felsch@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Arturas Moskvinas [Mon, 19 Feb 2024 07:41:40 +0000 (09:41 +0200)]
iio: adc: mcp320x: Simplify device removal logic
Use devm_* APIs to enable/disable regulator and to register in IIO infrastructure.
Signed-off-by: Arturas Moskvinas <arturas.moskvinas@gmail.com>
Link: https://lore.kernel.org/r/20240219074139.193464-2-arturas.moskvinas@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Sean Rhodes [Sun, 18 Feb 2024 21:53:37 +0000 (21:53 +0000)]
iio: accel: kxcjk-1013: Implement ACPI method ROTM to retrieve mount matrix.
Implement kxj_acpi_orientation to retrieve mount matrix
from ACPI ROTM method
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Link: https://lore.kernel.org/r/19d7a10aae5238a2c8db37da1f74edb86480e17e.1708293140.git.sean@starlabs.systems
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 18 Feb 2024 17:33:23 +0000 (17:33 +0000)]
iio: dac: mcp4821: Switch to including mod_devicetable.h for struct of_device_id definition.
of.h was only included for this definition, so include the correct header
instead.
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240218173323.1023703-9-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 18 Feb 2024 17:33:22 +0000 (17:33 +0000)]
iio: accel: kxsd9: Switch from linux/of.h to linux/mod_devicetable.h
The only of specific definition used is of_device_id table and that
is found in mod_devicetable.h not of.h
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240218173323.1023703-8-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 18 Feb 2024 17:33:21 +0000 (17:33 +0000)]
iio: accel: bma180: Switch from linux/of.h to linux/mod_devicetable.h
The only of specific definition used is of_device_id table and that
is found in mod_devicetable.h not of.h
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240218173323.1023703-7-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 18 Feb 2024 17:33:20 +0000 (17:33 +0000)]
iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h
The only of specific definition used is of_device_id table and that
is found in mod_devicetable.h not of.h
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240218173323.1023703-6-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 18 Feb 2024 17:33:19 +0000 (17:33 +0000)]
iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id definition
of.h was only included to get access to this structure, so include the
correct header directly instead.
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240218173323.1023703-5-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 18 Feb 2024 17:33:18 +0000 (17:33 +0000)]
iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h
The only of specific definition used is of_device_id table and that
is found in mod_devicetable.h not of.h
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240218173323.1023703-4-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 18 Feb 2024 17:33:17 +0000 (17:33 +0000)]
iio: light: al3320a: Drop unused linux/of.h include
Nothing from linux/of.h used in this driver.
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240218173323.1023703-3-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 18 Feb 2024 17:33:16 +0000 (17:33 +0000)]
iio: light: vl6180: Drop unused linux/of.h include
Nothing from linux/of.h is used in this driver.
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240218173323.1023703-2-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Mao Jinlong [Sun, 18 Feb 2024 09:43:20 +0000 (01:43 -0800)]
coresight-tpda: Change qcom,dsb-element-size to qcom,dsb-elem-bits
Change qcom,dsb-element-size to qcom,dsb-elem-bits as the unit is bit.
When use "-bits" suffix, the type of the property is u32 from
property-units.yaml, so use fwnode_property_read_u32 to read the
property.
Fixes:
57e7235aa1d1 ("coresight-tpda: Add DSB dataset support")
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
Link: https://lore.kernel.org/r/20240218094322.22470-3-quic_jinlmao@quicinc.com
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Mao Jinlong [Sun, 18 Feb 2024 09:43:19 +0000 (01:43 -0800)]
dt-bindings: arm: qcom,coresight-tpdm: Rename qcom,dsb-element-size
The unit for TPDM DSB element size is bits. So rename the property:
qcom,dsb-element-size => qcom,dsb-element-bits
This also makes it consistent with the naming for the CMB element
size property.
There is no tpdm node in any DT as of now. Make this change before
any tpdm node is added to DT.
Fixes:
2a8d9b371566 ("dt-bindings: arm: Add support for DSB element size")
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240218094322.22470-2-quic_jinlmao@quicinc.com
[ Reworded commit description to explain why we change this ]
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Jeff Johnson [Fri, 23 Feb 2024 02:00:23 +0000 (18:00 -0800)]
bus: mhi: host: pci_generic: constify modem_telit_fn980_hw_v1_config
MHI expects the controller configs to be const, and all of the other ones
in this file already are, so constify modem_telit_fn980_hw_v1_config.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240222-mhi-const-bus-mhi-host-pci_generic-v1-1-d4c9b0b0a7a5@quicinc.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Yang Jihong [Mon, 8 Jan 2024 12:19:06 +0000 (12:19 +0000)]
hwtracing: hisi_ptt: Move type check to the beginning of hisi_ptt_pmu_event_init()
When perf_init_event() calls perf_try_init_event() to init pmu driver,
searches for the next pmu driver only when the return value is -ENOENT.
Therefore, hisi_ptt_pmu_event_init() needs to check the type at the
beginning of the function.
Otherwise, in the case of perf-task mode, perf_try_init_event() returns
-EOPNOTSUPP and skips subsequent pmu drivers, causes perf_init_event() to
fail.
Fixes:
ff0de066b463 ("hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device")
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Reviewed-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240108121906.3514820-1-yangjihong1@huawei.com
Greg Kroah-Hartman [Sun, 25 Feb 2024 13:11:41 +0000 (14:11 +0100)]
Merge tag 'iio-for-6.9a' of git./linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
IIO: 1st set of new device support, features and cleanup for 6.9
IIO Backend support
===================
New approach from Nuno Sa to the problem of reuse of drivers with
IIO devices that are actually the combination of a highspeed chip
and an FPGA core handling the data capture and flows. It will hopefully
also apply to some other split designs. The ad9467 and axi-adi drivers
are converted over to this framework.
New device support
==================
adi,admfm2000
- New driver for this dual microwave down converter.
ams,as73211
- Add support for as7331 UV sensor.
richtek,rtq6056
- Add support for related parts RTQ6053 and RTQ6059
st,lsm6dsx
- Add ASM330LHHXG1 accelerometer and gyro support (mainly IDs)
ti,ads1298
- New driver for this medical ADC.
Features
========
tests
- Unit tests for the gain-time-scale helper library.
bosch,bmi088
- I2C support.
bosh,bmi160
- Add
10EC5280 ACPI ID. Used in a number of devices that won't get fixed.
The ID is actually a PCI ID belonging to realtech. No response was received
to earlier attempts to notify them of this.
The manufacturers of some devices have replied to say they will not fix
this incorrect ID. Add the ID and hope it isn't a problem.
bosch,bmi323
- Add BOSC0200 ACPI ID. Note this is a duplicate of one in the bmc150
driver (it appears these parts share a windows driver).
Both drivers perform an ID check that is safe on the other part before
successfully probing.
hid-sensors-als
- Add color temperature and chromaticity support. Note this is a replacement
for the series reverted in 6.8 that correctly handles all the potential
channel combinations.
honeywell,hsc030pa
- Triggered buffer support (after driver cleanup).
honeywell,mprls00025pa
- Improved error handling.
- New DT binding to allow use of part number triplet as provided in data sheet
to specify equivalent of most of the binding more efficiently.
- SPI support.
memsic,mxc4005
- ACPI ID MDA6655 as seen in the Chuwi Minibook X 2023
ti,hdc3020
- Add threshold event support (after some driver cleanup)
veml,vcnl4000
- Switch to high resolution proximity measurement.
Cleanup
=======
Various minor typo fixes and better use of defines etc.
Treewide
- Stop using ACPI_PTR(). The savings in space are small and not worth
the complexity of __maybe_unused of ifdef guards. To avoid use in
new IIO drivers based on copy and paste, clean it out.
- cleanup.h based handling of iio_device_claim_direct_mode()/
iio_device_release_direct_mode() using scope_cond_guard().
In many drivers this is combined with other automated cleanup
to give maximum simplifications.
An initial set of drivers are converted over to this infrastructure.
Tools
- Use rewinddir() instead of seekdir() to return to start of file.
core
- Make iio_bus_type constant.
adi,
ad16475
- Use irq_get_trigger_type() instead of opencoding.
adi,
ad16480
- Use irq_get_trigger_type() instead of opencoding.
adi,ad-sigma-delta
- Avoid overwriting IRQ flags if provided by firmware.
ams,as73211
- Use IIO_VAL_FRACTIONAL for scales to simplify the code and potentially
improve accuracy.
gts-library
- Use a div64_u64() instead of a loop to do a division.
honeywell,mprls00025pa
- Clean up dt-binding doc.
- Drop defaults when DT binding not providing values. Very unlikely
these were useful given they were wrong for vast majority of supported
devices.
- Whitespace cleanup
miramems,da280
- Use i2c_get_match_data() to replace hand rolled ACPI matching code.
semtech,sx9324
- Avoid unnecessary copying of property strings.
st,lsm6dsx
- Improve docs, particularly wrt to making addition of new device
support less noisy.
st,lsm9ds0
- Use dev_err_probe() in all probe() error handling.
- Improved header includes.
- Tidy up termination of ID tables.
ti,ads1014
- Correct upper bound on PGA (wrong value had no actual impact)
ti,
afe4403/4404
- devm_ useage to simplify error handling in probe() and allow() remove to
be dropped.
voltage-divider
- Add dt-binding for io-channel-cells to allow such a device to be both
an IIO consumer and IIO producer at the same time.
* tag 'iio-for-6.9a' of http://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (106 commits)
iio: imu: bmi323: Add ACPI Match Table
iio: accel: bmc150: Document duplicate ACPI entries with bmi323 driver
iio: adc: ti-ads1298: Add driver
dt-bindings: iio: adc: ti-ads1298: Add bindings
iio: pressure: hsc030pa add triggered buffer
iio: pressure: hsc030pa add mandatory delay
iio: pressure: hsc030pa: update datasheet URLs
iio: pressure: hsc030pa: include cleanup
iio: pressure: hsc030pa: use signed type to hold div_64() result
dt-bindings: iio: pressure: honeywell,hsc030pa.yaml add spi props
iio: st_sensors: lsm9ds0: Use common style for terminator in ID tables
iio: st_sensors: lsm9ds0: Don't use "proxy" headers
iio: st_sensors: lsm9ds0: Use dev_err_probe() everywhere
iio: adc: adi-axi-adc: move to backend framework
iio: adc: ad9467: convert to backend framework
iio: add the IIO backend framework
iio: buffer-dmaengine: export buffer alloc and free functions
of: property: add device link support for io-backends
dt-bindings: adc: axi-adc: update bindings for backend framework
dt-bindings: adc: ad9467: add new io-backend property
...
Krishna chaitanya chundru [Sun, 18 Feb 2024 08:43:39 +0000 (14:13 +0530)]
bus: mhi: host: Change the trace string for the userspace tools mapping
User space tools can't map strings if we use directly, as the string
address is internal to kernel.
So add trace point strings for the user space tools to map strings
properly.
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240218-ftrace_string-v1-1-27da85c1f844@quicinc.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Dan Carpenter [Wed, 21 Feb 2024 06:20:19 +0000 (09:20 +0300)]
bus: mhi: ep: check the correct variable in mhi_ep_register_controller()
There is a copy and paste bug here so it checks "ev_ring_el_cache" instead
of "ring_item_cache".
Fixes:
62210a26cd4f ("bus: mhi: ep: Use slab allocator where applicable")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/bebcd822-d465-45da-adae-5435ec93e6d4@moroto.mountain
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Jeffrey Hugo [Mon, 19 Feb 2024 18:07:48 +0000 (11:07 -0700)]
Revert "bus: mhi: core: Add support for reading MHI info from device"
This reverts commit
3316ab2b45f6bf4797d8d65b22fda3cc13318890.
The MHI spec owner pointed out that the SOC_HW_VERSION register is part
of the BHIe segment, and only valid on devices which implement BHIe.
Only a small subset of MHI devices implement BHIe so blindly accessing
the register for all devices is not correct. Also, since the BHIe
segment offset is not used when accessing the register, any
implementation which moves the BHIe segment will result in accessing
some other register. We've seen that accessing this register on AIC100
which does not support BHIe can result in initialization failures.
We could try to put checks into the code to address these issues, but in
the roughly 4 years this functionality has existed, no one has used it.
Easier to drop this dead code and address the issues if anyone comes up
with a real world use for it.
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240219180748.1591527-1-quic_jhugo@quicinc.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Jonathan LoBue [Fri, 16 Feb 2024 18:23:08 +0000 (10:23 -0800)]
iio: imu: bmi323: Add ACPI Match Table
Adds the ACPI match table for ASUS ROG ALLY to load the bmi323
driver with an ACPI match of "BOSC0200", and a comment about duplicate
ACPI identifiers between devices using the bmc150 and bmi323 chips.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Co-developed-by: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Co-developed-by: Denis Benato <benato.denis96@gmail.com>
Signed-off-by: Denis Benato <benato.denis96@gmail.com>
Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Jonathan LoBue <jlobue10@gmail.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240216182308.27125-1-jlobue10@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan LoBue [Fri, 16 Feb 2024 18:22:53 +0000 (10:22 -0800)]
iio: accel: bmc150: Document duplicate ACPI entries with bmi323 driver
Adds a description of the duplicate ACPI identifier issue
between devices using bmc150 and bmi323.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Co-developed-by: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Co-developed-by: Denis Benato <benato.denis96@gmail.com>
Signed-off-by: Denis Benato <benato.denis96@gmail.com>
Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Jonathan LoBue <jlobue10@gmail.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240216182253.27069-1-jlobue10@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Mike Looijmans [Fri, 16 Feb 2024 15:30:20 +0000 (16:30 +0100)]
iio: adc: ti-ads1298: Add driver
Skeleton driver for the TI ADS1298 medical ADC. This device is
typically used for ECG and similar measurements. Supports data
acquisition at configurable scale and sampling frequency.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/r/20240216153020.485201-2-mike.looijmans@topic.nl
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Mike Looijmans [Fri, 16 Feb 2024 15:30:19 +0000 (16:30 +0100)]
dt-bindings: iio: adc: ti-ads1298: Add bindings
Bindings for the TI ADS1298 medical ADC. This device is
typically used for ECG and similar measurements. Supports data
acquisition at configurable scale and sampling frequency.
The device has so many options for connecting stuff, at this
point the bindings aren't nearly complete but partial bindings
are better than no bindings at all.
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240216153020.485201-1-mike.looijmans@topic.nl
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Petre Rodan [Sun, 11 Feb 2024 07:56:37 +0000 (09:56 +0200)]
iio: pressure: hsc030pa add triggered buffer
Add triggered buffer feature.
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Link: https://lore.kernel.org/r/20240211075645.28777-7-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Petre Rodan [Sun, 11 Feb 2024 07:56:36 +0000 (09:56 +0200)]
iio: pressure: hsc030pa add mandatory delay
Add a mandatory 2ms delay between consecutive chip reads.
A Technical Note pdf specifies that the measurement cycle in these
chips takes around 1.26ms. By adding this 2ms delay we make sure that
we never get stale measurements.
For more details, please see "Figure 1" in the pdf below:
https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/common/documents/sps-siot-sleep-mode-technical-note-008286-1-en-ciid-155793.pdf
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Link: https://lore.kernel.org/r/20240211075645.28777-6-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Petre Rodan [Sun, 11 Feb 2024 07:56:35 +0000 (09:56 +0200)]
iio: pressure: hsc030pa: update datasheet URLs
Provide bus-specific technical datasheet in the _i2c.c _spi.c headers
instead of the generic one.
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Link: https://lore.kernel.org/r/20240211075645.28777-5-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Petre Rodan [Sun, 11 Feb 2024 07:56:34 +0000 (09:56 +0200)]
iio: pressure: hsc030pa: include cleanup
Add includes based on prior reviews from Andy.
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Link: https://lore.kernel.org/r/20240211075645.28777-4-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Petre Rodan [Sun, 11 Feb 2024 07:56:33 +0000 (09:56 +0200)]
iio: pressure: hsc030pa: use signed type to hold div_64() result
Use signed type to variable holding the result given by div_s64().
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Link: https://lore.kernel.org/r/20240211075645.28777-3-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Petre Rodan [Sun, 11 Feb 2024 07:56:32 +0000 (09:56 +0200)]
dt-bindings: iio: pressure: honeywell,hsc030pa.yaml add spi props
Add spi-peripheral-props.yaml requirement needed by the
spi-max-frequency property.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Link: https://lore.kernel.org/r/20240211075645.28777-2-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
andy.shevchenko@gmail.com [Sun, 11 Feb 2024 20:14:34 +0000 (22:14 +0200)]
iio: st_sensors: lsm9ds0: Use common style for terminator in ID tables
Use common style for a terminator entry in the ID tables.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240211201526.1518165-4-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
andy.shevchenko@gmail.com [Sun, 11 Feb 2024 20:14:33 +0000 (22:14 +0200)]
iio: st_sensors: lsm9ds0: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use)
principle.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240211201526.1518165-3-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
andy.shevchenko@gmail.com [Sun, 11 Feb 2024 20:14:32 +0000 (22:14 +0200)]
iio: st_sensors: lsm9ds0: Use dev_err_probe() everywhere
Use dev_err_probe() everywhere where it is appropriate.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240211201526.1518165-2-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Sat, 10 Feb 2024 20:57:19 +0000 (21:57 +0100)]
iio: adc: adi-axi-adc: move to backend framework
Move to the IIO backend framework. Devices supported by adi-axi-adc now
register themselves as backend devices.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240210-iio-backend-v11-7-f5242a5fb42a@analog.com
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Sat, 10 Feb 2024 20:57:18 +0000 (21:57 +0100)]
iio: adc: ad9467: convert to backend framework
Convert the driver to use the new IIO backend framework. The device
functionality is expected to be the same (meaning no added or removed
features).
Also note this patch effectively breaks ABI and that's needed so we can
properly support this device and add needed features making use of the
new IIO framework.
Given the lack of features (and devices supported) in the ad9467 driver
compared with the ADI out of tree version, we don't expect any user of
the upstream driver so no one should notice the ABI breakage. However,
if someone is affected by this, ADI will happily support transitioning
to the backend framework.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240210-iio-backend-v11-6-f5242a5fb42a@analog.com
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Sat, 10 Feb 2024 20:57:17 +0000 (21:57 +0100)]
iio: add the IIO backend framework
This is a Framework to handle complex IIO aggregate devices.
The typical architecture is to have one device as the frontend device which
can be "linked" against one or multiple backend devices. All the IIO and
userspace interface is expected to be registers/managed by the frontend
device which will callback into the backends when needed (to get/set
some configuration that it does not directly control).
The basic framework interface is pretty simple:
- Backends should register themselves with @devm_iio_backend_register()
- Frontend devices should get backends with @devm_iio_backend_get()
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240210-iio-backend-v11-5-f5242a5fb42a@analog.com
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Sat, 10 Feb 2024 20:57:16 +0000 (21:57 +0100)]
iio: buffer-dmaengine: export buffer alloc and free functions
Export iio_dmaengine_buffer_free() and iio_dmaengine_buffer_alloc().
This is in preparation of introducing IIO backends support. This will
allow us to allocate a buffer and control it's lifetime from a device
different from the one holding the DMA firmware properties. Effectively,
in this case the struct device holding the firmware information about
the DMA channels is not the same as iio_dev->dev.parent (typical case).
While at it, namespace the buffer-dmaengine exports and update the
current user of these buffers.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240210-iio-backend-v11-4-f5242a5fb42a@analog.com
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Olivier Moysan [Sat, 10 Feb 2024 20:57:15 +0000 (21:57 +0100)]
of: property: add device link support for io-backends
Add support for creating device links out of more DT properties.
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240210-iio-backend-v11-3-f5242a5fb42a@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Sat, 10 Feb 2024 20:57:14 +0000 (21:57 +0100)]
dt-bindings: adc: axi-adc: update bindings for backend framework
'adi,adc-dev' is now deprecated and must not be used anymore. Hence,
also remove it from being required.
The reason why it's being deprecated is because the axi-adc CORE is now
an IIO service provider hardware (IIO backends) for consumers to make use
of. Before, the logic with 'adi,adc-dev' was the opposite (it was kind
of consumer referencing other nodes/devices) and that proved to be wrong
and to not scale.
Now, IIO consumers of this hardware are expected to reference it using the
io-backends property. Hence, the new '#io-backend-cells' is being added
so the device is easily identified as a provider.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240210-iio-backend-v11-2-f5242a5fb42a@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nuno Sa [Sat, 10 Feb 2024 20:57:13 +0000 (21:57 +0100)]
dt-bindings: adc: ad9467: add new io-backend property
The ad9467 will make use of the new IIO backend framework which is a
provider - consumer interface where IIO backends provide services to
consumers. As such, and being this device a consumer, add the new
generic io-backend property to the bindings.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240210-iio-backend-v11-1-f5242a5fb42a@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Matti Vaittinen [Mon, 12 Feb 2024 11:20:09 +0000 (13:20 +0200)]
iio: gts-helper: Fix division loop
The loop based 64bit division may run for a long time when dividend is a
lot bigger than the divider. Replace the division loop by the
div64_u64() which implementation may be significantly faster.
Tested-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Fixes:
38416c28e168 ("iio: light: Add gain-time-scale helpers")
Link: https://lore.kernel.org/r/Zcn-6e-0-nh2WcfU@drtxq0yyyyyyyyyyyyyby-3.rev.dnainternet.fi
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Greg Kroah-Hartman [Mon, 19 Feb 2024 06:38:16 +0000 (07:38 +0100)]
Merge 6.8-rc5 into char-misc-next
We need the iio fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 18 Feb 2024 20:56:25 +0000 (12:56 -0800)]
Linux 6.8-rc5
Dawei Li [Wed, 31 Jan 2024 03:30:28 +0000 (11:30 +0800)]
misc: eeprom/idt_89hpesx: Convert data structures to LE explicitly
Kernel test robot reports following sparse warnings:
>> drivers/misc/eeprom/idt_89hpesx.c:599:31: sparse: sparse:
incorrect type in assignment (different base types) @@
expected unsigned short [addressable] [assigned] [usertype]
memaddr @@ got restricted __le16 [usertype] @@
drivers/misc/eeprom/idt_89hpesx.c:599:31: sparse:
expected unsigned short [addressable] [assigned] [usertype]
memaddr
drivers/misc/eeprom/idt_89hpesx.c:599:31: sparse:
restricted __le16 [usertype]
.....
For data structures needs cpu_to_le* conversion, their prototype need
to be declared with __le* explicitly.
Declare data structures to __le* explicitly to address the issue:
- struct idt_eeprom_seq::memaddr
- struct idt_csr_seq::csraddr
- struct idt_csr_seq::data
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202401261250.b07Yt30Z-lkp@intel.com/
Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240131033028.3099156-1-dawei.li@shingroup.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Mon, 5 Feb 2024 18:04:36 +0000 (18:04 +0000)]
comedi: remove redundant assignment to variable range
The variable range is being initialized with a value that is never
read, it is being re-assigned later on. The initialization is
redundant and can be removed.
Cleans up clang scan build warning:
drivers/comedi/drivers/das08.c:180:2: warning: Value stored
to 'range' is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20240205180436.1841706-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 18 Feb 2024 18:09:25 +0000 (10:09 -0800)]
Merge tag 'kbuild-fixes-v6.8-2' of git://git./linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada:
- Reformat nested if-conditionals in Makefiles with 4 spaces
- Fix CONFIG_DEBUG_INFO_BTF builds for big endian
- Fix modpost for module srcversion
- Fix an escape sequence warning in gen_compile_commands.py
- Fix kallsyms to ignore ARMv4 thunk symbols
* tag 'kbuild-fixes-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kallsyms: ignore ARMv4 thunks along with others
modpost: trim leading spaces when processing source files list
gen_compile_commands: fix invalid escape sequence warning
kbuild: Fix changing ELF file type for output of gen_btf for big endian
docs: kconfig: Fix grammar and formatting
kbuild: use 4-space indentation when followed by conditionals
Linus Torvalds [Sun, 18 Feb 2024 17:22:48 +0000 (09:22 -0800)]
Merge tag 'x86_urgent_for_v6.8_rc5' of git://git./linux/kernel/git/tip/tip
Pull x86 fix from Borislav Petkov:
- Use a GB page for identity mapping only when memory of this size is
requested so that mapping of reserved regions is prevented which
would otherwise lead to system crashes on UV machines
* tag 'x86_urgent_for_v6.8_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm/ident_map: Use gbpages only where full GB page should be mapped.
Linus Torvalds [Sun, 18 Feb 2024 17:14:12 +0000 (09:14 -0800)]
Merge tag 'irq_urgent_for_v6.8_rc5' of git://git./linux/kernel/git/tip/tip
Pull irq fixes from Borislav Petkov:
- Fix GICv4.1 affinity update
- Restore a quirk for ACPI-based GICv4 systems
- Handle non-coherent GICv4 redistributors properly
- Prevent spurious interrupts on Broadcom devices using GIC v3
architecture
- Other minor fixes
* tag 'irq_urgent_for_v6.8_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/gic-v3-its: Fix GICv4.1 VPE affinity update
irqchip/gic-v3-its: Restore quirk probing for ACPI-based systems
irqchip/gic-v3-its: Handle non-coherent GICv4 redistributors
irqchip/qcom-mpm: Fix IS_ERR() vs NULL check in qcom_mpm_init()
irqchip/loongson-eiointc: Use correct struct type in eiointc_domain_alloc()
irqchip/irq-brcmstb-l2: Add write memory barrier before exit
Linus Torvalds [Sun, 18 Feb 2024 17:08:57 +0000 (09:08 -0800)]
Merge tag 'i2c-for-6.8-rc5' of git://git./linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
"Two fixes for i801 and qcom-geni devices. Meanwhile, a fix from Arnd
addresses a compilation error encountered during compile test on
powerpc"
* tag 'i2c-for-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: i801: Fix block process call transactions
i2c: pasemi: split driver into two separate modules
i2c: qcom-geni: Correct I2C TRE sequence
Marco Pagani [Thu, 1 Feb 2024 15:57:12 +0000 (16:57 +0100)]
fpga: remove redundant checks for bridge ops
Commit
0d70af3c2530 ("fpga: bridge: Use standard dev_release for class
driver") introduced a check in fpga_bridge_register() that prevents
registering a bridge without ops, making checking on every call
redundant.
Signed-off-by: Marco Pagani <marpagan@redhat.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20240201155713.82898-1-marpagan@redhat.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>