To provide a new IIO trigger to the IIO core, usually driver executes the
following pipeline: allocate()/register()/get(). Before, IIO core assigned
trig->owner as a pointer to the module which registered this trigger at
the register() stage. But actually the trigger object is owned by the
module earlier, on the allocate() stage, when trigger object is
successfully allocated for the driver.
This patch moves trig->owner initialization from register()
stage of trigger initialization pipeline to allocate() stage to
eliminate all misunderstandings and time gaps between trigger object
creation and owner acquiring.
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Link: https://lore.kernel.org/r/20220601174837.20292-1-ddrokosov@sberdevices.ru
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Detailed description for this pull request:
1. Add new connector type of both EXTCON_DISP_CVBS and EXTCON_DISP_EDP
- Add both EXTCON_DISP_CVBS for Composite Video Broadcast Signal[1] and
EXTCON_DISP_EDP for Embedded Display Port[2].
[1] https://en.wikipedia.org/wiki/Composite_video
[2] https://en.wikipedia.org/wiki/DisplayPort#eDP
2. Fix the minor issues of extcon provider driver
- Drop unused remove function on extcon-fsa9480.c
- Remove extraneous space before a debug message on extcon-palmas.c
- Remove duplicate word in the comment
- Drop useless mask_invert flag on irqchip on extcon-sm5502.c
- Drop useless mask_invert flag on irqchip on extcon-rt8973a.c
-----BEGIN PGP SIGNATURE-----
iQJKBAABCgA0FiEEsSpuqBtbWtRe4rLGnM3fLN7rz1MFAmLQ1jUWHGN3MDAuY2hv
aUBzYW1zdW5nLmNvbQAKCRCczd8s3uvPUw/wD/968h0OZaGcm3ToDVBnahTUqbY9
BNTPnPeIC+HugI5fBr+ecB9KLjgqhK4Qt1EGEYIs8eqHji00MBHRuOyfP++lvLQe
XcApXQIVyoaBzi5HMUqrJw/aAayZnbQRi4X+oBaPzgx9pAyWQfruVJbndxlxj9a7
xAM0yPECMMRuq22GTkrdVZwT0AX5GH/Ds4j7s1vOKRBapwEuDPRBOY4MAP3cbh4u
AQRFk6Y+uQPocWwYluc+U1C71KgUmmp1d8TJzcgWPGH2kXJtWeI8bGeiPND360q0
+2VxxzK94518oR0wngrQlhTkyy09vm4Jxu09CvU2C1GAx6zC3q1S52KI8/zHlI7K
LP5c2r5GBPik4a6EO+rO5uFrA6JCjwlolFSoNCnjjfAGSctsCkoTKXZuNrcVp6Y/
SPQ9Ji+oygppvfVLO7GMEwKTM+g+NBn+gscmM2XLVcSHAtAJWkz0a882zgPnW/Yc
T8Kjpa/mPcG7718dEy7h4/KBXTlXVmroIATHcSHCfJ9ZoLsQMoQHf5it0N90Er7L
2L7ikDe9ee9hUtUOMrDU/6mbKy8VRMMQMQhUexkrkPW2KKEbxBj0e8bezSqFB0k2
ztfXv6uC2b/naAKOO7uVs319mxACCGAtFR1ZAikuFHwZueobTOeXznhODoMk/qm8
nacNwJKUN4MPTnu7nw==
=ISAl
-----END PGP SIGNATURE-----
Merge tag 'extcon-next-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes:
Update extcon next for v5.20
Detailed description for this pull request:
1. Add new connector type of both EXTCON_DISP_CVBS and EXTCON_DISP_EDP
- Add both EXTCON_DISP_CVBS for Composite Video Broadcast Signal[1] and
EXTCON_DISP_EDP for Embedded Display Port[2].
[1] https://en.wikipedia.org/wiki/Composite_video
[2] https://en.wikipedia.org/wiki/DisplayPort#eDP
2. Fix the minor issues of extcon provider driver
- Drop unused remove function on extcon-fsa9480.c
- Remove extraneous space before a debug message on extcon-palmas.c
- Remove duplicate word in the comment
- Drop useless mask_invert flag on irqchip on extcon-sm5502.c
- Drop useless mask_invert flag on irqchip on extcon-rt8973a.c
* tag 'extcon-next-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon:
extcon: Add EXTCON_DISP_CVBS and EXTCON_DISP_EDP
extcon: rt8973a: Drop useless mask_invert flag on irqchip
extcon: sm5502: Drop useless mask_invert flag on irqchip
extcon: Drop unexpected word "the" in the comments
extcon: Remove extraneous space before a debug message
extcon: fsa9480: Drop no-op remove function
Here are the interconnect changes for the 5.20-rc1 merge window consisting
of two new drivers, misc driver improvements and new device managed API.
Core change:
- Add device managed bulk API
Driver changes:
- New driver for NXP i.MX8MP platforms
- New driver for Qualcomm SM6350 platforms
- Multiple bucket support for Qualcomm RPM-based drivers.
Signed-off-by: Georgi Djakov <djakov@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJi0YXiAAoJEIDQzArG2BZjA1YP/02pishqRKRk6t4M18zKbwwK
Preh54CDOrxvd2Fqno3Ft3JLGqd6EtpyDbFV9g/90o43WFHKmEn70Jbmi3N60aqj
a4M5KU7b+fQyNqus1Z/XQFsfqZ1suAiQHYljIWsbWVkaYHti2geQThblmZ8bsr2m
AZ0MtDMRvix0XEekDHgS6l52C8owLr3kGbuHGZuQNTGQPKCI5+sQ26+eh49khQUj
ecxndxuQSj3gMtEBw5AaxY3djpV6DJs/qmkPBZaxpDDSc2RNnb+6ZNKMeaarvz0j
TI3ZRwq+CGbBB/DQOmEx2Sbo2rlMXd0IQotBJDiN1xs/pXRSyoaWZUW/KK0erZcN
D1XL33Yzxu67NIKl5K8GteP0OxGTzyE9y91Yh2mprCBdRxg77zyQd+NDtiJ+wMqW
hp+JoOOINa1muGWGqVZxUt3ACU3Wn4TCzFQajzRDsdHNrx79nLaRQzfu0SsCXfBL
DkkMaJIkt069yWzfhUBgAkq8X+En4SPcA662EqQbxXXQ5hF7Knlj25q70diu7lxq
O63KPSkN8GIu5fyhyFBpJ9nRxT70k7PDxJW40cL0sSejiprPc4UzKUQD4wQjK2OC
1gNRwKkWGq13SbfOmqy2G9CW5+tsTWqUoXRzYfHr4q8Cpwc9pZA8pXvYS5ujTFtq
g1ZbGI2Aw906ZM3nqmUJ
=VTig
-----END PGP SIGNATURE-----
Merge tag 'icc-5.20-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next
Georgi writes:
interconnect changes for 5.20
Here are the interconnect changes for the 5.20-rc1 merge window consisting
of two new drivers, misc driver improvements and new device managed API.
Core change:
- Add device managed bulk API
Driver changes:
- New driver for NXP i.MX8MP platforms
- New driver for Qualcomm SM6350 platforms
- Multiple bucket support for Qualcomm RPM-based drivers.
Signed-off-by: Georgi Djakov <djakov@kernel.org>
* tag 'icc-5.20-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
PM / devfreq: imx: Register i.MX8MP interconnect device
interconnect: imx: Add platform driver for imx8mp
interconnect: imx: configure NoC mode/prioriry/ext_control
interconnect: imx: introduce imx_icc_provider
interconnect: imx: set src node
interconnect: imx: fix max_node_id
interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values
interconnect: qcom: icc-rpm: Support multiple buckets
interconnect: qcom: icc-rpm: Change to use qcom_icc_xlate_extended()
interconnect: qcom: Move qcom_icc_xlate_extended() to a common file
dt-bindings: interconnect: Update property for icc-rpm path tag
interconnect: icc-rpm: Set destination bandwidth as well as source bandwidth
interconnect: qcom: msm8939: Use icc_sync_state
interconnect: add device managed bulk API
dt-bindings: interconnect: add fsl,imx8mp.h
dt-bindings: interconnect: imx8m: Add bindings for imx8mp noc
interconnect: qcom: Add SM6350 driver support
dt-bindings: interconnect: Add Qualcomm SM6350 NoC support
dt-bindings: interconnect: qcom: Split out rpmh-common bindings
interconnect: qcom: icc-rpmh: Support child NoC device probe
include/linux/firmware/intel/stratix10-svc-client.h:55: warning: This comment
starts with '/**', but isn't a kernel-doc comment. Refer
Documentation/doc-guide/kernel-doc.rst
* Flag bit for COMMAND_RECONFIG
Fixes: 4a4709d470 ("firmware: stratix10-svc: add new FCS commands")
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20220715150349.2413994-1-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch set is to support bucket in icc-rpm driver, so it implements
the similar mechanism in the icc-rpmh driver.
It uses interconnect path tag to indicate the bandwidth voting is for
which buckets, and there have three kinds of buckets: AWC, WAKE and
SLEEP, finally the wake and sleep bucket values are used to set the
corresponding clock (active and sleep clocks). So far, we keep the AWC
bucket but doesn't really use it.
Link: https://lore.kernel.org/r/20220712015929.2789881-1-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
This patchset is to support i.MX8MP NoC settings, i.MX8MP NoC initial
value after power up is invalid, need set a valid value after related
power domain up.
This patchset also includes two patch[1,2] during my development to enable
the ICC feature for i.MX8MP.
I not include ddrc DVFS in this patchset, ths patchset is only to
support NoC value mode/priority/ext_control being set to a valid value
that suggested by i.MX Chip Design Team. The value is same as NXP
downstream one inside Arm Trusted Firmware:
https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/i/gpc.c?h=lf_v2.4#n97
Link: https://lore.kernel.org/r/20220703091132.1412063-1-peng.fan@oss.nxp.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Same to i.MX8MM/N/Q, register i.MX8MP interconnect device to make
i.MX8MP Interconnect driver work.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20220703091132.1412063-10-peng.fan@oss.nxp.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Introduce imx_icc_noc_setting structure to describe a master port setting
Pass imx_icc_noc_setting as a parameter from specific driver
Set priority level, mode, ext control in imx_icc_node_set
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20220703091132.1412063-8-peng.fan@oss.nxp.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
max_node_id not equal to the ARRAY_SIZE of node array, need increase 1,
otherwise xlate will fail for the last entry. And rename max_node_id
to num_nodes to reflect the reality.
Fixes: f0d8048525 ("interconnect: Add imx core driver")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20220703091132.1412063-5-peng.fan@oss.nxp.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
There's no need to set the flag explicitly to false, since that
is the default value from zero initialization.
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
There's no need to set the flag explicitly to false, since that
is the default value from zero initialization.
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
there is an unexpected word "the" in the comments that need to be dropped
file: ./drivers/extcon/extcon.c
line: 250
/* Find the the index of extcon cable in edev->supported_cable */
changed to
/* Find the index of extcon cable in edev->supported_cable */
Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
There is an extreneous space before a dev_dbg message, remove it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
A remove callback that just returns 0 is equivalent to no callback at all
as can be seen in i2c_device_remove(). So simplify accordingly.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
We are to support a new SMC Command of hexadecimal 0x200 that returns
the ATF Firmware major and minor version.
Signed-off-by: Ang Tien Sung <tien.sung.ang@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20220711223140.2307945-6-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Extend Intel Stratix10 service layer driver to support new RSU
DCMF status reporting.
The status of each DCMF is reported. The currently used DCMF is used as
reference, while the other three are compared against it to determine if
they are corrupted.
DCMF = Decision Configuration Management Firmware
RSU = Remote System Update
Signed-off-by: Radu Bacrau <radu.bacrau@intel.com>
Signed-off-by: Ang Tien Sung <tien.sung.ang@intel.com>
Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20220711223140.2307945-5-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Extend RSU driver to get DCMF status.
The status of each DCMF is reported. The currently used DCMF is used as
reference, while the other three are compared against it to determine if
they are corrupted.
DCMF = Decision Configuration Management Firmware.
RSU = Remote System Update
Signed-off-by: Radu Bacrau <radu.bacrau@intel.com>
Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20220711223140.2307945-4-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Extending the fpga svc driver to support 6 new FPGA Crypto
Service(FCS) commands.
We are adding FCS SDOS data encryption and decryption,
random number generator, image validation request,
reading the data provision and certificate validation.
Signed-off-by: Ang Tien Sung <tien.sung.ang@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20220711223140.2307945-3-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Introduce a new SMC command INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED
that polls if a previous asynchronous command was completed. This
SMC command is used by the new FPGA Crypto Service (FCS).
A basic example is that the FCS sends an AES data encryption
call to the secure device manager(SDM) and waits for the completion
of the operation by continuously polling the results with the new
command.
Signed-off-by: Ang Tien Sung <tien.sung.ang@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20220711223140.2307945-2-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Extend Intel service layer driver to support FPGA Crypto service(FCS)
features on Intel Soc platforms. Adding an additional channel and FCS
platform driver ("intel_fcs") as part of the probe method.
FCS driver uses the driver to send crypto operations' commands to
the secure device manager(SDM) on Intel Soc platforms Stratix10 and
Agilex.
Signed-off-by: Ang Tien Sung <tien.sung.ang@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20220711223140.2307945-1-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver creates per-cpu hrtimers which are required to do the
periodic 'pet' operation. On a conventional watchdog-core driver, the
userspace is responsible for delivering the 'pet' events by writing to
the particular /dev/watchdogN node. In this case we require a strong
thread affinity to be able to account for lost time on a per vCPU.
This part of the driver is the 'frontend' which is reponsible for
delivering the periodic 'pet' events, configuring the virtual peripheral
and listening for cpu hotplug events. The other part of the driver is
an emulated MMIO device which is part of the KVM virtual machine
monitor and this part accounts for lost time by looking at the
/proc/{}/task/{}/stat entries.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Will Deacon <will@kernel.org>
Signed-off-by: Sebastian Ene <sebastianene@google.com>
Link: https://lore.kernel.org/r/20220711081720.2870509-3-sebastianene@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The VCPU stall detection mechanism allows to configure the expiration
duration and the internal counter clock frequency measured in Hz.
Add these properties in the schema.
While this is a memory mapped virtual device, it is expected to be loaded
when the DT contains the compatible: "qemu,vcpu-stall-detector" node.
In a protected VM we trust the generated DT nodes and we don't rely on
the host to present the hardware peripherals.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Ene <sebastianene@google.com>
Link: https://lore.kernel.org/r/20220711081720.2870509-2-sebastianene@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
When building with Clang we encounter the following warning:
| drivers/misc/mei/hw-me.c:564:44: error: format specifies type 'unsigned
| short' but the argument has type 'int' [-Werror,-Wformat]
| dev_dbg(dev->dev, "empty slots = %hu.\n", empty_slots);
The format specifier used is `%hu` which specifies an unsigned short,
however, empty_slots is an int -- hence the warning.
Link: https://github.com/ClangBuiltLinux/linux/issues/378
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20220708203549.3834790-1-justinstitt@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The simple_write_to_buffer() function will return positive/success if it
is able to write a single byte anywhere within the buffer. However that
potentially leaves a lot of the buffer uninitialized.
In this code it's better to return 0 if the offset is non-zero. This
code is not written to support partial writes. And then return -EFAULT
if the buffer is not completely initialized.
Fixes: cfad642538 ("eeprom: Add IDT 89HPESx EEPROM/CSR driver")
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Ysg1Pu/nzSMe3r1q@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Several on-running cleanup efforts dominate this time, plus the DMA
safety alignment issue identified due to improved understanding of
the restrictions as a result of Catalin Marinas' efforts in that area.
One immutable branch in here due to MFD and SPMI elements needed for
the qcom-rradc driver.
Device support
* bmi088
- Add support for bmi085 (accelerometer part of IMU)
- Add support for bmi090l (accelerometer part of IMU)
* mcp4922
- Add support for single channel device MCP4921
* rzg2l-adc
- Add compatible and minor tweaks to support RZ/G2UL ADC
* sca3300
- Add support for scl3300 including refactoring driver to support
multiple device types and cleanup noticed whilst working on driver.
* spmi-rradc
- New driver for Qualcomm SPMI Round Robin ADC including necessary
additional utility functions in SPMI core and related MFD driver.
* ti-dac55781
- Add compatible for DAC121C081 which is very similar to existing parts.
Features
* core
- Warn on iio_trigger_get() on an unregistered IIO trigger.
* bma400
- Triggered buffer support
- Activity and step counting
- Misc driver improvements such as devm and header ordering
* cm32181
- Add PM support.
* cros_ec
- Sensor location support
* sx9324
- Add precharge resistor setting
- Add internal compensation resistor setting
- Add CS idle/sleep mode.
* sx9360
- Add precharge resistor setting
* vl53l0x
- Handle reset GPIO, regulator and relax handling of irq type.
Cleanup and minor fixes:
Treewide changes
- Cleanup of error handling in remove functions in many drivers.
- Update dt-binding maintainers for a number of ADI bindings.
- Several sets of conversion of drivers from device tree specific to
generic device properties. Includes fixing up various related
header and Kconfig issues.
- Drop include of of.h from iio.h and fix up drivers that need to include
it directly.
- More moves of clusters of drivers into appropriate IIO_XXX namespaces.
- Tree wide fix of a long running bug around DMA safety requirements.
IIO was using __cacheline_aligned to pad iio_priv() structures. This
worked for a long time by coincidence, but correct alignment is
ARCH_KMALLOC_MINALIGN. As there is activity around this area, introduce
an IIO local IIO_DMA_MINALIGN to allow for changing it in one place rather
than every driver in future. Note, there have been no reports of this
bug in the wild, and it may not happen on any platforms supported by
upstream, so no rush to backport these fixes.
Other cleanup
* core
- Switch to ida_alloc()/free()
- Drop unused iio_get_time_res()
- Octal permissions and DEVICE_ATTR_* macros.
- Cleanup bared unsigned usage.
* MAINTAINERS
- Add include/dt-bindings/iio/ to the main IIO entry.
* ad5380
- Comment syntax fix.
* ad74413r
- Call to for_each_set_bit_from(), with from value as 0 replaced.
* ad7768-1
- Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core.
* adxl345
- Fix wrong address in dt-binding example.
* adxl367
- Drop extra update of FIFO watermark.
* at91-sama5d2
- Limit requested watermark to the hwfifo size.
* bmg160, bme680
- Typos
* cio-dac
- Switch to iomap rather than direct use of ioports
* kxsd9
- Replace CONFIG_PM guards with new PM macros that let the compiler
cleanly remove the unused code and structures when !CONFIG_PM
* lsm6dsx
- Use new pm_sleep_ptr() and EXPORT_SIMPLE_DEV_PM_OPS(). Then move
to Namespace.
* meson_saradc - general cleanup.
- Avoid attaching resources to iio_dev->dev
- Use same struct device for all error messages
- Convert to dev_err_probe() and use local struct device *dev to
reduce code complexity.
- Use devm_clk_get_optional() instead of hand rolling.
- Use regmap_read_poll_timeout() instead of hand rolling.
* mma7660
- Drop ACPI_PTR() use that is unhelpful.
* mpu3050
- Stop exporting symbols not used outside of module
- Switch to new DEFINE_RUNTIME_DEV_PM_OPS() macro and move to Namespace.
* ping
- Typo fix
* qcom-spmi-rradc
- Typo fix
* sc27xx
- Convert to generic struct u32_fract
* srf08
- Drop a redundant check on !val
* st_lsm6dsx
- Limit the requested watermark to the hwfifo size.
* stm32-adc
- Use generic_handle_domain_irq() instead of opencoding.
- Fix handling of ADC disable.
* stm32-dac
- Use str_enabled_disable() instead of open coding.
* stx104
- Switch to iomap rather than direct use of ioports
* tsc2046
- Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core.
* tsl2563
- Replace flush_scheduled_work() with cancel_delayed_work_sync()
- Replace cancel_delayed_work() with cancel_delayed_work_sync()
* vl53l0x
- Make the VDD regulator optional by allowing a dummy regulator.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmLQBwARHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FohMHRAAi3nPM3IchXe886olumRgX5ke75vU+FNT
sqQjqlpl6X7j5yNLU+HF6lC7zg3QzDnfWJ3Uo4C7s2sW7zO0997lkFx4jvF3yW9y
0nLDgYm1Y1te/qR84BE355pMEsYEJVZyPI/Z8UfuBh6IfnSDeTE5ZwCvlRMAchtp
AX+j1114FQvZ8yfdIlFjlN4vYSxCGgEZzfWYhpch/Jv1y2Q0L17bpv/KWGt1AYaF
VugmKoNTM3WzIABBNGWQ4l4ZVVuVpuiVUL90AKv6Qf+yDSqw94tuIM0NZpJ1rqLr
7tH568m7Eewh7zBp88PRB9XDiZVERvzdVQaT22+wlX+Vhn/SKeoK8PPpdLWD1YyG
hXB0p+FGKncoKKgK1w9L7qRRNmsQDHowNHYMSjnzeBuyGQyEqwAXzNvvbiCqHh8y
7b8GW+CYo7//wIarg74Xl+/4LwdCGcMUJNuTm1efEgC7yGToY7JD63DNo3sylaII
bfoT06/yogaay/rVLZs5n+MvDONaDt4AbTTErG48s0TzqD/O8Ys85AF0IvKwQ80N
WMxe4y+gdJ6VuU+ww9+6WdUzxnx+5gt+ZA2iLxZFekOIUi3Tj+q47F+17Jvwyt7U
2wQzdtvNhHPwD5CqYpxD4iH/z5YFCtIHKjmUsVyAWGVbeuSS/QvFzpf39YWxBWO+
W1w6RStUbXo=
=IcsE
-----END PGP SIGNATURE-----
Merge tag 'iio-for-5.20a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
IIO new device support, features and minor fixes for 5.20
Several on-running cleanup efforts dominate this time, plus the DMA
safety alignment issue identified due to improved understanding of
the restrictions as a result of Catalin Marinas' efforts in that area.
One immutable branch in here due to MFD and SPMI elements needed for
the qcom-rradc driver.
Device support
* bmi088
- Add support for bmi085 (accelerometer part of IMU)
- Add support for bmi090l (accelerometer part of IMU)
* mcp4922
- Add support for single channel device MCP4921
* rzg2l-adc
- Add compatible and minor tweaks to support RZ/G2UL ADC
* sca3300
- Add support for scl3300 including refactoring driver to support
multiple device types and cleanup noticed whilst working on driver.
* spmi-rradc
- New driver for Qualcomm SPMI Round Robin ADC including necessary
additional utility functions in SPMI core and related MFD driver.
* ti-dac55781
- Add compatible for DAC121C081 which is very similar to existing parts.
Features
* core
- Warn on iio_trigger_get() on an unregistered IIO trigger.
* bma400
- Triggered buffer support
- Activity and step counting
- Misc driver improvements such as devm and header ordering
* cm32181
- Add PM support.
* cros_ec
- Sensor location support
* sx9324
- Add precharge resistor setting
- Add internal compensation resistor setting
- Add CS idle/sleep mode.
* sx9360
- Add precharge resistor setting
* vl53l0x
- Handle reset GPIO, regulator and relax handling of irq type.
Cleanup and minor fixes:
Treewide changes
- Cleanup of error handling in remove functions in many drivers.
- Update dt-binding maintainers for a number of ADI bindings.
- Several sets of conversion of drivers from device tree specific to
generic device properties. Includes fixing up various related
header and Kconfig issues.
- Drop include of of.h from iio.h and fix up drivers that need to include
it directly.
- More moves of clusters of drivers into appropriate IIO_XXX namespaces.
- Tree wide fix of a long running bug around DMA safety requirements.
IIO was using __cacheline_aligned to pad iio_priv() structures. This
worked for a long time by coincidence, but correct alignment is
ARCH_KMALLOC_MINALIGN. As there is activity around this area, introduce
an IIO local IIO_DMA_MINALIGN to allow for changing it in one place rather
than every driver in future. Note, there have been no reports of this
bug in the wild, and it may not happen on any platforms supported by
upstream, so no rush to backport these fixes.
Other cleanup
* core
- Switch to ida_alloc()/free()
- Drop unused iio_get_time_res()
- Octal permissions and DEVICE_ATTR_* macros.
- Cleanup bared unsigned usage.
* MAINTAINERS
- Add include/dt-bindings/iio/ to the main IIO entry.
* ad5380
- Comment syntax fix.
* ad74413r
- Call to for_each_set_bit_from(), with from value as 0 replaced.
* ad7768-1
- Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core.
* adxl345
- Fix wrong address in dt-binding example.
* adxl367
- Drop extra update of FIFO watermark.
* at91-sama5d2
- Limit requested watermark to the hwfifo size.
* bmg160, bme680
- Typos
* cio-dac
- Switch to iomap rather than direct use of ioports
* kxsd9
- Replace CONFIG_PM guards with new PM macros that let the compiler
cleanly remove the unused code and structures when !CONFIG_PM
* lsm6dsx
- Use new pm_sleep_ptr() and EXPORT_SIMPLE_DEV_PM_OPS(). Then move
to Namespace.
* meson_saradc - general cleanup.
- Avoid attaching resources to iio_dev->dev
- Use same struct device for all error messages
- Convert to dev_err_probe() and use local struct device *dev to
reduce code complexity.
- Use devm_clk_get_optional() instead of hand rolling.
- Use regmap_read_poll_timeout() instead of hand rolling.
* mma7660
- Drop ACPI_PTR() use that is unhelpful.
* mpu3050
- Stop exporting symbols not used outside of module
- Switch to new DEFINE_RUNTIME_DEV_PM_OPS() macro and move to Namespace.
* ping
- Typo fix
* qcom-spmi-rradc
- Typo fix
* sc27xx
- Convert to generic struct u32_fract
* srf08
- Drop a redundant check on !val
* st_lsm6dsx
- Limit the requested watermark to the hwfifo size.
* stm32-adc
- Use generic_handle_domain_irq() instead of opencoding.
- Fix handling of ADC disable.
* stm32-dac
- Use str_enabled_disable() instead of open coding.
* stx104
- Switch to iomap rather than direct use of ioports
* tsc2046
- Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core.
* tsl2563
- Replace flush_scheduled_work() with cancel_delayed_work_sync()
- Replace cancel_delayed_work() with cancel_delayed_work_sync()
* vl53l0x
- Make the VDD regulator optional by allowing a dummy regulator.
* tag 'iio-for-5.20a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (244 commits)
iio: adc: xilinx-xadc: Drop duplicate NULL check in xadc_parse_dt()
iio: adc: xilinx-xadc: Make use of device properties
iio: light: cm32181: Add PM support
iio: adc: ad778-1: do not explicity set INDIO_BUFFER_TRIGGERED mode
iio: adc: ti-tsc2046: do not explicity set INDIO_BUFFER_TRIGGERED mode
iio: adc: stm32-adc: disable adc before calibration
iio: adc: stm32-adc: make safe adc disable
iio: dac: ad5380: align '*' each line and drop unneeded blank line
iio: adc: qcom-spmi-rradc: Fix spelling mistake "coherrency" -> "coherency"
iio: Don't use bare "unsigned"
dt-bindings: iio: dac: mcp4922: expand for mcp4921 support
iio: dac: mcp4922: add support to mcp4921
iio: chemical: sps30: Move symbol exports into IIO_SPS30 namespace
iio: pressure: bmp280: Move symbol exports to IIO_BMP280 namespace
iio: imu: bmi160: Move exported symbols to IIO_BMI160 namespace
iio: adc: stm32-adc: Use generic_handle_domain_irq()
proximity: vl53l0x: Make VDD regulator actually optional
MAINTAINERS: add include/dt-bindings/iio to IIO SUBSYSTEM AND DRIVERS
dt-bindings: iio/accel: Fix adi,adxl345/6 example I2C address
iio: gyro: bmg160: Fix typo in comment
...
The fwnode_for_each_child_node() is NULL-aware, no need to check
its parameters outside. Drop duplicate NULL check in xadc_parse_dt().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220531141118.64540-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.
Add mod_devicetable.h include.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20220531141118.64540-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
- Add Gaudi2 ASIC support. All the features required for Gaudi2 are included
in this tag (except the networking aspect).
- Add more events to the eventfd support in the driver. With the new code, we
expose three events that the user can register to get notification about them.
- re-factor soft reset code and replace its name to compute reset to better
reflect the actual reset done in new ASICs
- Change the way Gaudi2 triggers an MSI-X interrupt due to h/w bug.
- Improve the code of the debugfs node that scrubs the device's memory.
- Add mechanism for better compatibility with older f/w versions
- Cleanup kernel log prints by moving some prints to debug and removing others.
- Many small bug fixes and minor changes.
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEE7TEboABC71LctBLFZR1NuKta54AFAmLNJ54ACgkQZR1NuKta
54Dv6QgAqL79pZbAGQRw7deWkbBEy5IAwp7Kk3KqQNxi1jHZ502iNc8ntyYsL6zc
TVEx4j9KlJfayVncr2ciqJ49NN1kZfarkIoYABO+qlCmTpdVj3lpBytaEqqTfw4p
iqmacAEcCDcfbn+qh9qjnNsfMPxqFa21gE0lPKe1au1tEWVeeNynKnNe0DW8GIVE
HcqYuSilUZ4g5KSyoXBzapsGx16ja+GsHZCsJPC1sp/pabt9/RHaeMer5njD4FoY
gCiz9QgsO89ENMJ18bgWDcdsKx8tXe0kOtMi5/ypXm7JSiwajkt1+OQdIYQFBEu9
uzC6aTYFUQflvS0DHC0YyDZOM0gNiQ==
=uAns
-----END PGP SIGNATURE-----
Merge tag 'misc-habanalabs-next-2022-07-12' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-next
Oded writes:
This tag contains habanalabs driver changes for v5.20:
- Add Gaudi2 ASIC support. All the features required for Gaudi2 are included
in this tag (except the networking aspect).
- Add more events to the eventfd support in the driver. With the new code, we
expose three events that the user can register to get notification about them.
- re-factor soft reset code and replace its name to compute reset to better
reflect the actual reset done in new ASICs
- Change the way Gaudi2 triggers an MSI-X interrupt due to h/w bug.
- Improve the code of the debugfs node that scrubs the device's memory.
- Add mechanism for better compatibility with older f/w versions
- Cleanup kernel log prints by moving some prints to debug and removing others.
- Many small bug fixes and minor changes.
* tag 'misc-habanalabs-next-2022-07-12' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: (88 commits)
habanalabs: move h/w dirty message to debug
habanalabs: rename soft reset to compute reset
habanalabs: add status of reset after device release
habanalabs: fix update of is_in_soft_reset
habanalabs: expose only valid debugfs nodes
habanalabs/gaudi2: map virtual MSI-X doorbell memory for user
habanalabs/gaudi2: modify decoder to use virtual MSI-X doorbell
habanalabs/gaudi2: modify CS completion CQ to use virtual MSI-X doorbell
habanalabs/gaudi2: replace defines for reserved sob/mob with enums
habanalabs/gaudi2: configure virtual MSI-X doorbell interface
habanalabs: add a value field to hl_fw_send_pci_access_msg()
habanalabs: fixes to the poll-timeout macros
habanalabs/gaudi2: use DIV_ROUND_UP_SECTOR_T instead of roundup
habanalabs: initialize variable explicitly
habanalabs: Use the bitmap API to allocate bitmaps
habanalabs/gaudi2: remove unused defines
habanalabs: make sure variable is set before used
habanalabs: don't declare tmp twice in same function
habanalabs: do not set max power on a secured device
habanalabs/gaudi2: SM mask can only be 8-bit
...
This commit uses buckets for support bandwidth and clock rates. It
introduces a new function qcom_icc_bus_aggregate() to calculate the
aggregate average and peak bandwidths for every bucket, and also it
calculates the maximum value of aggregated average bandwidth across all
buckets.
The maximum aggregated average is used to calculate the final bandwidth
requests. And we can set the clock rate per bucket, we use SLEEP bucket
as default bucket if a platform doesn't enable the interconnect path
tags in DT binding; otherwise, we use WAKE bucket to set active clock
and use SLEEP bucket for other clocks. So far we don't use AMC bucket.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-6-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
The current interconnect rpm driver uses a single aggregate bandwidth to
calculate the clock rates for both active and sleep clocks; therefore,
it has no chance to separate bandwidth requests for these two kinds of
clocks.
This patch studies the implementation from interconnect rpmh driver to
support multiple buckets. The rpmh driver provides three buckets for
AMC, WAKE, and SLEEP; this driver only needs to use WAKE and SLEEP
buckets, but we keep the same way with rpmh driver, this can allow us to
reuse the DT binding and avoid to define duplicated data structures.
This patch introduces two callbacks: qcom_icc_pre_bw_aggregate() is used
to clean up bucket values before aggregate bandwidth requests, and
qcom_icc_bw_aggregate() is to aggregate bandwidth for buckets.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-5-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
This commit changes to use callback qcom_icc_xlate_extended(). This
is a preparation for population path tags from the interconnect DT
binding, it doesn't introduce functionality change for the existed DT
binding without path tags.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-4-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
since there have conflict between two headers icc-rpmh.h and icc-rpm.h,
the function qcom_icc_xlate_extended() is declared in icc-rpmh.h thus
it cannot be used by icc-rpm driver.
Move the function to a new common file icc-common.c so that allow it to
be called by multiple drivers.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-3-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
To support path tag in icc-rpm driver, the "#interconnect-cells"
property is updated as enumerate values: 1 or 2. Setting to 1 means
it is compatible with old DT binding that interconnect path only
contains node id; if set to 2 for "#interconnect-cells" property, then
the second specifier is used as a tag (e.g. vote for which buckets).
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-2-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
H/W being dirty during initialization is completely expected in case
f/w tools are used before loading the driver. As it is not an error,
and as it doesn't give any meaningful information to the user,
no point of printing it.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Doing compute reset can be the traditional inference soft reset
that is supported only in Goya.
Or it can be the new reset upon device release, which is supported
in Gaudi2 and above.
Therefore, wherever suitable, use the terminology of compute reset
instead of soft reset.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
The user might want to know the device is in reset after device
release, which is not an erroneous event as a regular reset.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
reset_info.is_in_soft_reset should be updated both before in_reset
and inside the spin lock of the reset info structure.
The reasons are:
- When we are inside soft reset, it implies we are in reset. Therefore,
if someone checks if we are in soft reset, he can deduce we are
in reset, while the opposite is not correct and might be misleading.
- Both these flags are changed together so they must be changed
inside the reset info spinlock.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>