Jonathan Cameron
09e3bdfe49
iio: adc: standardize on formatting for id match tables
...
This is a frequent minor comment in reviews, so start cleaning up
existing drivers in the hope we get fewer cases of cut and paste.
There are not kernel wide rules for these, but for IIO the style
that I prefer (and hence most common) is:
- Space after { and before }
- No comma after terminator { }
This may cause merge conflicts but they should be trivial to resolve
hence I have not broken this into per driver patches.
Link: https://patch.msgid.link/20240818180912.719399-1-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-09-05 19:27:13 +01:00
Nuno Sa
a4b99bff92
iio: adc: rtq6056: make use of iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-7-82913fc0fb87@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:42 +01:00
Gabriel Schwartz
427298c632
iio: adc: rtq6056: Use automated cleanup for mode handling in write_raw
...
Using iio_device_claim_direct_scoped() to automate mode claim and release
simplifies code flow and allows for straight-forward error handling with
direct returns on errors.
Signed-off-by: Gabriel Schwartz <gschwartz@usp.br >
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com >
Reviewed-by: ChiYuan Huang <cy_huang@richtek.com >
Link: https://lore.kernel.org/r/20240426200118.20900-1-gschwartz@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-04-29 20:53:10 +01:00
ChiYuan Huang
89a1034cd8
iio: adc: rtq6056: Add support for the whole RTQ6056 family
...
RTQ6053 and RTQ6059 are the same series of RTQ6056.
The respective differences with RTQ6056 are listed below
RTQ6053
- chip package type
RTQ6059
- Reduce the pinout for vbus sensing pin
- Some internal ADC scaling change
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com >
Link: https://lore.kernel.org/r/3541207c4727e3a76b9a3caf88ef812a4d47b764.1704676198.git.cy_huang@richtek.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-01-23 22:06:56 +00:00
Uwe Kleine-König
7cf15f4275
iio: Switch i2c drivers back to use .probe()
...
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20230515205048.19561-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2023-05-21 18:54:53 +01:00
ChiYuan Huang
4396f45d21
iio: adc: Add rtq6056 support
...
Add Richtek rtq6056 supporting.
It can be used for the system to monitor load current and power with 16-bit
resolution.
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/1658242365-27797-3-git-send-email-u0084500@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-08-15 22:29:57 +01:00