From: kernel test robot <lkp@intel.com>
To: Xinhu Wu <xinhu.wu@unisoc.com>,
gregkh@linuxfoundation.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
orsonzhai@gmail.com, baolin.wang@linux.alibaba.com,
zhang.lyra@gmail.com, heikki.krogerus@linux.intel.com,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, xinhuwu.unisoc@gmail.com,
zhiyong.liu@unisoc.com, peak.yang@unisoc.com,
teng.zhang1@unisoc.com, bruce.chen@unisoc.com,
surong.pang@unisoc.com, xingxing.luo@unisoc.com,
xinhu.wu@unisoc.com
Subject: Re: [PATCH V2 1/2] usb: typec: Support sprd_pmic_typec driver
Date: Tue, 12 Dec 2023 02:51:00 +0800 [thread overview]
Message-ID: <202312120229.fONhCYBI-lkp@intel.com> (raw)
In-Reply-To: <20231211074120.27958-2-xinhu.wu@unisoc.com>
Hi Xinhu,
kernel test robot noticed the following build warnings:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus robh/for-next westeri-thunderbolt/next linus/master v6.7-rc5 next-20231211]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Xinhu-Wu/usb-typec-Support-sprd_pmic_typec-driver/20231211-154328
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20231211074120.27958-2-xinhu.wu%40unisoc.com
patch subject: [PATCH V2 1/2] usb: typec: Support sprd_pmic_typec driver
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231212/202312120229.fONhCYBI-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231212/202312120229.fONhCYBI-lkp@intel.com/reproduce)
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/202312120229.fONhCYBI-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/usb/typec/sprd_pmic_typec.c: In function 'sprd_pmic_typec_connect':
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_DETACHED_SNK' not handled in switch [-Wswitch]
184 | switch (sc->state) {
| ^~~~~~
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_ATTACHWAIT_SNK' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_DETACHED_SRC' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_ATTACHWAIT_SRC' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_POWERED_CABLE' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_AUDIO_CABLE' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_DEBUG_CABLE' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_TOGGLE_SLEEP' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_ERR_RECOV' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_DISABLED' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_TRY_SNK' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_TRY_WAIT_SRC' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_TRY_SRC' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_TRY_WAIT_SNK' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_UNSUPOORT_ACC' not handled in switch [-Wswitch]
>> drivers/usb/typec/sprd_pmic_typec.c:184:9: warning: enumeration value 'TYPEC_ORIENTED_DEBUG' not handled in switch [-Wswitch]
vim +/TYPEC_DETACHED_SNK +184 drivers/usb/typec/sprd_pmic_typec.c
173
174 static int sprd_pmic_typec_connect(struct sprd_pmic_typec *sc, u32 status)
175 {
176 enum typec_data_role data_role = TYPEC_DEVICE;
177 enum typec_role power_role = TYPEC_SINK;
178 enum typec_role vconn_role = TYPEC_SINK;
179 struct typec_partner_desc desc;
180
181 if (sc->partner)
182 return 0;
183
> 184 switch (sc->state) {
185 case TYPEC_ATTACHED_SNK:
186 power_role = TYPEC_SINK;
187 data_role = TYPEC_DEVICE;
188 vconn_role = TYPEC_SINK;
189 break;
190 case TYPEC_ATTACHED_SRC:
191 power_role = TYPEC_SOURCE;
192 data_role = TYPEC_HOST;
193 vconn_role = TYPEC_SOURCE;
194 break;
195 }
196
197 desc.usb_pd = 0;
198 desc.identity = NULL;
199 if (sc->state == TYPEC_AUDIO_CABLE)
200 desc.accessory = TYPEC_ACCESSORY_AUDIO;
201 else if (sc->state == TYPEC_DEBUG_CABLE)
202 desc.accessory = TYPEC_ACCESSORY_DEBUG;
203 else
204 desc.accessory = TYPEC_ACCESSORY_NONE;
205
206 sc->partner = typec_register_partner(sc->port, &desc);
207 if (!sc->partner)
208 return -ENODEV;
209
210 typec_set_pwr_opmode(sc->port, TYPEC_PWR_MODE_USB);
211 typec_set_pwr_role(sc->port, power_role);
212 typec_set_data_role(sc->port, data_role);
213 typec_set_vconn_role(sc->port, vconn_role);
214
215 switch (sc->state) {
216 case TYPEC_ATTACHED_SNK:
217 sc->pre_state = TYPEC_ATTACHED_SNK;
218 /*notify USB, USB PHY, charger, and bc1p2 driver*/
219 extcon_set_state_sync(sc->edev, EXTCON_USB, true);
220 break;
221 case TYPEC_ATTACHED_SRC:
222 sc->pre_state = TYPEC_ATTACHED_SRC;
223 /*notify USB, USB PHY driver*/
224 extcon_set_state_sync(sc->edev, EXTCON_USB_HOST, true);
225 break;
226 case TYPEC_AUDIO_CABLE:
227 /*notify analog audio driver*/
228 sc->pre_state = TYPEC_AUDIO_CABLE;
229 extcon_set_state_sync(sc->edev, EXTCON_JACK_HEADPHONE, true);
230 break;
231 default:
232 break;
233 }
234
235 spin_lock(&sc->lock);
236 sc->partner_connected = true;
237 spin_unlock(&sc->lock);
238 sprd_pmic_typec_set_cc_polarity_role(sc);
239
240 return 0;
241 }
242
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next parent reply other threads:[~2023-12-11 18:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20231211074120.27958-2-xinhu.wu@unisoc.com>
2023-12-11 18:51 ` kernel test robot [this message]
2023-12-11 19:11 ` [PATCH V2 1/2] usb: typec: Support sprd_pmic_typec driver 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=202312120229.fONhCYBI-lkp@intel.com \
--to=lkp@intel.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=bruce.chen@unisoc.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=orsonzhai@gmail.com \
--cc=peak.yang@unisoc.com \
--cc=robh+dt@kernel.org \
--cc=surong.pang@unisoc.com \
--cc=teng.zhang1@unisoc.com \
--cc=xingxing.luo@unisoc.com \
--cc=xinhu.wu@unisoc.com \
--cc=xinhuwu.unisoc@gmail.com \
--cc=zhang.lyra@gmail.com \
--cc=zhiyong.liu@unisoc.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;
as well as URLs for NNTP newsgroup(s).