All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Ingenic: iio/adc: add JZ4760(B) support to the
@ 2021-07-21 10:53 citral23
  2021-07-21 10:53 ` [PATCH 1/6] iio/adc: ingenic: rename has_aux2 to has_aux_md citral23
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: citral23 @ 2021-07-21 10:53 UTC (permalink / raw)
  To: paul
  Cc: jic23, lars, linux-mips, linux-iio, linux-kernel, robh+dt,
	devicetree, linux, contact

This is a set of patches to add support for the JZ4760(B) socs
to ingenic-sadc, those socs have 3 aux channels, and the JZ4760B
has an extra register to set the battery divider as internal or 
external.



^ permalink raw reply	[flat|nested] 30+ messages in thread
* Re: [PATCH 5/6] iio/adc: ingenic: modify
@ 2021-07-21 15:24 kernel test robot
  0 siblings, 0 replies; 30+ messages in thread
From: kernel test robot @ 2021-07-21 15:24 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210721105317.36742-6-cbranchereau@gmail.com>
References: <20210721105317.36742-6-cbranchereau@gmail.com>
TO: citral23 <cbranchereau@gmail.com>
TO: paul(a)crapouillou.net
CC: jic23(a)kernel.org
CC: lars(a)metafoo.de
CC: linux-mips(a)vger.kernel.org
CC: linux-iio(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: robh+dt(a)kernel.org
CC: devicetree(a)vger.kernel.org
CC: linux(a)roeck-us.net
CC: contact(a)artur-rojek.eu

Hi citral23,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iio/togreg]
[also build test WARNING on robh/for-next linux/master linus/master v5.14-rc2 next-20210721]
[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/citral23/iio-adc-ingenic-rename-has_aux2-to-has_aux_md/20210721-200734
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: i386-randconfig-m021-20210720 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.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/ingenic-adc.c:660 ingenic_adc_read_chan_info_raw() error: uninitialized symbol 'cmd'.

vim +/cmd +660 drivers/iio/adc/ingenic-adc.c

1a78daea107ddb Artur Rojek 2019-02-04  630  
1a99dc467943c0 Artur Rojek 2020-07-19  631  static int ingenic_adc_read_chan_info_raw(struct iio_dev *iio_dev,
1a78daea107ddb Artur Rojek 2019-02-04  632  					  struct iio_chan_spec const *chan,
a515d648850546 Artur Rojek 2019-07-27  633  					  int *val)
1a78daea107ddb Artur Rojek 2019-02-04  634  {
36c0cfb740f32b citral23    2021-07-21  635  	int cmd, ret, engine = (chan->channel == INGENIC_ADC_BATTERY);
1a99dc467943c0 Artur Rojek 2020-07-19  636  	struct ingenic_adc *adc = iio_priv(iio_dev);
1a99dc467943c0 Artur Rojek 2020-07-19  637  
1a99dc467943c0 Artur Rojek 2020-07-19  638  	ret = clk_enable(adc->clk);
1a99dc467943c0 Artur Rojek 2020-07-19  639  	if (ret) {
1a99dc467943c0 Artur Rojek 2020-07-19  640  		dev_err(iio_dev->dev.parent, "Failed to enable clock: %d\n",
1a99dc467943c0 Artur Rojek 2020-07-19  641  			ret);
1a99dc467943c0 Artur Rojek 2020-07-19  642  		return ret;
1a99dc467943c0 Artur Rojek 2020-07-19  643  	}
1a78daea107ddb Artur Rojek 2019-02-04  644  
36c0cfb740f32b citral23    2021-07-21  645  	/* We cannot sample the aux channels in parallel. */
a515d648850546 Artur Rojek 2019-07-27  646  	mutex_lock(&adc->aux_lock);
35cf95a30e2df9 citral23    2021-07-21  647  	if (adc->soc_data->has_aux_md && engine == 0) {
36c0cfb740f32b citral23    2021-07-21  648  		switch (chan->channel) {
36c0cfb740f32b citral23    2021-07-21  649  		case INGENIC_ADC_AUX0:
36c0cfb740f32b citral23    2021-07-21  650  			cmd = 0;
36c0cfb740f32b citral23    2021-07-21  651  			break;
36c0cfb740f32b citral23    2021-07-21  652  		case INGENIC_ADC_AUX:
36c0cfb740f32b citral23    2021-07-21  653  			cmd = 1;
36c0cfb740f32b citral23    2021-07-21  654  			break;
36c0cfb740f32b citral23    2021-07-21  655  		case INGENIC_ADC_AUX2:
36c0cfb740f32b citral23    2021-07-21  656  			cmd = 2;
36c0cfb740f32b citral23    2021-07-21  657  			break;
36c0cfb740f32b citral23    2021-07-21  658  		}
36c0cfb740f32b citral23    2021-07-21  659               
36c0cfb740f32b citral23    2021-07-21 @660  		ingenic_adc_set_config(adc, JZ_ADC_REG_CFG_AUX_MD, cmd);
1a78daea107ddb Artur Rojek 2019-02-04  661  	}
1a78daea107ddb Artur Rojek 2019-02-04  662  
a515d648850546 Artur Rojek 2019-07-27  663  	ret = ingenic_adc_capture(adc, engine);
a515d648850546 Artur Rojek 2019-07-27  664  	if (ret)
a515d648850546 Artur Rojek 2019-07-27  665  		goto out;
a515d648850546 Artur Rojek 2019-07-27  666  
1a78daea107ddb Artur Rojek 2019-02-04  667  	switch (chan->channel) {
36c0cfb740f32b citral23    2021-07-21  668  	case INGENIC_ADC_AUX0:
1a78daea107ddb Artur Rojek 2019-02-04  669  	case INGENIC_ADC_AUX:
a515d648850546 Artur Rojek 2019-07-27  670  	case INGENIC_ADC_AUX2:
1a78daea107ddb Artur Rojek 2019-02-04  671  		*val = readw(adc->base + JZ_ADC_REG_ADSDAT);
1a78daea107ddb Artur Rojek 2019-02-04  672  		break;
1a78daea107ddb Artur Rojek 2019-02-04  673  	case INGENIC_ADC_BATTERY:
1a78daea107ddb Artur Rojek 2019-02-04  674  		*val = readw(adc->base + JZ_ADC_REG_ADBDAT);
1a78daea107ddb Artur Rojek 2019-02-04  675  		break;
1a78daea107ddb Artur Rojek 2019-02-04  676  	}
1a78daea107ddb Artur Rojek 2019-02-04  677  
a515d648850546 Artur Rojek 2019-07-27  678  	ret = IIO_VAL_INT;
a515d648850546 Artur Rojek 2019-07-27  679  out:
a515d648850546 Artur Rojek 2019-07-27  680  	mutex_unlock(&adc->aux_lock);
1a99dc467943c0 Artur Rojek 2020-07-19  681  	clk_disable(adc->clk);
1a78daea107ddb Artur Rojek 2019-02-04  682  
a515d648850546 Artur Rojek 2019-07-27  683  	return ret;
a515d648850546 Artur Rojek 2019-07-27  684  }
a515d648850546 Artur Rojek 2019-07-27  685  

---
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: 39368 bytes --]

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

end of thread, other threads:[~2021-07-24 15:20 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 10:53 [PATCH] Ingenic: iio/adc: add JZ4760(B) support to the citral23
2021-07-21 10:53 ` [PATCH 1/6] iio/adc: ingenic: rename has_aux2 to has_aux_md citral23
2021-07-21 17:46   ` Paul Cercueil
2021-07-21 10:53 ` [PATCH 2/6] dt-bindings: iio/adc: add an INGENIC_ADC_AUX0 entry citral23
2021-07-21 17:46   ` Paul Cercueil
2021-07-21 10:53 ` [PATCH 3/6] iio/adc: ingenic: add JZ4760 support to the sadc driver citral23
2021-07-21 18:15   ` Paul Cercueil
2021-07-22  5:09     ` Christophe Branchereau
2021-07-22  5:23       ` Guenter Roeck
2021-07-23  8:58         ` [PATCH V2 0/5] iio/adc: ingenic: add support for the JZ4760(B) Socs to the ingenic " Christophe Branchereau
2021-07-23  8:58           ` [PATCH V2 1/5] iio/adc: ingenic: rename has_aux2 to has_aux_md Christophe Branchereau
2021-07-23  8:58           ` [PATCH V2 2/5] dt-bindings: iio/adc: add an INGENIC_ADC_AUX0 entry Christophe Branchereau
2021-07-23  8:58           ` [PATCH V2 3/5] iio/adc: ingenic: add JZ4760 support to the sadc driver Christophe Branchereau
2021-07-23  8:58           ` [PATCH V2 4/5] iio/adc: ingenic: add JZ4760B " Christophe Branchereau
2021-07-23 16:15             ` Jonathan Cameron
2021-07-23  8:58           ` [PATCH V2 5/5] dt-bindings: iio/adc: ingenic: add the JZ4760(B) socs to the sadc Documentation Christophe Branchereau
2021-07-23 16:16             ` Jonathan Cameron
2021-07-24  7:33               ` Christophe Branchereau
2021-07-24 15:23                 ` Jonathan Cameron
2021-07-23 16:03           ` [PATCH V2 0/5] iio/adc: ingenic: add support for the JZ4760(B) Socs to the ingenic sadc driver Jonathan Cameron
2021-07-23 16:13     ` [PATCH 3/6] iio/adc: ingenic: add JZ4760 support to the " Jonathan Cameron
2021-07-21 10:53 ` [PATCH 4/6] iio/adc: ingenic: add JZ4760B " citral23
2021-07-21 18:24   ` Paul Cercueil
2021-07-21 10:53 ` [PATCH 5/6] iio/adc: ingenic: modify citral23
2021-07-21 18:28   ` Paul Cercueil
2021-07-21 10:53 ` [PATCH 6/6] dt-bindings: iio/adc: ingenic: add the JZ4760(B) socs to the sadc Documentation citral23
2021-07-21 19:17   ` Paul Cercueil
2021-07-23 16:10     ` Jonathan Cameron
2021-07-22  2:09   ` Rob Herring
2021-07-21 15:24 [PATCH 5/6] iio/adc: ingenic: modify kernel test robot

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.