public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Trevor Gamblin <tgamblin@baylibre.com>
To: "kernel test robot" <lkp@intel.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"David Lechner" <dlechner@baylibre.com>,
	"Uwe Kleine-Konig" <u.kleine-koenig@baylibre.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v3 2/3] iio: adc: ad7625: add driver
Date: Tue, 20 Aug 2024 17:07:27 -0400	[thread overview]
Message-ID: <7658aca4-a408-480c-98b6-4637bb86b5ad@baylibre.com> (raw)
In-Reply-To: <202408201520.lFtco3eF-lkp@intel.com>


On 2024-08-20 3:19 a.m., kernel test robot wrote:
> Hi Trevor,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on ac6a258892793f0a255fe7084ec2b612131c67fc]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Trevor-Gamblin/dt-bindings-iio-adc-add-AD762x-AD796x-ADCs/20240819-221425
> base:   ac6a258892793f0a255fe7084ec2b612131c67fc
> patch link:    https://lore.kernel.org/r/20240819-ad7625_r1-v3-2-75d5217c76b5%40baylibre.com
> patch subject: [PATCH v3 2/3] iio: adc: ad7625: add driver
> config: alpha-randconfig-r132-20240820 (https://download.01.org/0day-ci/archive/20240820/202408201520.lFtco3eF-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 13.3.0
> reproduce: (https://download.01.org/0day-ci/archive/20240820/202408201520.lFtco3eF-lkp@intel.com/reproduce)
Seems to be a problem with missing static inline definitions in pwm.h if 
CONFIG_PWM isn't set. I've replied to the relevant series on the PWM 
mailing list and will add "select PWM" to Kconfig for this driver.
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202408201520.lFtco3eF-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>     drivers/iio/adc/ad7625.c: In function 'ad7625_set_sampling_freq':
>>> drivers/iio/adc/ad7625.c:191:15: error: implicit declaration of function 'pwm_round_waveform_might_sleep' [-Werror=implicit-function-declaration]
>       191 |         ret = pwm_round_waveform_might_sleep(st->cnv_pwm, &cnv_wf);
>           |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     drivers/iio/adc/ad7625.c: In function 'ad7625_buffer_preenable':
>>> drivers/iio/adc/ad7625.c:420:15: error: implicit declaration of function 'pwm_set_waveform_might_sleep' [-Werror=implicit-function-declaration]
>       420 |         ret = pwm_set_waveform_might_sleep(st->cnv_pwm, &st->cnv_wf, false);
>           |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     cc1: some warnings being treated as errors
>
>
> vim +/pwm_round_waveform_might_sleep +191 drivers/iio/adc/ad7625.c
>
>     175	
>     176	static int ad7625_set_sampling_freq(struct ad7625_state *st, int freq)
>     177	{
>     178		u64 target;
>     179		struct pwm_waveform clk_gate_wf = { }, cnv_wf = { };
>     180		int ret;
>     181	
>     182		target = DIV_ROUND_UP_ULL(NSEC_PER_SEC, freq);
>     183		cnv_wf.period_length_ns = clamp(target, 100, 10 * KILO);
>     184	
>     185		/*
>     186		 * Use the maximum conversion time t_CNVH from the datasheet as
>     187		 * the duty_cycle for ref_clk, cnv, and clk_gate
>     188		 */
>     189		cnv_wf.duty_length_ns = st->info->timing_spec->conv_high_ns;
>     190	
>   > 191		ret = pwm_round_waveform_might_sleep(st->cnv_pwm, &cnv_wf);
>     192		if (ret)
>     193			return ret;
>     194	
>     195		/*
>     196		 * Set up the burst signal for transferring data. period and
>     197		 * offset should mirror the CNV signal
>     198		 */
>     199		clk_gate_wf.period_length_ns = cnv_wf.period_length_ns;
>     200	
>     201		clk_gate_wf.duty_length_ns = DIV_ROUND_UP_ULL((u64)NSEC_PER_SEC *
>     202			st->info->chan_spec.scan_type.realbits,
>     203			st->ref_clk_rate_hz);
>     204	
>     205		/* max t_MSB from datasheet */
>     206		clk_gate_wf.duty_offset_ns = st->info->timing_spec->conv_msb_ns;
>     207	
>     208		ret = pwm_round_waveform_might_sleep(st->clk_gate_pwm, &clk_gate_wf);
>     209		if (ret)
>     210			return ret;
>     211	
>     212		st->cnv_wf = cnv_wf;
>     213		st->clk_gate_wf = clk_gate_wf;
>     214	
>     215		/* TODO: Add a rounding API for PWMs that can simplify this */
>     216		target = DIV_ROUND_CLOSEST_ULL(st->ref_clk_rate_hz, freq);
>     217		st->sampling_freq_hz = DIV_ROUND_CLOSEST_ULL(st->ref_clk_rate_hz,
>     218							     target);
>     219	
>     220		return 0;
>     221	}
>     222	
>

  reply	other threads:[~2024-08-20 21:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 14:11 [PATCH v3 0/3] iio: adc: add new ad7625 driver Trevor Gamblin
2024-08-19 14:11 ` [PATCH v3 1/3] dt-bindings: iio: adc: add AD762x/AD796x ADCs Trevor Gamblin
2024-08-19 16:31   ` Conor Dooley
2024-08-19 14:11 ` [PATCH v3 2/3] iio: adc: ad7625: add driver Trevor Gamblin
2024-08-20  7:19   ` kernel test robot
2024-08-20 21:07     ` Trevor Gamblin [this message]
2024-09-04  7:58       ` Uwe Kleine-König
2024-09-04 15:00         ` Trevor Gamblin
2024-08-23 18:48   ` Jonathan Cameron
2024-08-19 14:11 ` [PATCH v3 3/3] docs: iio: new docs for ad7625 driver Trevor Gamblin

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=7658aca4-a408-480c-98b6-4637bb86b5ad@baylibre.com \
    --to=tgamblin@baylibre.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox