linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] hwmon: (adt7475) Added attenuator bypass support
@ 2020-01-20  0:17 Logan Shaw
  2020-01-20  0:17 ` [PATCH v4 1/2] " Logan Shaw
  2020-01-20  0:17 ` [PATCH v4 2/2] " Logan Shaw
  0 siblings, 2 replies; 6+ messages in thread
From: Logan Shaw @ 2020-01-20  0:17 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.

* 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
  hwmon: (adt7475) Added attenuator bypass support

 .../devicetree/bindings/hwmon/adt7475.yaml    | 90 +++++++++++++++++++
 drivers/hwmon/adt7475.c                       | 76 ++++++++++++++++
 2 files changed, 166 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/adt7475.yaml

-- 
2.25.0


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

end of thread, other threads:[~2020-01-22 15:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20  0:17 [PATCH v4 0/2] hwmon: (adt7475) Added attenuator bypass support Logan Shaw
2020-01-20  0:17 ` [PATCH v4 1/2] " Logan Shaw
2020-01-22 15:03   ` Guenter Roeck
2020-01-20  0:17 ` [PATCH v4 2/2] " Logan Shaw
2020-01-21 18:00   ` Rob Herring
2020-01-22 14:47   ` Guenter Roeck

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).