public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linhua Xu <Linhua.xu@unisoc.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	lh xu <xulh0829@gmail.com>, Zhirong Qiu <zhirong.qiu@unisoc.com>,
	Xiongpeng Wu <xiongpeng.wu@unisoc.com>
Subject: Re: [PATCH V3 1/6] pinctrl: sprd: Modify pull-up parameters
Date: Fri, 27 Oct 2023 14:29:24 +0300	[thread overview]
Message-ID: <ZTufFGSJM+041nO6@smile.fi.intel.com> (raw)
In-Reply-To: <20231027071426.17724-2-Linhua.xu@unisoc.com>

On Fri, Oct 27, 2023 at 03:14:21PM +0800, Linhua Xu wrote:
> From: Linhua Xu <Linhua.Xu@unisoc.com>
> 
> For UNISOC pin controller, there are three different configurations of
> pull-up drive current. Modify the 20K pull-up resistor configuration and
> add the 1.8K pull-up resistor configuration.

> Fixes:<1fb4b907e808> ("pinctrl: sprd: Add Spreadtrum pin control driver")
> 
> Signed-off-by: Linhua Xu <Linhua.Xu@unisoc.com>

I guess I already pointed out that there must not be blank lines in the tag
block, besides that read "Submitting Patches" document to see how properly
format the Fixes: tag.

...

> -#define PULL_UP_4_7K			(BIT(12) | BIT(7))
> +#define PULL_UP_1_8K			(BIT(12) | BIT(7))
> +#define PULL_UP_4_7K			BIT(12)
>  #define PULL_UP_20K			BIT(7)

>  #define PULL_UP_MASK			0x21
>  #define PULL_UP_SHIFT			7

Basically these two repeat the above 1.8K case.
But I see that you try to take care in the next patch about them.
Still, the better is to use those _MASKs and _SHIFTs in the code.
See below.

...

>  			if ((reg & (SLEEP_PULL_DOWN | SLEEP_PULL_UP)) ||
> -			    (reg & (PULL_DOWN | PULL_UP_4_7K | PULL_UP_20K)))
> +			    (reg & (PULL_DOWN | PULL_UP_4_7K | PULL_UP_20K | PULL_UP_1_8K)))

			if ((reg & (SLEEP_PULL_DOWN | SLEEP_PULL_UP)) ||
			    (reg & (PULL_DOWN | (PULL_UP_MASK << PULL_UP_SHIFT))))

>  				return -EINVAL;

...

>  					mask = PULL_DOWN | PULL_UP_20K |
> -						PULL_UP_4_7K;
> +						PULL_UP_4_7K | PULL_UP_1_8K;

					mask = PULL_DOWN | (PULL_UP_MASK << PULL_UP_SHIFT);

Ditto.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-10-27 11:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27  7:14 [PATCH V3 0/6] pinctrl: sprd: Modification of UNIOC Platform pinctrl Driver Linhua Xu
2023-10-27  7:14 ` [PATCH V3 1/6] pinctrl: sprd: Modify pull-up parameters Linhua Xu
2023-10-27 11:29   ` Andy Shevchenko [this message]
2023-10-27  7:14 ` [PATCH V3 2/6] pinctrl: sprd: Fix the incorrect mask and shift definition Linhua Xu
2023-10-27 11:32   ` Andy Shevchenko
2023-10-27  7:14 ` [PATCH V3 3/6] pinctrl: sprd: Move common and misc offset parameters to private data Linhua Xu
2023-10-27 11:24   ` Andy Shevchenko
2023-10-27  7:14 ` [PATCH V3 4/6] pinctrl: sprd: Increase the range of register values Linhua Xu
2023-10-27 11:39   ` kernel test robot
2023-10-27  7:14 ` [PATCH V3 5/6] pinctrl: sprd: Add pinctrl support for UMS512 Linhua Xu
2023-10-27 11:40   ` Andy Shevchenko
2023-10-27  7:14 ` [PATCH V3 6/6] pinctrl: sprd: Add pinctrl support for UMS9621 Linhua Xu
2023-10-27 11:42   ` Andy Shevchenko

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=ZTufFGSJM+041nO6@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Linhua.xu@unisoc.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=xiongpeng.wu@unisoc.com \
    --cc=xulh0829@gmail.com \
    --cc=zhang.lyra@gmail.com \
    --cc=zhirong.qiu@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