- Apr 07, 2021
-
-
Jonathan Cameron authored
These devices are not able to mask the signal used as a data ready interrupt. As such they previously requested the irq then immediately disabled it. Now we can avoid the potential of a spurious interrupt by avoiding the irq being auto enabled in the first place. I'm not sure how this code could have been called with the irq already disabled, so I believe the conditional would always have been true and have removed it. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Alexandru Ardelean <ardeleanalex@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210402184544.488862-8-jic23@kernel.org
-
Jonathan Cameron authored
This is a bit involved as the adis library code already has some sanity checking of the flags of the requested irq that we need to ensure is happy to pass through the IRQF_NO_AUTOEN flag untouched. Using this flag avoids us autoenabling the irq in the adis16460 and adis16475 drivers which cover parts that don't have any means of masking the interrupt on the device end. Note, compile tested only! Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Alexandru Ardelean <ardeleanalex@gmail.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210402184544.488862-7-jic23@kernel.org
-
Jonathan Cameron authored
This new flag cleanly avoids the need for a dance where we request the interrupt only to immediately disabling it by ensuring it is not auto-enabled in the first place. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Tomasz Duszynski <tomasz.duszynski@octakon.com> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210402184544.488862-6-jic23@kernel.org
-
Jonathan Cameron authored
This new flag ensures a requested irq is not autoenabled, thus removing the need for the disable_irq() that follows and closing off any chance of spurious interrupts. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210402184544.488862-5-jic23@kernel.org
-
Jonathan Cameron authored
Whilst a race during interrupt enabling is probably not a problem, it is better to not enable the interrupt at all. The new IRQF_NO_AUTOEN flag allows us to do that. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210402184544.488862-4-jic23@kernel.org
-
Jonathan Cameron authored
Disabling an irq before the driver has actually atempted to request it may work, but is definitely not as clean as just requesting it as normal but with the auto enable disabled. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210402184544.488862-3-jic23@kernel.org
-
Jonathan Cameron authored
As iio_poll_trigger() is safe against spurious interrupts when the trigger is not enabled, this is not a fix despite looking like a race. It is nice to simplify the code however so the interrupt is never enabled in the first place. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210402184544.488862-2-jic23@kernel.org
-
Jonathan Cameron authored
Tag for the input subsystem to pick up Picked up for IIO to allow similar changes.
-
Alexandru Ardelean authored
When dynamically allocating sysfs attributes, it's a good idea to call sysfs_attr_init() on them to initialize lock_class_keys. This change does that. The lock_class_keys are set when the CONFIG_DEBUG_LOCK_ALLOC symbol is enabled. Which is [likely] one reason why I did not see this during development. I also am not able to see this even with CONFIG_DEBUG_LOCK_ALLOC enabled, so this may [likely] be reproduce-able on some system configurations. This was reported via: https://lore.kernel.org/linux-iio/CA+U=DsrsvGgXEF30-vXuXS_k=-mjSjiBwEEzwKb1hJVn1P98OA@mail.gmail.com/T/#u Fixes: 15097c7a ("iio: buffer: wrap all buffer attributes into iio_dev_attr") Reported-by:
Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by:
Alexandru Ardelean <aardelean@deviqon.com> Link: https://lore.kernel.org/r/20210402174226.630346-1-aardelean@deviqon.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
In some cases indentation looks a bit weird with starting from = sign and being in a ladder-type style. Unify it across the module. While at it, add blank line after definition block where it needed, Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210402174911.44408-2-andriy.shevchenko@linux.intel.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
By unknown reason device name is set with an index casted from int to unsigned long while at the same time with "%ld" specifier. Both parts seems wrong to me, thus replace replace explicit casting and wrong specifier with proper one, i.e. "%d". Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210402174911.44408-1-andriy.shevchenko@linux.intel.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mugilraj Dhavachelvan authored
Dropped __func__ while using dev_dbg() and pr_debug() If the function name is desired, it can be configured using dynamic debug. Signed-off-by:
Mugilraj Dhavachelvan <dmugil2000@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210401154343.41527-1-dmugil2000@gmail.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
The timestamp control has been a function implemented in the core of IIO for a long time, so this comment is incorrect and has clearly been cut and paste into all these drivers. The remainder of the comment added nothing and was confusing so dropped that as well. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Reviewed-by:
Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210401145410.226917-1-jic23@kernel.org
-
Mauro Carvalho Chehab authored
Changeset 6ced946a ("dt-bindings:iio:dac:microchip,mcp4725 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/mcp4725.txt to: Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml. Update its cross-reference accordingly. Fixes: 6ced946a ("dt-bindings:iio:dac:microchip,mcp4725 yaml conversion") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/82fb54974e8a22be15e64343260a6de39a18edda.1617279356.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 8b74e06b ("dt-bindings:iio:dac:ti,dac7612 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/ti,dac7612.txt to: Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml. Update its cross-reference accordingly. Fixes: 8b74e06b ("dt-bindings:iio:dac:ti,dac7612 yaml conversion") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/04039b6991838f0107a42ccb0d9774cb8873a61a.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset b4be8bd1 ("dt-bindings:iio:proximity:st,vl53l0x yaml conversion") renamed: Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt to: Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml. Update its cross-reference accordingly. Fixes: b4be8bd1 ("dt-bindings:iio:proximity:st,vl53l0x yaml conversion") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/c315ff7435bb4382b9c729a6242d098befb7796d.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 7a2cf8e9 ("dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt to: Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml. Update its cross-reference accordingly. Fixes: 7a2cf8e9 ("dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/e058dc096c39933eb7647a86c57b3489906c89c3.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 8c412458 ("dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt to: Documentation/devicetree/bindings/iio/adc/renesas,rcar-gyroadc.yaml. Update its cross-reference accordingly. Fixes: 8c412458 ("dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion.") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/aa999b76bb0b6c3ca4cb0c1a8679c22c91690429.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset f383069b ("dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt to: Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.yaml. Update its cross-reference accordingly. Fixes: f383069b ("dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion.") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/d9090dc18907b4c534bf12a47e47a96ed1d3b45a.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 58ff1b51 ("dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt to: Documentation/devicetree/bindings/iio/adc/atmel,sama5d2-adc.yaml. Update its cross-reference accordingly. Fixes: 58ff1b51 ("dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/4574e4b7612f5fd683fddbcd7d7307d5e6d02988.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 6f633bc9 ("dt-bindings:iio:afe:voltage-divider: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/afe/voltage-divider.txt to: Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml. Update its cross-reference accordingly. Fixes: 6f633bc9 ("dt-bindings:iio:afe:voltage-divider: txt to yaml conversion") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/5006767228ea6392a33e280612599ab5749db021.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset ce66e52b ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt to: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml. Update its cross-reference accordingly. Fixes: ce66e52b ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/49371c37a988ffcae9188cbe4735e6eab920b2e0.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset fbac26b9 ("dt-bindings:iio:afe:current-sense-amplifier: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt to: Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.yaml. Update its cross-reference accordingly. Fixes: fbac26b9 ("dt-bindings:iio:afe:current-sense-amplifier: txt to yaml conversion.") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/d0008b06f8ca65108eb1e7734ec6e3e32ec28172.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 66a6dcc2 ("dt-bindings:iio:adc:envelope-detector: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/adc/envelope-detector.txt to: Documentation/devicetree/bindings/iio/adc/envelope-detector.yaml. Update its cross-reference accordingly. Fixes: 66a6dcc2 ("dt-bindings:iio:adc:envelope-detector: txt to yaml conversion.") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/d4ccc625ccb89730c03204b7aae98fd94ea97fc2.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 06d2ff6f ("dt-bindings:iio:dac:dpot-dac: yaml conversion.") renamed: Documentation/devicetree/bindings/iio/dac/dpot-dac.txt to: Documentation/devicetree/bindings/iio/dac/dpot-dac.yaml. Update its cross-reference accordingly. Fixes: 06d2ff6f ("dt-bindings:iio:dac:dpot-dac: yaml conversion.") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/efda999adce3332dc1b5c20a998f3824c1cc1b0f.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 9a6ac313 ("dt-bindings:iio:humidity:st,hts221 yaml conversion.") renamed: Documentation/devicetree/bindings/iio/humidity/hts221.txt to: Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml. Update its cross-reference accordingly. Fixes: 9a6ac313 ("dt-bindings:iio:humidity:st,hts221 yaml conversion.") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/a83cf29bbd27b26eb22e0046c41efebf488e7e4d.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mauro Carvalho Chehab authored
Changeset 1e6536ee ("dt-bindings:iio:dac:adi,ad5758 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/ad5758.txt to: Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml. Update its cross-reference accordingly. Fixes: 1e6536ee ("dt-bindings:iio:dac:adi,ad5758 yaml conversion") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/ca35b929c098163cfda9682ce791572629b763e2.1617279355.git.mchehab+huawei@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
This capacitance to digital converter (CDC) driver is compliant with the IIO ABI. Note, not all features supported (e.g. window event modes) but the driver should be in a useful functional state. The cleanup was done against QEMU emulation of the device rather than actual hardware. Whilst this was a bit of an experiment, it made it easy to confirm that the driver remained in a consistent working state through the various refactors. If it worked in the first place, it should still be working after this cleanup. Given some IIO drivers require expensive hardware setups, (not particularly true with this one) the use of QEMU may provide a viable way forward for providing testing during code changes where previously we'd had to rely on sharp eyes and crossed fingers. Note, no explicit MAINTAINERS entry as it will be covered by the generic catch-alls for ADI and IIO drivers which are sufficient. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-25-jic23@kernel.org
-
Jonathan Cameron authored
Binding covering the ad7150, ad7151 and ad7156 capacitance to digital convertors. The only difference between these is how many channels they have (1 or 2) Whilst it is clearly necessary to provide power to the part, we don't need to know the voltage or anything so if it is always on, there should be no need to have it specified in the binding. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: devicetree@vger.kernel.org Reviewed-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210314181511.531414-24-jic23@kernel.org
-
Jonathan Cameron authored
It seems to me that the changes made to get this ready to move out of staging are substantial enough to warant a copyright notice addition. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-23-jic23@kernel.org
-
Jonathan Cameron authored
Main additions are around thresh_adaptive. This has been supported by the core of IIO for a long time, but no driver that uses it has previously graduated from staging, hence we are missing Docs. Otherwise, just new entries in existing lists. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210314181511.531414-22-jic23@kernel.org
-
Jonathan Cameron authored
Rather than using the fallback path in the i2c subsystem and hoping for no clashes across vendors, lets put in an explicit table for matching. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <ardeleanalex@gmail.com> Reviewed-by:
Barry Song <song.bao.hua@hisilicon> Link: https://lore.kernel.org/r/20210314181511.531414-21-jic23@kernel.org
-
Jonathan Cameron authored
Given DT docs will include regulators, lets just turn them on and off with driver probe() and remove(). Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-20-jic23@kernel.org
-
Jonathan Cameron authored
The datasheet provides these two values on the assumption they are applied to unshift raw value. Hence shift both the offset and scale by 4 to compensate. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-19-jic23@kernel.org
-
Jonathan Cameron authored
Every other register related to raw value on the datasheet is described as correpsonding to the 12MSB of the actual data registers + the bottom 4 bits are 0. So lets treat this as what it actually is, which is a 12 bit value. Note that we will have to be a little careful to compensate for the offset and scale values. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-18-jic23@kernel.org
-
Jonathan Cameron authored
These have a habit of not getting updated with driver reorganizations and don't add much info so drop them. Also fix a minor comment syntax issue. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-17-jic23@kernel.org
-
Jonathan Cameron authored
Where there is no other basis on which to order declarations let us prefer reverse xmas tree. Also reduce scope where sensible. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-16-jic23@kernel.org
-
Jonathan Cameron authored
Whilst not important, it's nice to have the general headers in alphabetical order. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Barry Song <song.bao.hua@hisilicon.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-15-jic23@kernel.org
-
Jonathan Cameron authored
Add _REG postfix to register addresses to avoid confusion with fields. Also add additional field defines and use throughout the driver in place of magic numbers. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210314181511.531414-14-jic23@kernel.org
-
Jonathan Cameron authored
Note this doesn't support everything the chip can do as we ignore window mode for now (in window / out of window). * Given the chip doesn't have any way of disabling the threshold pins, use disable_irq() etc to mask them except when we actually want them enabled (previously events were always enabled). Note there are race conditions, but using the current state from the status register and disabling interrupts across changes in type of event should mean those races result in interrupts, but no events to userspace. * Correctly reflect that there is one threshold line per channel. * Only take notice of rising edge. If anyone wants the other edge then they should set the other threshold (they are available for rising and falling directions). This isn't perfect but it makes it a lot simpler. * If insufficient interrupts are specified in firnware, don't support events. * Adaptive events use the same pos/neg values of thrMD as non adaptive ones. Tested against qemu based emulation. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210314181511.531414-13-jic23@kernel.org
-