| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
1st set of IIO new device support, features and cleanups for the 6.3 cycle
The usual mixed bag. So far this has been a quiet cycle for IIO.
New device support
* adi,ad8686
- Add support for the AD5337 DAC - ID and 8 bit channel support.
* maxim,max5522
- New driver for this 2 channel DAC.
* nxp,imx93-adc
- New driver for this SoC ADC which is a fresh IP that will probably
turn up in additional SoCs going forwards.
* st,magn
- Add support for magnetometer part of LSM303C which is very similar
to standalone LIS3MDL already supported.
* ti,ads7924
- New driver for this 4 channel, 12-bit I2C ADC.
* ti,lmp92064
- New driver for this 12 bit SPI ADC.
* ti,tmag5273
- New driver for this 3D Hall-Effect Sensor.
Features
* core
- Add a standard structure for the value pairs in IIO_VAL_INT_PLUS_MICRO
available attributes and similar.
* cirrus,ep93xx
- Add DT binding docs and convert driver to DT based probing.
- Enable testing building with CONFIG_COMPILE_TEST.
* st,stm32-dfsdm
- Enable ID register support for discovery of hardware capabilities on
some devices.
Cleanups and minor fixes
* core
- Drop the custom iio_sysfs_match_string_with_gaps().
The special ability of this function to skip gaps in an array
was never used by any upstream driver.
- Sort headers whilst touching this file.
* tools
- Fix memory leak in iio_utils.c
* various
- leftover i2c probe_new() conversions.
- scnprintf() -> sysfs_emit() cleanups.
- hand rolled devm enables -> devm_regulator[_bulk]_get_enable()
- typo fixes
- dt-binding cleanup (whitespace, excess quotes and similar)
* adi,ad7746
- Set variable without pointless conditional.
* fsl,mma9551
- Squash false positives about use of uninitialized variable where
garbage undergoes an endian conversion before being ignored.
* measspec,ms5611
- Switch to fully devm_ managed probe() and so drop explicit remove()
* qcom,spmi-adc
- Use dev_err_probe() to suppress deferred print.
* qcom,spmi-adc5
- Define a missing channel used for battery identification.
* qcom,spmi-iadc
- Document a compatible seen in wild.
* semtech,sx9360
- Fix units on semtech,resolution dt-binding.
* sensiron,scd30
- dev_err_probe() usage to simplify error paths a little.
* st,lsm6dsx
- Add missing mount matrix for the gyro IIO device.
* taos,tsl2563
- Respect firmware configured interrupt polarity if present.
- Use i2c_smbus_write_word_data() in a few cases not previously covered.
- Factor out duplicated interrupt configuration.
- Switch to GENMASK() / BIT() from hand coded equivalents.
- Tidy up unused definitions.
- Use dev_err_probe() as appropriate.
- Drop platform_data as no in kernel users and there are better ways to
do equivalent if any are added.
- Add local struct device variable to tidy up code.
- Avoid dance via i2c_client to get the drvdata.
- Tidy up headers ordering and Makefile ordering.
* ti,adc128s052
- Use new spi_get_device_match_data().
- Drop ACPI_PTR() protection.
- Sort headers whilst here.
- Use asm instead of incorrect include of asm-generic/unaligned.h
* vishay,vcn4000
- Interrupt support for vcnl4040 (lots of refactoring needed)
* xilinx,ams
- Use fwnode_device_is_compatible() instead of open coding it.
* tag 'iio-for-6.3a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (71 commits)
iio: adc: ad7291: Fix indentation error by adding extra spaces
iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word()
iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word()
dt-bindings: iio/proximity: semtech,sx9360: Fix 'semtech,resolution' type
iio: imu: fix spdx format
iio: adc: imx93: Fix spelling mistake "geting" -> "getting"
dt-bindings: iio: cleanup examples - indentation
dt-bindings: iio: use lowercase hex in examples
dt-bindings: iio: correct node names in examples
dt-bindings: iio: minor whitespace cleanups
dt-bindings: iio: drop unneeded quotes
dt-bindings: iio: adc: Add NXP IMX93 ADC
iio: adc: add imx93 adc support
dt-bindings: iio: adc: add Texas Instruments ADS7924
iio: adc: ti-ads7924: add Texas Instruments ADS7924 driver
iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel.
iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' in st_lsm6dsx_shub.c.
iio: light: vcnl4000: Add interrupt support for vcnl4040
iio: light: vcnl4000: Make irq handling more generic
iio: light: vcnl4000: Prepare for more generic setup
...
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added extra spaces before statements to fix
following indentation warnings reported by checkpatch.pl.
WARNING: Statements should start on a tabstop
+ return 0;
Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
Link: https://lore.kernel.org/r/Y9Vf4Tp8JKvy+y0u@yoga
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
mma9551_read_config_word()
Smatch Warns:
drivers/iio/accel/mma9551_core.c:299
mma9551_read_config_word() error: uninitialized symbol 'v'.
When (offset >= 1 << 12) is true mma9551_transfer() will return -EINVAL
without 'v' being initialized, so check for the error and return.
Note: No actual bug as caller checks the return value and does not
use the parameter in the problem case.
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20230126153610.3586243-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
mma9551_read_status_word()
Smatch Warns: drivers/iio/accel/mma9551_core.c:357
mma9551_read_status_word() error: uninitialized symbol 'v'.
When (offset >= 1 << 12) is true mma9551_transfer() will return -EINVAL
without 'v' being initialized, so check for the error and return.
Note: Not a bug as such because the caller checks return value and
doesn't not use this parameter in the problem case.
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20230126152147.3585874-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
checkpatch reports
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
FILE: drivers/iio/imu/bno055/bno055_ser_trace.c:1:
+//SPDX-License-Identifier: GPL-2.0
Add a space
Fixes: 2eef5a9cc643 ("iio: imu: add BNO055 serdev driver")
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20230124194301.656518-1-trix@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Thrre is a spelling mistake in a dev_err_probe message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20230124100413.684416-1-colin.i.king@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The ADC in i.mx93 is a total new ADC IP, add a driver to support
this ADC.
Currently, only support one shot normal conversion triggered by
software. For other mode, will add in future.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/20230117135137.1735536-2-haibo.chen@nxp.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Texas Instruments ADS7924 is a 4 channels, 12-bit analog to
digital converter (ADC) with an I2C interface.
Datasheet: https://www.ti.com/lit/gpn/ads7924
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20230115170623.3680647-2-hugo@hugovil.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/1673874434-30750-3-git-send-email-Philippe.DeMuyter@macq.eu
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need the name 'st_lsm6dsx_ext_info' for the actual 'iio_chan_spec_ext_info'.
Rename the 'st_lsm6dsx_ext_info' in st_lsm6dsx_shub.c to 'st_lsm6dsx_shub_info'.
For consistency, replace also 'ext' by 'shub' in 'st_lsm6dsx_ext_attributes'
and 'st_lsm6dsx_ext_attribute_group'.
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/1673874434-30750-2-git-send-email-Philippe.DeMuyter@macq.eu
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add support to configure proximity sensor interrupts and threshold
limits for vcnl4040. If an interrupt is detected an event will be
pushed to the event interface.
Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230117190017.3789181-4-marten.lindahl@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This driver supports 4 chips, by which only one (vcnl4010) handles
interrupts and has support for triggered buffer. The setup of these
functions is hardcoded for vcnl4010 inside the generic vcnl4000_probe,
and thus ignores the chip specific configuration structure where all
other chip specific functions are specified.
This complicates adding interrupt handler and triggered buffer support
to chips which may have support for it.
Add members for irq threads and iio_buffer_setup_ops to the generic
vcnl4000_chip_spec struct, so that instead of checking a chip specific
boolean irq support, we check for a chip specific triggered buffer
handler, and/or a chip specific irq thread handler.
Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230117190017.3789181-3-marten.lindahl@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to allow the chip_spec array reference the function pointers
for interrupts, the code for these functions need to be moved above the
chip_spec array.
This is a prestep to support a more generic setup of interrupts.
Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230117190017.3789181-2-marten.lindahl@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add initial support for DAC max5522.
Tested writing DAC A and B with some values,
from 0 to 1023, measured output voltages, driver works properly.
Additions for max5523/24/25 will follow.
Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Link: https://lore.kernel.org/r/20221106165928.223318-1-angelo.dureghello@timesys.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sort the headers in alphabetic order in order to ease
the maintenance for this part.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230118074828.66155-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
None of the current users is using gaps in the list of the items.
No need to have a specific function for that, just replace it by
library available __sysfs_match_string().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230118074828.66155-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace open coded fwnode_device_is_compatible() in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20230119174749.76769-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Switch to use dev_err_probe() to simplify the error paths and
unify message template.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230113141917.23725-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230113141117.23353-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add support of identification registers to STM32 DFSDM
to allow hardware capabilities discovery and configuration check.
The number of filters and channels, are read from registers,
when they are available.
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20230105125331.328275-1-olivier.moysan@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Define the ADC channel used for battery identification purposes so it
can be used in drivers.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20230106-pm7250b-bat_id-v1-1-82ca8f2db741@fairphone.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The magnetometer part of ST LSM303C is similar (perhaps even identical)
to the already supported standalone LIS3MDL magnetometer, so just
add the new st,lsm303c-magn compatible for the existing definitions.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230106102239.9647-4-stephan@gerhold.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The accelerometer part of ST LSM303C is similar (perhaps even identical)
to the already supported standalone LIS2HH12 accelerometer, so just
add the new st,lsm303c-accel compatible for the existing definitions.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230106102239.9647-3-stephan@gerhold.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| | |
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Alexander Vorwerk <zabe@avorwerk.net>
Link: https://lore.kernel.org/r/20230105025351.12099-1-zabe@avorwerk.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no point to specify asm-generic for the unaligned.h.
Drop the 'generic' suffix and move the inclusion to be after
the non-IIO linux/* ones.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230103144903.39905-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sort the headers in alphabetic order in order to ease
the maintenance for this part.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230102173450.29882-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ACPI_PTR() is more harmful than helpful. For example, in this case
if CONFIG_ACPI=n, the ID table left unused and code is obfuscated
by ifdeffery.
Drop anti-pattern of ACPI_PTR() use.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230102173450.29882-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The spi_get_device_match_data() helps to get driver data from the
firmware node or SPI ID table. Use it instead of open coding.
While at it, switch ID tables to provide an acrual pointers to
the configuration data.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230102173450.29882-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is useful to be able to build this driver without needing
to build support for ARCH_EP93XX.
Also add an explicit dependency on HAS_IOMEM so we have
devm_platform_ioremap_resource() etc available.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://lore.kernel.org/r/20221231144128.489810-1-jic23@kernel.org
|
| |
| |
| |
| |
| |
| |
| |
| | |
Prepare for EP93xx conversion to DT.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://lore.kernel.org/r/20221223162636.6488-2-alexander.sverdlin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress
probe-deferral error message") the ADC5 driver also spams a similar
probe-deferral error on startup when a channel is not yet available:
[ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500: get dt data failed: -517
Suppress it by using dev_err_probe instead, which also takes care of
storing the message as reason for deferring.
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Martin Botka <martin.botka@somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20221216190945.902754-1-marijn.suijten@somainline.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There is a spelling mistake in a dev_err message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221209233202.222083-1-colin.i.king@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Makefile is sorted by a module name, keep it that way.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-11-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sort header inclusion alphabetically.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-10-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PM callbacks take struct device pointer as a parameter, use
dev_get_drvdata() to retrieve it instead of unneeded double
loop of referencing via i2c_get_clientdata(to_i2c_client(dev)).
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-9-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have a temporary variable to keep pointer to struct device.
Utilise it inside the ->probe() implementation.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no in-kernel user for legacy platform data.
Otherwise, a new one can use software nodes instead.
Hence, drop legacy platform data code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Code can be a bit simpler with dev_err_probe().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The CALIB_FRAC() is defined and might had been used in
tsl2563_calib_from_sysfs(). But let's just move a comment
from it to the latter function.
CLAIB_FRAC_HALF is used in a single place, i.e. in
tsl2563_calib_to_sysfs(). So, let's just inline it there.
While at it, switch to use DIV_ROUND_CLOSEST().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make use of BIT() and GENMASK() where it makes sense.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce tsl2563_configure_irq() to configure INT in one place.
While at it, make use of TSL2563_INT_LEVEL and newly introduced
TSL2563_INT_MASK.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Driver already uses the word accessors when it makes sense, but
in the tsl2563_configure(). Switch the latter to use word accessor.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of hardcoding IRQ trigger type to IRQF_TRIGGER_RAISING,
let's respect the settings specified in the firmware description.
To be compatible with the older firmware descriptions, if trigger
type is not set up there, we'll set it to default (raising edge).
Fixes: 388be4883952 ("staging:iio: tsl2563 abi fixes and interrupt handling")
Fixes: bdab1001738f ("staging:iio:light:tsl2563 remove old style event registration.")
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221207190348.9347-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-133-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All the remaining calls in probe() have devm_ equivalents so
switching to those allows the remove() callbacks to be deleted.
No functional change.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Tomasz Duszynski <tduszyns@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20221016163409.320197-15-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This driver only turns the power on at probe and off at remove.
The new devm_regulator_get_enable() replaces this boilerplate code.
Some additional refactoring to drop now unnecessary unwinding after
this change.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Tomasz Duszynski <tduszyns@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20221016163409.320197-14-jic23@kernel.org
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This driver only turns the power on at probe and off via a custom
devm_add_action_or_reset() callback. The new
devm_regulator_bulk_get_enable() replaces this boilerplate code.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Jagath Jog J <jagathjog1996@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20221016163409.320197-3-jic23@kernel.org
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace the open-code with sysfs_emit() to simplify the code.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212011156314630626@zte.com.cn
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace the open-code with sysfs_emit() to simplify the code.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212011142333790361@zte.com.cn
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
AD5337 belongs to the same family as the AD5338.
The difference is that the AD5337 has 8-bit precision instead of 10-bit.
Add support for the AD5337 chip in the driver.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20221130182632.3856675-2-festevam@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|