From: kernel test robot <lkp@intel.com>
To: Jianqun Xu <jay.xu@rock-chips.com>,
lgirdwood@gmail.com, broonie@kernel.org, ulf.hansson@linaro.org,
lee.jones@linaro.org, zhangchangzhong@huawei.com,
heiko@sntech.de
Cc: kbuild-all@lists.01.org, linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org, Jianqun Xu <jay.xu@rock-chips.com>
Subject: Re: [PATCH v3] soc: rockchip: io-domain: set 3.3V before regulator disable
Date: Wed, 18 Aug 2021 13:56:04 +0800 [thread overview]
Message-ID: <202108181313.hRjOhnHL-lkp@intel.com> (raw)
In-Reply-To: <20210818010956.1446770-1-jay.xu@rock-chips.com>
[-- Attachment #1: Type: text/plain, Size: 4542 bytes --]
Hi Jianqun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rockchip/for-next]
[also build test ERROR on asoc/for-next v5.14-rc6 next-20210817]
[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/Jianqun-Xu/soc-rockchip-io-domain-set-3-3V-before-regulator-disable/20210818-091213
base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/883d33a4052a54385679fe84a17345d7083f3a76
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jianqun-Xu/soc-rockchip-io-domain-set-3-3V-before-regulator-disable/20210818-091213
git checkout 883d33a4052a54385679fe84a17345d7083f3a76
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
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/soc/rockchip/io-domain.c: In function 'rockchip_iodomain_notify':
>> drivers/soc/rockchip/io-domain.c:173:28: error: 'REGULATOR_EVENT_PRE_ENABLE' undeclared (first use in this function); did you mean 'REGULATOR_EVENT_PRE_DISABLE'?
173 | } else if (event & REGULATOR_EVENT_PRE_ENABLE) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| REGULATOR_EVENT_PRE_DISABLE
drivers/soc/rockchip/io-domain.c:173:28: note: each undeclared identifier is reported only once for each function it appears in
vim +173 drivers/soc/rockchip/io-domain.c
143
144 static int rockchip_iodomain_notify(struct notifier_block *nb,
145 unsigned long event,
146 void *data)
147 {
148 struct rockchip_iodomain_supply *supply =
149 container_of(nb, struct rockchip_iodomain_supply, nb);
150 int uV;
151 int ret;
152
153 /*
154 * According to Rockchip it's important to keep the SoC IO domain
155 * higher than (or equal to) the external voltage. That means we need
156 * to change it before external voltage changes happen in the case
157 * of an increase.
158 *
159 * Note that in the "pre" change we pick the max possible voltage that
160 * the regulator might end up at (the client requests a range and we
161 * don't know for certain the exact voltage). Right now we rely on the
162 * slop in MAX_VOLTAGE_1_8 and MAX_VOLTAGE_3_3 to save us if clients
163 * request something like a max of 3.6V when they really want 3.3V.
164 * We could attempt to come up with better rules if this fails.
165 */
166 if (event & REGULATOR_EVENT_PRE_VOLTAGE_CHANGE) {
167 struct pre_voltage_change_data *pvc_data = data;
168
169 uV = max_t(unsigned long, pvc_data->old_uV, pvc_data->max_uV);
170 } else if (event & (REGULATOR_EVENT_VOLTAGE_CHANGE |
171 REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE)) {
172 uV = (unsigned long)data;
> 173 } else if (event & REGULATOR_EVENT_PRE_ENABLE) {
174 uV = MAX_VOLTAGE_3_3;
175 } else if (event & REGULATOR_EVENT_PRE_DISABLE) {
176 uV = MAX_VOLTAGE_3_3;
177 } else if (event & REGULATOR_EVENT_ENABLE) {
178 uV = regulator_get_voltage(supply->reg);
179 } else {
180 return NOTIFY_OK;
181 }
182
183 dev_dbg(supply->iod->dev, "Setting to %d\n", uV);
184
185 if (uV > MAX_VOLTAGE_3_3) {
186 dev_err(supply->iod->dev, "Voltage too high: %d\n", uV);
187
188 if (event == REGULATOR_EVENT_PRE_VOLTAGE_CHANGE)
189 return NOTIFY_BAD;
190 }
191
192 ret = supply->iod->write(supply, uV);
193 if (ret && event == REGULATOR_EVENT_PRE_VOLTAGE_CHANGE)
194 return NOTIFY_BAD;
195
196 dev_dbg(supply->iod->dev, "Setting to %d done\n", uV);
197 return NOTIFY_OK;
198 }
199
---
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: 54371 bytes --]
next prev parent reply other threads:[~2021-08-18 5:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 1:09 [PATCH v3] soc: rockchip: io-domain: set 3.3V before regulator disable Jianqun Xu
2021-08-18 5:11 ` kernel test robot
2021-08-18 5:56 ` kernel test robot [this message]
2021-08-18 12:27 ` Mark Brown
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=202108181313.hRjOhnHL-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=jay.xu@rock-chips.com \
--cc=kbuild-all@lists.01.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=ulf.hansson@linaro.org \
--cc=zhangchangzhong@huawei.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