Skip to content

Add Richtek RTQ6056 support

cy_huang linux-devicetree linux-iio lkml 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 2 repliesIn review
  2. v73 patches 4 repliesSuperseded
  3. v63 patches 0 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v52 patches7 repliesSuperseded
v42 patches5 repliesSuperseded
v32 patches5 repliesSuperseded
v22 patches12 repliesSuperseded
v12 patches14 repliesSuperseded

Changes in v8 from the cover letter

- Use 'DEFINE_RUNTIME_DEV_PM_OPS' to replace the explicit declaration of pm_ops.

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: iio: adc: Add rtq6056 adc supportDocumentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml+56 -00 replies
2/3iio: adc: Add rtq6056 supportdrivers/iio/adc/Kconfig drivers/iio/adc/Makefile drivers/iio/adc/rtq6056.c+677 -02 replies
3/3Documentation: ABI: testing: rtq6056: Update ABI docsDocumentation/ABI/testing/sysfs-bus-iio+11 -00 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiAndy Shevchenko
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 0/3] Add Richtek RTQ6056 support

From: ChiYuan Huang <[email protected]>

This patch series is to enable Richtek RTQ6056 support.

The RTQ6056 is a high accuracy current-sense monitor with I2C interface, and the device provides full information for system by reading out the load current and power.

Since v8
- Instead of 'integraion_time' for voltage channel, use per channel sampling frequency to be more generic.
- Update sysfs-bus-iio.

Since v7
- Use 'DEFINE_RUNTIME_DEV_PM_OPS' to replace the explicit declaration of pm_ops.

Since v6
- Remove specific rtq6056 ABI document.
- Update integration time description in general ABI document.
- Remove the redundant blank line.
- To prevent the race condition for attribute wrtie and shunt resistor write, use 'iio_device_claim_direct_mode' API.
- Refine the order for 'action_reset' and 'pm_runtime'.
- Fix text typo in comment like as ohm to Ohm and timea to time.

Since v5
- Fix kernel version text for ABI.

Since v4
- Add '__aligned(8)' for timestamp member.
- Declare timestamp from 'int64_t' to more unified 's64'.

Since v3
- change the node name to be generic 'adc' in binding example.
- Refine pm_runtime API calling order in 'read_channel' API.
- Fix vshunt wrong scale for divider.
- Refine the comment text.
- Use 'devm_add_action_or_reset' to decrease the code usage in probe function.
- Use RUNTIME_PM_OPS to replace SET_RUNTIME_PM_OPS.
- minor fix for the comma.
- Use pm_ptr to replace the direct assigned pm_ops.

Since v2
- Change the resistor property name to be generic 'shunt-resistor-micro-ohms'.
- Rename file from 'rtq6056-adc' to 'rtq6056'.
- Refine the ABI, if generic already defined it, remove it and check the channel report unit.
- Add copyright text.
- include the correct header.
- change the property parsing name.
- To use iio_chan_spec address field.
- Refine each channel separate and shared_by_all.
- Use pm_runtime and pm_runtime_autosuspend.
- Remove the shutdown callback. From the HW suggestion, it's not recommended to use battery as the power supply.
- Check all scale unit (voltage->mV, current->mA, power->milliWatt).
- Use the read_avail to provide the interface for attribute value list.
- Add comma for the last element in the const integer array.
- Refine each ADC label text.
- In read_label callback, replace snprintf to sysfs_emit.

ChiYuan Huang (3):
dt-bindings: iio: adc: Add rtq6056 adc support
iio: adc: Add rtq6056 support
Documentation: ABI: testing: rtq6056: Update ABI docs

 Documentation/ABI/testing/sysfs-bus-iio            |  11 +
 .../bindings/iio/adc/richtek,rtq6056.yaml          |  56 ++
 drivers/iio/adc/Kconfig                            |  15 +
 drivers/iio/adc/Makefile                           |   1 +
 drivers/iio/adc/rtq6056.c                          | 661 +++++++++++++++++++++
 5 files changed, 744 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml
 create mode 100644 drivers/iio/adc/rtq6056.c
Signature · 1 line
2.7.4