From: kernel test robot <lkp@intel.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
linux@roeck-us.net, heikki.krogerus@linux.intel.com,
rdunlap@infradead.org, gregkh@linuxfoundation.org,
bjorn.andersson@linaro.org, robh+dt@kernel.org,
linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org
Cc: kbuild-all@lists.01.org, wcheng@codeaurora.org
Subject: Re: [RESEND PATCH v2 7/7] usb: typec: qcom: Add a pm8150b TCPM driver
Date: Sat, 30 Oct 2021 00:40:03 +0800 [thread overview]
Message-ID: <202110300024.t6vJBxUO-lkp@intel.com> (raw)
In-Reply-To: <20211028164941.831918-8-bryan.odonoghue@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 7259 bytes --]
Hi Bryan,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on robh/for-next linus/master v5.15-rc7 next-20211029]
[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/Bryan-O-Donoghue/Add-pm8150b-TPCM-driver/20211029-010406
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/fe4e9d995058581a4428c9c5c91e848eab3beef5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/Add-pm8150b-TPCM-driver/20211029-010406
git checkout fe4e9d995058581a4428c9c5c91e848eab3beef5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/usb/typec/tcpm/qcom/qcom_pmic_tcpm_typec.c: In function 'qcom_pmic_tcpm_typec_get_cc':
>> drivers/usb/typec/tcpm/qcom/qcom_pmic_tcpm_typec.c:205:24: error: variable 'debounced' set but not used [-Werror=unused-but-set-variable]
205 | bool attached, debounced;
| ^~~~~~~~~
drivers/usb/typec/tcpm/qcom/qcom_pmic_tcpm_typec.c: In function 'qcom_pmic_tcpm_typec_set_cc':
>> drivers/usb/typec/tcpm/qcom/qcom_pmic_tcpm_typec.c:296:22: error: variable 'orientation' set but not used [-Werror=unused-but-set-variable]
296 | unsigned int orientation, misc;
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
--
drivers/usb/typec/tcpm/qcom/qcom_pmic_tcpm_pdphy.c: In function 'qcom_pmic_tcpm_pdphy_disable':
>> drivers/usb/typec/tcpm/qcom/qcom_pmic_tcpm_pdphy.c:431:24: error: unused variable 'dev' [-Werror=unused-variable]
431 | struct device *dev = pmic_pdphy->dev;
| ^~~
cc1: all warnings being treated as errors
vim +/debounced +205 drivers/usb/typec/tcpm/qcom/qcom_pmic_tcpm_typec.c
198
199 int qcom_pmic_tcpm_typec_get_cc(struct pmic_typec *pmic_typec,
200 enum typec_cc_status *cc1,
201 enum typec_cc_status *cc2)
202 {
203 struct device *dev = pmic_typec->dev;
204 unsigned int misc, val;
> 205 bool attached, debounced;
206 int ret = 0;
207
208 ret = regmap_read(pmic_typec->regmap,
209 pmic_typec->base + TYPEC_MISC_STATUS_REG, &misc);
210 if (ret)
211 goto done;
212
213 attached = !!(misc & CC_ATTACHED);
214 debounced = !!(misc & TYPEC_DEBOUNCE_DONE);
215
216 if (pmic_typec->debouncing_cc) {
217 ret = -EBUSY;
218 goto done;
219 }
220
221 *cc1 = TYPEC_CC_OPEN;
222 *cc2 = TYPEC_CC_OPEN;
223
224 if (!(attached))
225 goto done;
226
227 if (misc & SNK_SRC_MODE) {
228 ret = regmap_read(pmic_typec->regmap,
229 pmic_typec->base + TYPEC_SRC_STATUS_REG,
230 &val);
231 if (ret)
232 goto done;
233 switch (val & DETECTED_SRC_TYPE_MASK) {
234 case SRC_RD_OPEN:
235 val = TYPEC_CC_RD;
236 break;
237 case SRC_RD_RA_VCONN:
238 val = TYPEC_CC_RD;
239 *cc1 = TYPEC_CC_RA;
240 *cc2 = TYPEC_CC_RA;
241 break;
242 default:
243 dev_warn(dev, "unexpected src status %.2x\n", val);
244 val = TYPEC_CC_RD;
245 break;
246 }
247 } else {
248 ret = regmap_read(pmic_typec->regmap,
249 pmic_typec->base + TYPEC_SNK_STATUS_REG,
250 &val);
251 if (ret)
252 goto done;
253 switch (val & DETECTED_SNK_TYPE_MASK) {
254 case SNK_RP_STD:
255 val = TYPEC_CC_RP_DEF;
256 break;
257 case SNK_RP_1P5:
258 val = TYPEC_CC_RP_1_5;
259 break;
260 case SNK_RP_3P0:
261 val = TYPEC_CC_RP_3_0;
262 break;
263 default:
264 dev_warn(dev, "unexpected snk status %.2x\n", val);
265 val = TYPEC_CC_RP_DEF;
266 break;
267 }
268 val = TYPEC_CC_RP_DEF;
269 }
270
271 if (misc & CC_ORIENTATION)
272 *cc2 = val;
273 else
274 *cc1 = val;
275
276 done:
277 dev_dbg(dev, "get_cc: misc 0x%08x cc1 0x%08x %s cc2 0x%08x %s attached %d cc=%s\n",
278 misc, *cc1, cc_to_name(*cc1), *cc2, cc_to_name(*cc2), !!(misc & CC_ATTACHED),
279 misc_to_cc(misc));
280
281 return ret;
282 }
283
284 static void qcom_pmic_set_cc_debounce(struct pmic_typec *pmic_typec)
285 {
286 pmic_typec->debouncing_cc = true;
287 schedule_delayed_work(&pmic_typec->cc_debounce_dwork,
288 msecs_to_jiffies(2));
289 }
290
291 int qcom_pmic_tcpm_typec_set_cc(struct pmic_typec *pmic_typec,
292 enum typec_cc_status cc)
293 {
294 struct device *dev = pmic_typec->dev;
295 unsigned int mode, currsrc;
> 296 unsigned int orientation, misc;
297 unsigned long flags;
298 int ret;
299
300 spin_lock_irqsave(&pmic_typec->lock, flags);
301
302 ret = regmap_read(pmic_typec->regmap,
303 pmic_typec->base + TYPEC_MISC_STATUS_REG,
304 &misc);
305 if (ret)
306 goto done;
307
308 orientation = !!(misc & CC_ORIENTATION);
309
310 mode = EN_SRC_ONLY;
311
312 switch (cc) {
313 case TYPEC_CC_OPEN:
314 currsrc = TYPEC_SRC_RP_SEL_80UA;
315 break;
316 case TYPEC_CC_RP_DEF:
317 currsrc = TYPEC_SRC_RP_SEL_80UA;
318 break;
319 case TYPEC_CC_RP_1_5:
320 currsrc = TYPEC_SRC_RP_SEL_180UA;
321 break;
322 case TYPEC_CC_RP_3_0:
323 currsrc = TYPEC_SRC_RP_SEL_330UA;
324 break;
325 case TYPEC_CC_RD:
326 currsrc = TYPEC_SRC_RP_SEL_80UA;
327 mode = EN_SNK_ONLY;
328 break;
329 default:
330 dev_warn(dev, "unexpected set_cc %d\n", cc);
331 ret = -EINVAL;
332 goto done;
333 }
334
335 if (mode == EN_SRC_ONLY) {
336 ret = regmap_write(pmic_typec->regmap,
337 pmic_typec->base + TYPEC_CURRSRC_CFG_REG,
338 currsrc);
339 if (ret)
340 goto done;
341 }
342
343 pmic_typec->cc = cc;
344 qcom_pmic_set_cc_debounce(pmic_typec);
345 ret = 0;
346
347 done:
348 spin_unlock_irqrestore(&pmic_typec->lock, flags);
349
350 dev_dbg(dev, "set_cc: currsrc=%x %s mode %s debounce %d attached %d cc=%s\n",
351 currsrc, rp_sel_to_name(currsrc),
352 mode == EN_SRC_ONLY ? "EN_SRC_ONLY" : "EN_SNK_ONLY",
353 pmic_typec->debouncing_cc, !!(misc & CC_ATTACHED),
354 misc_to_cc(misc));
355
356 return ret;
357 }
358
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 61662 bytes --]
next prev parent reply other threads:[~2021-10-29 16:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 16:49 [RESEND PATCH v2 0/7] Add pm8150b TPCM driver Bryan O'Donoghue
2021-10-28 16:49 ` [RESEND PATCH v2 1/7] dt-bindings: usb: Add qcom,pmic-usb-typec dt-binding header Bryan O'Donoghue
2021-10-28 16:49 ` [RESEND PATCH v2 2/7] dt-bindings: usb: Add Qualcomm PMIC type C controller YAML schema Bryan O'Donoghue
2021-10-28 19:08 ` Rob Herring
2021-10-28 20:38 ` Rob Herring
2021-10-28 16:49 ` [RESEND PATCH v2 3/7] dt-bindings: usb: Add qcom,pmic-usb-pdphy dt-binding header Bryan O'Donoghue
2021-10-28 16:49 ` [RESEND PATCH v2 4/7] dt-bindings: usb: Add Qualcomm PMIC PDPHY controller YAML schema Bryan O'Donoghue
2021-10-28 19:08 ` Rob Herring
2021-10-28 20:39 ` Rob Herring
2021-10-28 16:49 ` [RESEND PATCH v2 5/7] dt-bindings: usb: Add Qualcomm PMIC TCPM " Bryan O'Donoghue
2021-10-28 20:43 ` Rob Herring
2021-10-28 21:46 ` Bryan O'Donoghue
2021-10-28 21:52 ` Bryan O'Donoghue
2021-10-28 16:49 ` [RESEND PATCH v2 6/7] usb: typec: qcom: Remove standalone qcom pm8150b typec driver Bryan O'Donoghue
2021-10-28 16:49 ` [RESEND PATCH v2 7/7] usb: typec: qcom: Add a pm8150b TCPM driver Bryan O'Donoghue
2021-10-29 16:40 ` kernel test robot [this message]
[not found] <202110301822.cMPH2aH0-lkp@intel.com>
2021-11-05 5:45 ` kernel test robot
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=202110300024.t6vJBxUO-lkp@intel.com \
--to=lkp@intel.com \
--cc=bjorn.andersson@linaro.org \
--cc=bryan.odonoghue@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=wcheng@codeaurora.org \
/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;
as well as URLs for NNTP newsgroup(s).