All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v6 2/4] iio: adc: Add Xilinx AMS driver
  2021-06-24 18:29 ` [PATCH v6 2/4] iio: adc: Add Xilinx AMS driver Anand Ashok Dumbre
  2021-06-25 10:49     ` kernel test robot
@ 2021-06-29  8:32 ` Dan Carpenter
  2021-07-04 18:31   ` Jonathan Cameron
  2 siblings, 0 replies; 19+ messages in thread
From: kernel test robot @ 2021-06-28 21:45 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6563 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210624182939.12881-3-anand.ashok.dumbre@xilinx.com>
References: <20210624182939.12881-3-anand.ashok.dumbre@xilinx.com>
TO: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
TO: jic23(a)kernel.org
TO: lars(a)metafoo.de
TO: linux-iio(a)vger.kernel.org
TO: git-dev(a)xilinx.com
TO: michal.simek(a)xilinx.com
TO: pmeerw(a)pmeerw.net
TO: devicetree(a)vger.kernel.org
TO: linux-kernel(a)vger.kernel.org
CC: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
CC: Manish Narani <manish.narani@xilinx.com>

Hi Anand,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iio/togreg]
[also build test WARNING on linus/master v5.13 next-20210628]
[cannot apply to xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20210625-023047
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: microblaze-randconfig-m031-20210628 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/iio/adc/xilinx-ams.c:406 ams_enable_channel_sequence() warn: should '(((1))) << (indio_dev->channels[i]->scan_index)' be a 64 bit type?
drivers/iio/adc/xilinx-ams.c:1126 ams_init_module() error: uninitialized symbol 'chan_node'.

vim +406 drivers/iio/adc/xilinx-ams.c

fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  391  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  392  static void ams_enable_channel_sequence(struct iio_dev *indio_dev)
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  393  {
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  394  	int i;
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  395  	unsigned long long scan_mask;
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  396  	struct ams *ams = iio_priv(indio_dev);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  397  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  398  	/*
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  399  	 * Enable channel sequence. First 22 bits of scan_mask represent
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  400  	 * PS channels, and next remaining bits represent PL channels.
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  401  	 */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  402  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  403  	/* Run calibration of PS & PL as part of the sequence */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  404  	scan_mask = 0x1 | BIT(AMS_PS_SEQ_MAX);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  405  	for (i = 0; i < indio_dev->num_channels; i++)
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24 @406  		scan_mask |= BIT(indio_dev->channels[i].scan_index);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  407  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  408  	if (ams->ps_base) {
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  409  		/* put sysmon in a soft reset to change the sequence */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  410  		ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  411  				  AMS_CONF1_SEQ_DEFAULT);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  412  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  413  		/* configure basic channels */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  414  		writel(scan_mask & AMS_REG_SEQ0_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  415  		       ams->ps_base + AMS_REG_SEQ_CH0);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  416  		writel(AMS_REG_SEQ2_MASK &
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  417  		       (scan_mask >> AMS_REG_SEQ2_MASK_SHIFT),
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  418  		       ams->ps_base + AMS_REG_SEQ_CH2);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  419  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  420  		/* set continuous sequence mode */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  421  		ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  422  				  AMS_CONF1_SEQ_CONTINUOUS);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  423  	}
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  424  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  425  	if (ams->pl_base) {
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  426  		/* put sysmon in a soft reset to change the sequence */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  427  		ams_pl_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  428  				  AMS_CONF1_SEQ_DEFAULT);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  429  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  430  		/* configure basic channels */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  431  		scan_mask = scan_mask >> AMS_PS_SEQ_MAX;
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  432  		writel(scan_mask & AMS_REG_SEQ0_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  433  		       ams->pl_base + AMS_REG_SEQ_CH0);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  434  		writel(AMS_REG_SEQ2_MASK &
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  435  		       (scan_mask >> AMS_REG_SEQ2_MASK_SHIFT),
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  436  		       ams->pl_base + AMS_REG_SEQ_CH2);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  437  		writel(AMS_REG_SEQ1_MASK &
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  438  		       (scan_mask >> AMS_REG_SEQ1_MASK_SHIFT),
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  439  		       ams->pl_base + AMS_REG_SEQ_CH1);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  440  
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  441  		/* set continuous sequence mode */
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  442  		ams_pl_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  443  				  AMS_CONF1_SEQ_CONTINUOUS);
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  444  	}
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  445  }
fa0ea7aaf7a9bf Anand Ashok Dumbre 2021-06-24  446  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31380 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH v6 0/4] Add Xilinx AMS Driver
@ 2021-06-24 18:29 Anand Ashok Dumbre
  2021-06-24 18:29 ` [PATCH v6 1/4] arm64: zynqmp: DT: Add Xilinx AMS node Anand Ashok Dumbre
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Anand Ashok Dumbre @ 2021-06-24 18:29 UTC (permalink / raw)
  To: jic23, lars, linux-iio, git-dev, michal.simek, pmeerw,
	devicetree, linux-kernel
  Cc: Anand Ashok Dumbre

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
		  instead
		- Removed the unnecessary delay of 1ms and used polling of EOC
		  instead
		- 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 checkpatch.pl in the driver.
	- devm_add_action_or_reset() used for exit/error path.
	- devm_request_irq() for managed irq request instead of
	  request_irq()




Anand Ashok Dumbre (4):
  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     |  228 +++
 MAINTAINERS                                   |    7 +
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi        |   26 +-
 drivers/iio/adc/Kconfig                       |   13 +
 drivers/iio/adc/Makefile                      |    1 +
 drivers/iio/adc/xilinx-ams.c                  | 1342 +++++++++++++++++
 6 files changed, 1616 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
 create mode 100644 drivers/iio/adc/xilinx-ams.c

-- 
2.17.1


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

end of thread, other threads:[~2021-07-19  7:49 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 21:45 [PATCH v6 2/4] iio: adc: Add Xilinx AMS driver kernel test robot
2021-06-29  8:32 ` Dan Carpenter
2021-06-29  8:32 ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2021-06-24 18:29 [PATCH v6 0/4] Add Xilinx AMS Driver Anand Ashok Dumbre
2021-06-24 18:29 ` [PATCH v6 1/4] arm64: zynqmp: DT: Add Xilinx AMS node Anand Ashok Dumbre
2021-06-24 18:29 ` [PATCH v6 2/4] iio: adc: Add Xilinx AMS driver Anand Ashok Dumbre
2021-06-25 10:49   ` kernel test robot
2021-06-25 10:49     ` kernel test robot
2021-07-01  8:00   ` kernel test robot
2021-07-01  8:00     ` kernel test robot
2021-07-04 18:31   ` Jonathan Cameron
2021-07-15  7:48     ` Anand Ashok Dumbre
2021-07-15 12:52       ` Jonathan Cameron
2021-07-19  7:49         ` Anand Ashok Dumbre
2021-06-24 18:29 ` [PATCH v6 3/4] dt-bindings: iio: adc: Add Xilinx AMS binding documentation Anand Ashok Dumbre
2021-07-04 18:08   ` Jonathan Cameron
2021-07-13 22:31   ` Rob Herring
2021-07-15  6:58     ` Anand Ashok Dumbre
2021-06-24 18:29 ` [PATCH v6 4/4] MAINTAINERS: Add maintainer for xilinx-ams Anand Ashok Dumbre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.