LKML Archive on
help / color / mirror / Atom feed
From: Anand Ashok Dumbre <>
To: <>, <>,
	<>, <>, <>,
	<>, <>,
	<>, <>,
Cc: Anand Ashok Dumbre <>
Subject: [PATCH v11 0/5] Add Xilinx AMS Driver
Date: Wed, 24 Nov 2021 22:54:02 +0000	[thread overview]
Message-ID: <> (raw)

Add Xilinx AMS driver which is used for Xilinx's ZynqMP AMS controller.
This AMS driver is used to report various interface voltages and temperatures
across the system.
This driver will be used by iio-hwmon to repport voltages and temperatures
across the system by using various channel interfaces.
This driver handles AMS module including PS-Sysmon & PL-Sysmon. The binding
documentation is added for understanding of AMS, PS, PL Sysmon Channels.

Changes in v2:
	- Added documentation for sysfs (Patch-2)
	- Addressed code style review comments
	- Patch-2 (Now it is Patch-3)
		- Arranged the includes in alphabetical order
		- Removed the wrapper 'ams_pl_write_reg()' and used writel
		- Removed the unnecessary delay of 1ms and used polling of EOC
		- Removed spin_lock and used mutex only.
		- Used request_irq() instead of devm_request_irq() and handled
		  respective error conditions
		- Moved contents of xilinx-ams.h to inline with xilinx-ams.c
	- Patch-1
		- Addressed Documentation style comments

Changes in v3:
	- Updated bindings document with the suggested modification in v2 review
	- Removed documentation for sysfs
	- Removed extended names for channels in the Xilinx AMS driver
	- Modified dts to use ranges for child nodes
	- Reduced address and size cells to 32-bit instead of 64-bit

Changes in v4:
	- Updated bindings document with the suggested modification in v3 review
	- Changed the Device Tree property 'ranges' for child nodes
	- Used Channel Numbers as 'reg' value in DT to avoid confusion
	- Removed unused NULL arguments as suggested in v3 patch review
	- Addressed comments on Device Tree property naming

Changes in v5:
	- Updated bindings document to the YAML format
	- Updated bindings document with the suggested modification in v4 review
	- Renamed iio_pl_info struct to iio_ams_info in Xilinx AMS driver
	- Updated the Xilinx AMS driver to not use iio_priv_to_dev function
	- Updated Xilinx AMS node to reflect the changes in bindings document
	- Update MAINTAINERS file

Changes in v6:
	- Removed all tabs from bindings document.
	- Removed the xlnx,ext-channels node from the device tree since
	  it is not neeeded.
	- Fixed unit addresses for ps-ams and pl-ams.
	- Removed the names property from bindings.
	- Fixed warnings from in the driver.
	- devm_add_action_or_reset() used for exit/error path.
	- devm_request_irq() for managed irq request instead of

Changes in v7:
	- Added use of FIELD_PREP and FIELD_GET.
	- Added the spinlocks back the v1 which were removed in v2 for
	  no justifiable reason and replaced with the same mutex. This
	  caused deadlocks.
	- Removed the buffered mode information from channel config.
	- Usage of wrapper functions for devm_add_action_or_reset
	  callbacks to avoid typecasting functions.
	- Usage of devm_platform_iremap_resource().
	- Handled platform_get_irq() return values.
	- Removed the remove() callback.
	- Fixed the dt-bindings.

Changes in v8:
	- Replaced *_of_() APIs with fwnode.
	- Added missing headers.
	- Fixed documentation.
	- Added devm_add_action_or_reset() for iounmap.
	- Restructured read_raw function.
	- Added helper functions.
	- Usage of GENMASK for all masks.
	- Added defaults for most switch cases. Some can't be added
	  since the default will never occur.

Changes in v9:
	- Added a fwnode_iomap().
	- Fixed Kconfig indentation.
	- Added the overflow checks before memory allocation.
	- Usage of fwnode_iomap() instead of iomap().
	- Rename ams_parse_dt() to ams_parse_firmware().

Changes in v10:
	- Fixed licence in zynqmp.dtsi.
	- Changed the macros to use BIT().
	- Realign some code to fit within 100 chars.
	- Modified readl_poll_timeout usage.
	- Usage of array_size() instead of check_mul_overflow().
	- Usage of dev_err_probe() instead of dev_err().
	- Usage of kcalloc instead of kzalloc()

Changes in v11:
	- Added missing bitfield.h.
	- Fixed AMS_ALARM_THR_MIN macro.
	- Added terminators to enums where necessary.
	- Added explicit values as suggested to enums.
	- Removed redundant macros.
	- Added delay value for readl_poll_timeout.
	- Corrected shadowed error return.
	- Corrected formatting errors.
	- Added default cases where missing.
	- Made ams_parse_firmware() a single parameter functions.
	- Usage of devm_kcalloc() and devm_krealloc().
	- Directly returning from dev_err_probe().
	- Renamed masked_alarm to current_masked_alarm.

Anand Ashok Dumbre (5):
  device property: Add fwnode_iomap()
  arm64: zynqmp: DT: Add Xilinx AMS node
  iio: adc: Add Xilinx AMS driver
  dt-bindings: iio: adc: Add Xilinx AMS binding documentation
  MAINTAINERS: Add maintainer for xilinx-ams

 .../bindings/iio/adc/xlnx,zynqmp-ams.yaml     |  227 +++
 MAINTAINERS                                   |    7 +
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi        |   24 +
 drivers/base/property.c                       |   16 +
 drivers/iio/adc/Kconfig                       |   15 +
 drivers/iio/adc/Makefile                      |    1 +
 drivers/iio/adc/xilinx-ams.c                  | 1425 +++++++++++++++++
 include/linux/property.h                      |    2 +
 8 files changed, 1717 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
 create mode 100644 drivers/iio/adc/xilinx-ams.c


             reply	other threads:[~2021-11-24 22:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 22:54 Anand Ashok Dumbre [this message]
2021-11-24 22:54 ` [PATCH v11 1/5] device property: Add fwnode_iomap() Anand Ashok Dumbre
2021-11-25 11:42   ` Andy Shevchenko
2021-11-30 21:58     ` Anand Ashok Dumbre
2021-12-02  9:10       ` Anand Ashok Dumbre
2021-12-02  9:37         ` Andy Shevchenko
2021-12-02 11:46           ` Anand Ashok Dumbre
2021-12-02 12:34             ` Anand Ashok Dumbre
2021-11-27 11:54   ` kernel test robot
2021-11-24 22:54 ` [PATCH v11 2/5] arm64: zynqmp: DT: Add Xilinx AMS node Anand Ashok Dumbre
2021-11-24 22:54 ` [PATCH v11 3/5] iio: adc: Add Xilinx AMS driver Anand Ashok Dumbre
2021-11-25 12:14   ` Andy Shevchenko
2021-12-02 16:32     ` Anand Ashok Dumbre
2021-12-02 16:51       ` Andy Shevchenko
2021-11-27  2:43   ` kernel test robot
2021-11-27 17:50     ` Jonathan Cameron
2021-11-27  5:16   ` kernel test robot
2021-11-24 22:54 ` [PATCH v11 4/5] dt-bindings: iio: adc: Add Xilinx AMS binding documentation Anand Ashok Dumbre
2021-11-24 22:54 ` [PATCH v11 5/5] MAINTAINERS: Add maintainer for xilinx-ams Anand Ashok Dumbre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v11 0/5] Add Xilinx AMS Driver' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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