From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BA351C4621 for ; Tue, 20 Aug 2024 21:07:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724188052; cv=none; b=GkxGF1SzSVmB/16qmmX3PYCaWH21GDObfGmGQfCXIQ2TBbqaz0wLbx+vV2o/lW8UgoZP+cXfoIScN2akEmEH6NSid3Xn0rwjTa0BaakoJ9nYRgS6NBtiBbD0tXp/gV4wTIOP8NKlyrrU3FTjIAzb6x95prpFhWZ2KcGH2iEvayk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724188052; c=relaxed/simple; bh=XNFvctVhIwp6wrUS5NtnVVcSlfcNFqnWQa6xosRIEHo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PJXXs3EV8ElC73RfmDG8yjOAf/7Zb+d/b4Keqv4hzGlgwgq6uB1G0P2ghiY3YSw/nlIzekTU6XWHvbiflzOi/scyRRAwQ7YwZl9ejGXwVFJjDAgbFICx5+I5hlFeGHdm68n68Ihg52kgSaNy4ZeQceRQKO73w5hwz+DYClQGJ5k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=YdPgC7DF; arc=none smtp.client-ip=209.85.219.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="YdPgC7DF" Received: by mail-yb1-f179.google.com with SMTP id 3f1490d57ef6-e13cce6dc85so3926307276.2 for ; Tue, 20 Aug 2024 14:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1724188049; x=1724792849; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=aebfEap/ASBe5Gb+mw0cMwkvvA5FCkHO5rzJr5kiaeg=; b=YdPgC7DFxyCMrhIWHOsfXtiG0g8yJpxTraDA27zkaixffGq/NqDIyX/+cXNDmWhiZ+ IwhHQs6e7rCr4zuSeQZ3YDTpo+t3WT3xNFsybWYbc6E6e3ATbdeC/iimuePxsEX11/1b WIaNFVNIgTC5s1TXlJpX+ROi/jTIps1cmjBMWBPNs2ta5GM5VtrR2B5YSko7mrmnkdgc l3+5p0DtKw4OnjFbRufN1SoQzF4UyyAjLtmFrqmW6WQx+iUbqzghwaz5NR4U9ogWl9Bn +vn9tPhMm4JHddNK3Yf3BgKIQfj+XqW6Qh/42cPMtxr4Ebf0kJvNjWs6hnAoQ8jfdIW6 9tvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724188049; x=1724792849; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aebfEap/ASBe5Gb+mw0cMwkvvA5FCkHO5rzJr5kiaeg=; b=bUn2tkwuYAXZuZQP0kGmCtTRw7xxSi2YaSWV+QPYdlNXYWewRQ78Yo+eLfjPKeVQWQ 4IO3BavzIuMQkF+0rcBu1QJKft+WtwQUwMzGipBQ1mzHzkSDfk8f8jZIUi1O1BTsmkg7 yHOmaf6rX/zAtwO1Nq1aguMJhL6MQvZEnMxd6td0lFQOWy1UEe6Eusyfi/XVbbAztIyd Lktb8a0Z2xhUSZlI5WPBJu0GFzgZtqCV6hCJR/OKc3LIfDc5XNtZJ4kc0vyVVFXS0J2v ELhfIK4d+8sRxMJ4XkkVohYG61EFjtBJfVfWY0iWi7K3Uoo7NsDtsX9T6ZT7RBTxaSLk 6SAw== X-Forwarded-Encrypted: i=1; AJvYcCWxaz4E5qvDxvxjH5XQyrGeJNwHaGzU46vHlHcxFcsFN0Q63A+lbZic3IiuNMOd0krvKxD3J3BHjocB@vger.kernel.org X-Gm-Message-State: AOJu0Yw+ckQqyJJeIiyFyTuxCvjMZGyT7QbWPVGguirueKkPk0cTTefP rp0n8ZRLfbAyTPc7IvhBTQwL6LOp28IwdCWe2zt8AKvDoUhAHXC+DGuDjzxP1Wg= X-Google-Smtp-Source: AGHT+IEbwKid8lGpSqZEjokGZLtdiVUpmCFV7bwar2w8v4lWx6MWt47SpOfAEtmAV7/wUbEyz60atQ== X-Received: by 2002:a05:690c:2e8d:b0:6b0:2031:6414 with SMTP id 00721157ae682-6c09d4ff4fcmr6360937b3.24.1724188049085; Tue, 20 Aug 2024 14:07:29 -0700 (PDT) Received: from [192.168.40.12] (d24-150-219-207.home.cgocable.net. [24.150.219.207]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bf6fdd8bfdsm55935356d6.19.2024.08.20.14.07.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Aug 2024 14:07:28 -0700 (PDT) Message-ID: <7658aca4-a408-480c-98b6-4637bb86b5ad@baylibre.com> Date: Tue, 20 Aug 2024 17:07:27 -0400 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/3] iio: adc: ad7625: add driver To: kernel test robot , Lars-Peter Clausen , Michael Hennerich , =?UTF-8?Q?Nuno_S=C3=A1?= , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , David Lechner , Uwe Kleine-Konig 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 References: <20240819-ad7625_r1-v3-2-75d5217c76b5@baylibre.com> <202408201520.lFtco3eF-lkp@intel.com> Content-Language: en-US From: Trevor Gamblin In-Reply-To: <202408201520.lFtco3eF-lkp@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > | 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 >