Skip to content

hwmon: (adm1275) Add sample averaging binding support

Potin Lai linux-devicetree linux-hwmon lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 3 repliesIn review
  2. v52 patches 1 replySuperseded
  3. v42 patches 4 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches7 repliesSuperseded
v22 patches4 repliesSuperseded
v12 patches3 repliesSuperseded

Changes in v6 from the cover letter

- update and fix the yaml file error reported form bt_binding_check

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hwmon: (adm1275) Allow setting sample averagingdrivers/hwmon/pmbus/adm1275.c+39 -10 replies
2/2dt-bindings: hwmon: Add sample averaging properties for ADM1275Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml+68 -02 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiRob Herring
1/2
2/2R-b R-b

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

Read the v6 thread

Cover letter [PATCH v6 0/2] hwmon: (adm1275) Add sample averaging binding support

This patch series allow user config PWR_AVG and VI_AVG in PMON_CONF register by adding properties in device tree.

Example:

	adm1278@11 {
		compatible = "adi,adm1278";
		......
		adi,volt-curr-sample-average = <128>;
		adi,power-sample-average = <128>;
	};

Changes v5 --> v6:
- update and fix the yaml file error reported form bt_binding_check

Changes v4 --> v5:
- remove "adi,power-sample-average-enable" property, just set number of sampling to 1 as disabling sample averaging, and set 2 .. 128 as enabling.
- update correct default value (from datasheet) in if-block of each chip, and set "adi,power-sample-average" to false if not allowed.
- change adm1278 pmon_config smbus write "byte" to "word" in probe, adm1278 pmon_config register has 2 bytes data length.

Changes v3 --> v4:
- add "adi,power-sample-average-enable" property
- add sample number cehcking in driver, only allow listed value
- remove info logging, add error log when invalid number detected

Changes v2 --> v3:
- change property type back to u32, use logical value instead of register value
- fix typo in properties description
- add if-block to descript "adi,power-sample-average" not alloed if compatible not in the enum list

Changes v1 --> v2:
- use more descriptive property name
- change property type from u32 to u8
- add property value check, valid range between 1 and 7

Potin Lai (2):
hwmon: (adm1275) Allow setting sample averaging
dt-bindings: hwmon: Add sample averaging properties for ADM1275

 .../bindings/hwmon/adi,adm1275.yaml           | 68 +++++++++++++++++++
 drivers/hwmon/pmbus/adm1275.c                 | 40 ++++++++++-
 2 files changed, 107 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.1