- 22 Jan, 2021 25 commits
-
-
Alexandre Belloni authored
The ms5803 is very similar to the ms5805 but has less resolution options and has the 128bit PROM layout. Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210109231148.1168104-7-alexandre.belloni@bootlin.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandre Belloni authored
Currently, only the 112bit PROM with 7 words is supported. However the ms58xx family also have devices with a 128bit PROM on 8 words. See AN520: C-CODE EXAMPLE FOR MS56XX, MS57XX (EXCEPT ANALOG SENSOR), AND MS58XX SERIES PRESSURE SENSORS and the various device datasheets. The difference is that the CRC is the 4 LSBs of word7 instead of being the 4 MSBs of word0. Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210109231148.1168104-6-alexandre.belloni@bootlin.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandre Belloni authored
The CRC calculation always happens on 8 words which is why there is an extra element in the prom array of struct ms_tp_dev. However, on ms5637 and similar, only 7 words are readable. Then, set MS_SENSORS_TP_PROM_WORDS_NB to 8 and stop passing a len parameter to ms_sensors_tp_crc_valid as this simply hide the fact that it is hardcoded. Finally, use the newly introduced hw->prom_len to know how many words can be read. Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210109231148.1168104-5-alexandre.belloni@bootlin.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandre Belloni authored
Avoid exposing all the sampling frequencies for chip that only support a subset. Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210109231148.1168104-4-alexandre.belloni@bootlin.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandre Belloni authored
Some sensors in the ms58xx family have a different PROM length and a different number of available resolution. introduce struct ms_tp_hw_data to handle those differences. Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210109231148.1168104-3-alexandre.belloni@bootlin.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandre Belloni authored
Reorder memsic compatible strings alphabetically Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210109231148.1168104-2-alexandre.belloni@bootlin.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Cristian Pop authored
The AD5766/AD5767 are 16-channel, 16-bit/12-bit, voltage output dense DACs Digital-to-Analog converters. This change adds support for these DACs. Signed-off-by:
Cristian Pop <cristian.pop@analog.com> Link: https://lore.kernel.org/r/20210115112105.58652-3-cristian.pop@analog.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Cristian Pop authored
New interface is proposed for dither functionality. This future allows composing an external signals to the selected output channel. The dither signal can be turned on/off, scaled, inverted, or it can be selected from different sources. Signed-off-by:
Cristian Pop <cristian.pop@analog.com> Link: https://lore.kernel.org/r/20210115112105.58652-2-cristian.pop@analog.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Cristian Pop authored
This adds device tree bindings for the AD5766 DAC. Signed-off-by:
Cristian Pop <cristian.pop@analog.com> Reviewed-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210115112105.58652-1-cristian.pop@analog.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
Each sample has a timestamp field with this change. This timestamp may be from the sensor hub when present or local kernel timestamp. And the unit of timestamp is nanosecond. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Link: https://lore.kernel.org/r/20210105093515.19135-7-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
Each sample has a timestamp field with this change. This timestamp may be from the sensor hub when present or local kernel timestamp. And the unit of timestamp is nanosecond. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Link: https://lore.kernel.org/r/20210105093515.19135-6-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
Each sample has a timestamp field with this change. This timestamp may be from the sensor hub when present or local kernel timestamp. And the unit of timestamp is nanosecond. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Link: https://lore.kernel.org/r/20210105093515.19135-5-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
Each sample has a timestamp field with this change. This timestamp may be from the sensor hub when present or local kernel timestamp. And the unit of timestamp is nanosecond. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Link: https://lore.kernel.org/r/20210105093515.19135-4-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
Each sample has a timestamp field with this change. This timestamp may be from the sensor hub when present or local kernel timestamp. And the unit of timestamp is nanosecond. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Link: https://lore.kernel.org/r/20210105093515.19135-3-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
The accel_3d sensor already has a timestamp channel, this patch just replicate that for gravity sensor. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Link: https://lore.kernel.org/r/20210105093515.19135-2-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Stephan Gerhold authored
BMC150 needs VDD and VDDIO regulators that might need to be explicitly enabled. Add some rudimentary support to obtain and enable these regulators during probe() and disable them during remove() or on the error path. Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20210109152327.512538-2-stephan@gerhold.netSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Stephan Gerhold authored
BMC150 needs VDD and VDDIO regulators that might need to be explicitly enabled. Document support for vdd/vddio-supply to implement this. Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20210109152327.512538-1-stephan@gerhold.netSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
Some enums might have gaps or reserved values in the middle of their value range. E.g. consider a 2-bit enum where the values 0, 1 and 3 have a meaning, but 2 is a reserved value and can not be used. Add support for such enums to the IIO enum helper functions. A reserved values is marked by setting its entry in the items array to NULL rather than the normal descriptive string value. Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Signed-off-by:
Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210107112049.10815-1-alexandru.ardelean@analog.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
Add channel description for hinge sensor, including channel label attribute and raw data description. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Link: https://lore.kernel.org/r/20201215054444.9324-4-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
The Hinge sensor is a common custom sensor on laptops. It calculates the angle between the lid (screen) and the base (keyboard). In addition, it also exposes screen and the keyboard angles with respect to the ground. Applications can easily get laptop's status in space through this sensor, in order to display appropriate user interface. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Link: https://lore.kernel.org/r/20201215054444.9324-3-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ye Xiang authored
Currently custom sensors properties are not decoded and it is up to user space to interpret. Some manufacturers already standardized the meaning of some custom sensors. They can be presented as a proper IIO sensor. We can identify these sensors based on manufacturer and serial number property in the report. This change is identifying hinge sensor when the manufacturer is "INTEL". This creates a platform device so that a sensor driver can be loaded to process these sensors. Signed-off-by:
Ye Xiang <xiang.ye@intel.com> Acked-by:
Jiri Kosina <jkosina@suse.cz> Link: https://lore.kernel.org/r/20201215054444.9324-2-xiang.ye@intel.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Stephan Gerhold authored
BMG160 needs VDD and VDDIO regulators that might need to be explicitly enabled. Add some rudimentary support to obtain and enable these regulators during probe() and disable them using a devm action. Signed-off-by:
Stephan Gerhold <stephan@gerhold.net> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20201211183815.51269-2-stephan@gerhold.netSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Stephan Gerhold authored
BMG160 needs VDD and VDDIO regulators that might need to be explicitly enabled. Document support for vdd/vddio-supply to implement this. Signed-off-by:
Stephan Gerhold <stephan@gerhold.net> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201211183815.51269-1-stephan@gerhold.netSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Devajith V S authored
kxcjk1013 devices have VDD and VDDIO power lines. Need to make sure the regulators are enabled before any communication with kxcjk1013. This patch introduces vdd/vddio regulators for kxcjk1013. Signed-off-by:
Devajith V S <devajithvs@gmail.com> Link: https://lore.kernel.org/r/20201213172437.2779-2-devajithvs@gmail.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Devajith V S authored
kxcjk1013 devices have VDD and VDDIO power lines. Need to make sure the regulators are enabled before any communication with kxcjk1013. Document support for vdd/vddio-supply to implement this. Signed-off-by:
Devajith V S <devajithvs@gmail.com> Reviewed-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201213172437.2779-1-devajithvs@gmail.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 09 Jan, 2021 15 commits
-
-
Tomas Novotny authored
The vdd-supply property is optional if vref-supply is provided for mcp4726. Also the microchip,vref-buffered makes sense only if vref-supply is specified. Spotted by Jonathan during conversion to yaml. Reported-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by:
Tomas Novotny <tomas@novotny.cz> Reviewed-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201216101316.1403-1-tomas@novotny.czSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Dragos Bogdan authored
The LTC2314-14 is a 14-bit, 4.5Msps, serial sampling A/D converter that draws only 6.2mA from a wide range analog supply adjustable from 2.7V to 5.25V. Signed-off-by:
Dragos Bogdan <dragos.bogdan@analog.com> Signed-off-by:
Mircea Caprioru <mircea.caprioru@analog.com> Link: https://lore.kernel.org/r/20201216083639.89425-1-mircea.caprioru@analog.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Xu Wang authored
Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by:
Xu Wang <vulab@iscas.ac.cn> Acked-by:
Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20201218093512.871-1-vulab@iscas.ac.cnSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Xu Wang authored
Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by:
Xu Wang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20201218094647.1386-1-vulab@iscas.ac.cnSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Linus Walleij authored
The hardware conversion mode only exists in the AB8500 version of the chip, as it is lacking in the AB8505 it will not be in the device tree and we should just not even try to obtain it. The driver already contains code to avoid using a non-existing hardware conversion IRQ at conversion time. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20201218222013.383704-1-linus.walleij@linaro.orgSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
Use DIV_ROUND_CLOSEST() instead of open-coding it. This makes it more clear what is going on for the casual reviewer. Generated using the following the Coccinelle semantic patch. // <smpl> @@ expression x, y; @@ -((x) + ((y) / 2)) / (y) +DIV_ROUND_CLOSEST(x, y) // </smpl> Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Acked-by:
Chunyan Zhang <zhang.lyra@gmail.com> Link: https://lore.kernel.org/r/20201222191618.3433-1-lars@metafoo.deSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Linus Walleij authored
This adds an IIO magnetometer driver for the Yamaha YAS530 family of magnetometer/compass chips YAS530, YAS532 and YAS533. A quick survey of the source code released by different vendors reveal that we have these variants in the family with some deployments listed: * YAS529 MS-3C (2005 Samsung Aries) * YAS530 MS-3E (2011 Samsung Galaxy S Advance) * YAS532 MS-3R (2011 Samsung Galaxy S4) * YAS533 MS-3F (Vivo 1633, 1707, V3, Y21L) * (YAS534 is a magnetic switch) * YAS535 MS-6C * YAS536 MS-3W * YAS537 MS-3T (2015 Samsung Galaxy S6, Note 5) * YAS539 MS-3S (2018 Samsung Galaxy A7 SM-A750FN) The YAS529 is so significantly different from the YAS53x variants that it will require its own driver. The YAS537 and YAS539 have slightly different register sets but have strong similarities so a common driver patching this one will probably be reasonable. The source code for Samsung Galaxy A7's YAS539 is not that is significantly different from the YAS530 in the Galaxy S Advance, so I believe we will only need this one driver with quirks to handle all of them. The YAS539 is actively announced on Yamaha's devices site: https://device.yamaha.com/en/lsi/products/e_compass/ This is a driver written from scratch using buffered IIO and runtime PM handling regulators and reset. Thanks to Andy Shevchenko for great help in finding all the special kernel infrastructure functions and quirks during review of this driver. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Cc: phone-devel@vger.kernel.org Cc: Jonathan Bakker <xc-racer2@live.ca> Link: https://lore.kernel.org/r/20201224120820.1120099-2-linus.walleij@linaro.orgSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Linus Walleij authored
This adds device tree bindings for the Yamaha YAS530 family of magnetometers/compass sensors. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Rob Herring <robh@kernel.org> Cc: devicetree@vger.kernel.org Cc: phone-devel@vger.kernel.org Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Jonathan Bakker <xc-racer2@live.ca> Link: https://lore.kernel.org/r/20201224120820.1120099-1-linus.walleij@linaro.orgSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
Use DIV_ROUND_CLOSEST() instead of open-coding it. This documents intent and makes it more clear what is going on for the casual reviewer. Generated using the following the Coccinelle semantic patch. // <smpl> @r1@ expression x; constant C1; constant C2; @@ ((x) + C1) / C2 @script:python@ C1 << r1.C1; C2 << r1.C2; @@ try: if int(C1) * 2 != int(C2): cocci.include_match(False) except: cocci.include_match(False) @@ expression r1.x; constant r1.C1; constant r1.C2; @@ -(((x) + C1) / C2) +DIV_ROUND_CLOSEST(x, C2) // </smpl> Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20201227171126.28216-3-lars@metafoo.deSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
Use DIV_ROUND_CLOSEST() instead of open-coding it. This documents intent and makes it more clear what is going on for the casual reviewer. Generated using the following the Coccinelle semantic patch. // <smpl> @r1@ expression x; constant C1; constant C2; @@ ((x) + C1) / C2 @script:python@ C1 << r1.C1; C2 << r1.C2; @@ try: if int(C1) * 2 != int(C2): cocci.include_match(False) except: cocci.include_match(False) @@ expression r1.x; constant r1.C1; constant r1.C2; @@ -(((x) + C1) / C2) +DIV_ROUND_CLOSEST(x, C2) // </smpl> Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20201227171126.28216-2-lars@metafoo.deSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
Use DIV_ROUND_CLOSEST() instead of open-coding it. This documents intent and makes it more clear what is going on for the casual reviewer. Generated using the following the Coccinelle semantic patch. // <smpl> @r1@ expression x; constant C1; constant C2; @@ ((x) + C1) / C2 @script:python@ C1 << r1.C1; C2 << r1.C2; @@ try: if int(C1) * 2 != int(C2): cocci.include_match(False) except: cocci.include_match(False) @@ expression r1.x; constant r1.C1; constant r1.C2; @@ -(((x) + C1) / C2) +DIV_ROUND_CLOSEST(x, C2) // </smpl> Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Reviewed-by:
Manivannan Sadhasivam <mani@kernel.org> Link: https://lore.kernel.org/r/20201227171126.28216-1-lars@metafoo.deSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Max Leiter authored
The device is used in the Microsoft Surface Book 3 and Surface Pro 7 Signed-off-by:
Max Leiter <maxwell.leiter@gmail.com> Reviewed-by:
Matt Ranostay <matt.ranostay@konsulko.com> Link: https://lore.kernel.org/r/20201220015057.107246-1-maxwell.leiter@gmail.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Stephan Gerhold authored
MPU-6880 seems to be very similar to MPU-6500 and it works fine with some minor additions for the mpu6050 driver. Add the necessary defines for it and make it use the same registers as MPU-6500 but with a FIFO size of 4096. Signed-off-by:
Stephan Gerhold <stephan@gerhold.net> Acked-by:
Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Link: https://lore.kernel.org/r/20201202104656.5119-2-stephan@gerhold.netSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Stephan Gerhold authored
MPU-6880 seems to be very similar to MPU-6500 / MPU-6050 and it works fine with some minor additions for the mpu6050 driver. Add a compatible for it to the binding documentation. Signed-off-by:
Stephan Gerhold <stephan@gerhold.net> Acked-by:
Rob Herring <robh@kernel.org> Acked-by:
Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Link: https://lore.kernel.org/r/20201202104656.5119-1-stephan@gerhold.netSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
Very similar to the mpu6050 binding. Only unusual element is the i2c-gate section. Example tweaked a little to include a real device behind the gate. As Rob Herring suggested, dropped use of explicit i2c-gate yaml binding in favour of just using the i2c-controller.yaml binding directly. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201128173343.390165-4-jic23@kernel.org
-