- 22 Aug, 2020 15 commits
-
-
Calvin Glisson authored
Remove excess blank line after variable declarations. Improves code consistency and readability. Change suggested by checkpatch.pl: CHECK: Please don't use multiple blank lines Signed-off-by: Calvin Glisson <taragaram@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Randy Dunlap authored
Drop the repeated word "and" in a comment. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
Straight forward conversion of this binding for this current sense amplifier and ADC. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Rob Herring <robh@kernel.org>
-
Jonathan Cameron authored
Straight forward conversion for this SPI ADC. Added limits on spi-max-frequency from datasheet (0.1 to 4.8MHz) Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Rob Herring <robh@kernel.org>
-
Nishant Malpani authored
Add devicetree binding document for ADXRS290, a dual-axis MEMS gyroscope. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nishant Malpani authored
ADXRS290 is a high performance MEMS pitch and roll (dual-axis in-plane) angular rate sensor (gyroscope) designed for use in stabilization applications. It also features an internal temperature sensor and programmable high-pass and low-pass filters. Add support for ADXRS290 in direct-access mode for now. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADXRS290.pdfReviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ankit Baluni authored
Added a missing comma and changed 'it it useful' to 'it is useful'. Signed-off-by: Ankit Baluni <b18007@students.iitmandi.ac.in> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
Make sure that the trigger function stubs are all static inline. Otherwise we might see compiler warnings about declared but unused functions. Fixes 77712e5f: ("Staging: iio: Staticise non-exported functions") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Matt Ranostay authored
Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
The change is mostly cosmetic. When looking into the menuconfig help of the ad8366 driver, the HMC1119 chip should also show up (since the driver supports it). Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Stefan Popa authored
The driver does not have a struct of_device_id table, but supported devices are registered via Device Trees. This patch adds OF device ID table. Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
The change is mostly stylistic. The table should be indented with tabs instead of spaces. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
The driver pretty much uses device managed functions. The only left-over is the iio_device_register() function, which also requires an action-or-reset hook to disable the regulator on the remove and error path. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Matt Ranostay authored
Add support for the Atlas EZO O2 chemical sensor which required some refactoring of the driver and parsing of i2c transfer. Sensor data is converted by the scaling value from percent to IIO_CONCENTRATION. Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Matt Ranostay authored
Add modifier IIO_MOD_O2 for O2 concentration reporting Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 18 Aug, 2020 25 commits
-
-
Mauro Carvalho Chehab authored
The regulator driver needs it, as otherwise it will produce errors when creating vmlinux. Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/a287238bd0141aa68aae7d4cec4c1174a43b3e53.1597766680.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alex Dewar authored
Currently the module can only be test built on ARM, although it seems to build fine on x86. Change this to allow for broader test coverage. Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Link: https://lore.kernel.org/r/20200818151133.583382-1-alex.dewar90@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Add an entry for the SPMI, MFD and PMIC parts of the HiSilicon 6421v600 support. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/14b009ef0255d61eeaf4273e9c36dafdb1e5e12f.1597762400.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Add documentation for the properties needed by the HiSilicon 6421v600 driver, and by the SPMI controller used to access the chipset. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/56c40a260bf31edf7049f50586c63ee0d06e02cb.1597762400.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
It is clear that this driver is for PMIC. So, get rid of it at the compatible. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/12bdc9b4734e156098408d0d27256abdc91ac283.1597762400.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Add the chipset name at the compatible string, as other HiSilicon chipsets with SPMI bus might require something different. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/f34062e82b5d5ee49aab4f9055b44e42e5023f0a.1597762400.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Both irqnum and irqarray properties reflect the same thing: the number of bits and bytes for interrupts at this chipset. E. g.: irqnum = 8 x irqarray This can be seen by the way pending interrupts are handled: /* During probe time */ pmic->irqs = devm_kzalloc(dev, pmic->irqnum * sizeof(int), GFP_KERNEL); /* While handling IRQs */ for (i = 0; i < pmic->irqarray; i++) { pending = hi6421_spmi_pmic_read(pmic, (i + pmic->irq_addr)); pending &= 0xff; for_each_set_bit(offset, &pending, 8) generic_handle_irq(pmic->irqs[offset + i * 8]); } Going further, there are some logic at the driver which assumes that irqarray is 2: /* solve powerkey order */ if ((i == HISI_IRQ_KEY_NUM) && ((pending & HISI_IRQ_KEY_VALUE) == HISI_IRQ_KEY_VALUE)) { generic_handle_irq(pmic->irqs[HISI_IRQ_KEY_DOWN]); generic_handle_irq(pmic->irqs[HISI_IRQ_KEY_UP]); pending &= (~HISI_IRQ_KEY_VALUE); } As HISI_IRQ_KEY_DOWN and HISI_IRQ_KEY_UP are fixed values and don't depend on irqnum/irqarray. The IRQ addr and mask addr seem to be also fixed, based on some comments at the OF parsing code. So, get rid of them too, removing the of parsing function completely. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/e231244e42cb5b56240705cac2f987e11a078038.1597762400.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Both the SPMI controller and the SPMI PMIC driver depends on the SPMI bus support. The dependency for the regulator is also wrong: it should depends on the SPMI version of the HiSilicon 6421, and not on the normal one. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/1b7e23500e7449593393115cc0954af441b0c730.1597762400.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Place the things that are needed to be able to move those drivers out of staging. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/bf3ebe32125646e0a87a59280392e8c6fda08488.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Do some code cleanup in order to make it cleaner for moving it out of staging in the future. Suggested-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/32fadb359c1817992af78052e2d9448b8c5fc61f.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Change the binding logic to ensure that the PMIC SPMI driver will run before the regulator code and add it to the building system. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/2992dc49945dcfb07c4bd96fa5c288c4e679701a.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Fix the remaining issues complained by checkpatch. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/af5101fa2ab1d267ac5ac22603f95c6065ac110f.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Currently, an array is used to store both vsel and enable settings, mixing registers, masks and bit settings. Change it in order to have one separate property for each. This makes easier to understand the contents of the DT file, and to describe it at the Documentation/. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/fd72215b0a7da55dd727c2d7bd01c047a46cdd2e.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Without that, the regulator's core complains with: ldo17: ramp_delay not set For now, use the enable time, as we don't have any datasheets from this device. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/67df5456e4f23c88ab4fd9331eb8202c3952e5c5.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Using dev_dbg() is not too nice, as, instead of printing the name of the regulator, it prints "regulator.<number>", making harder to associate what is happening with each ldo line. So, add a debug-specific macro, which will print the rdev's name, just like the regulator core. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/1690b8531b23910aa915bd2725410b926022c481.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
The regulator's core already handles it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/4f17adca2b04c401e5de5556700638648ce25c0c.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
As the supported LDOs on this driver are all using a selector, change the implementation to use get_voltage_sel and set_voltage_sel ops. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/1cf4f26540e65ffbb561c7d52e53f6be5bd63ac4.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Rename the functions used internally inside the driver in order for them to follow the driver's name. While here, get rid of some unused definitions at the header file. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/5cda96baef9374a096a7a0c8f76f60491b0084c7.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Instead of implementing a custom set of properties, set valid_modes_mask based on having or not a mask for enabling the eco_mode. This makes the code clearer, and remove some uneeded props from DT. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/0f4ac5a4167bbca428c8507b6992acd8b3ebabd1.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Simplify the names of the OF properties, in order to make them similar to other drivers and to make easier to understand what each property means. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/98f66100263940901ba59ec187919e9cf5e64f31.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
- use dev_foo() instead of pr_foo(); - cleanup the messages, making them more standard and easier to understand. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/2d17e168031340da73e1bd1c826289ceba2dbe8f.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
There are several fields on this struct that can be removed, as they already exists at struct regulator_desc. Remove them, cleaning up the code in the process. While here, rename it to hi6421v600_regulator_info, in order to better match the driver's name. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/648d48f11368a9869d760c2bd54bfbc3feb4f44c.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
Change the binding logic to ensure that the PMIC SPMI driver will run before the regulator code and add it to the building system. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/aa40d443dfc6c8e69e4c36fa79d15459762924e4.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
There are several issues on those drivers related to their coding style. Solve most of them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/9ea7fdc004c7c44ae513b6c8f6c4a4493dd1ac61.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Carvalho Chehab authored
The driver was originally written for Kernel 4.9. It needs to be ported to upstream: - Got rid of timeval; - Removed a bogus dependency; - Did cleanups at the header file. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/9e34400d2cc15ef501a8478f69a95c9abc5c4d8d.1597647359.git.mchehab+huawei@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-