linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] hwmon: (adt7475) Added attenuator bypass support
@ 2020-01-26 22:10 Logan Shaw
  2020-01-26 22:10 ` [PATCH v6 1/2] " Logan Shaw
  2020-01-26 22:10 ` [PATCH v6 2/2] dt-bindings: hwmon: (adt7475) Added missing adt7475 documentation Logan Shaw
  0 siblings, 2 replies; 10+ messages in thread
From: Logan Shaw @ 2020-01-26 22:10 UTC (permalink / raw)
  To: linux, jdelvare, robh+dt
  Cc: linux-hwmon, linux-kernel, devicetree, Joshua.Scott,
	Chris.Packham, logan.shaw

The ADT7473 and ADT7475 support bypassing voltage input attenuators on
voltage input 1 and the ADT7476 and ADT7490 additionally support
bypassing voltage input attenuators on voltage inputs 0, 3, and 4. This
can be useful to improve measurement resolution when measuring voltages
0 V - 2.25 V.

This patch adds 4 optional devicetree properties to the adt7475
driver, each setting the attenuator bypass (or clearing) on a
specific voltage input.

* v6
- removed unnecessary comments marked for kernal documentation in file
  adt7475.c.
- fixed parenthesis whitespace allignment in multiple places in file
  adt7475.c.
- removed unnecessary parentheses around data->config4 in file
  adt7475.c.
- removed unused assignment "int i = 0" in file adt7475.c.
- fixed mispelling of documentation in commit subject.

* v5
- modified adt7475.yaml to remove dt_binding_check errors
- made various alignment fixes to adt7475.c to improve style.
- renamed function modify_config_from_dts_prop to modify_config
- changed return type of function modify_config to void
- function modify_config error return code modified no longer override
  the dependent functions i2c_smbus_write_byte_data error.
- renamed function load_all_bypass_attenuators to load_attenuators
- in function load_attenuators the two local variables config2_copy
  and config4_copy have been combined into one: conf_copy.

* v4
- fixed a small error in file adt7475.yaml (duplicate property names).

* v3
- removed the functionality to set the global attenuator bypass.
- added functionality to allow bypassing voltage input 1 on the
	ADT7473 and ADT7475.
- added DTS definition file adt7475.yaml and 4 new properties.
- added the previousely missing newline character to the end of
  	file adt7475.c. 

* v2
- removed sysfs changes from patch
- removed adt7475_write macro from patch and replaced it by using
	the i2c_smbus_write_byte_data function directly in code.
- removed config4_attenuate_index function from patch and replaced it
	by modifying the function  load_individual_bypass_attenuators
	to use hard coded bit values.
- modified function load_individual_bypass_attenuators to use 4 if
	statements, one for each voltage input, replacing the for loop.
- modified function adt7475_probe to check the device is a ADT7476 or
	ADT7490 (other devices do not support bypassing all or
	individual attenuators), and only then set the relevant bits.
- added new file adt7475.txt to document the new devicetree properties.
- removed c++ style comments.

Logan Shaw (2):
  hwmon: (adt7475) Added attenuator bypass support
  dt-bindings: hwmon: (adt7475) Added missing adt7475 documentation

 .../devicetree/bindings/hwmon/adt7475.yaml    | 95 +++++++++++++++++++
 drivers/hwmon/adt7475.c                       | 55 +++++++++++
 2 files changed, 150 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/adt7475.yaml

-- 
2.25.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-02-05  0:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-26 22:10 [PATCH v6 0/2] hwmon: (adt7475) Added attenuator bypass support Logan Shaw
2020-01-26 22:10 ` [PATCH v6 1/2] " Logan Shaw
2020-01-26 22:10 ` [PATCH v6 2/2] dt-bindings: hwmon: (adt7475) Added missing adt7475 documentation Logan Shaw
2020-01-27 15:48   ` Rob Herring
2020-01-29  4:30     ` Logan Shaw
2020-01-29  9:51       ` Guenter Roeck
2020-01-29 17:27       ` Rob Herring
2020-01-29 23:52         ` Logan Shaw
2020-01-30  3:07     ` Logan Shaw
2020-02-05  0:48       ` Logan Shaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).