All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhuyinbo <zhuyinbo@loongson.cn>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Marc Zyngier <maz@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
	Jianmin Lv <lvjianmin@loongson.cn>,
	wanghongliang@loongson.cn, Liu Peibao <liupeibao@loongson.cn>,
	loongson-kernel@lists.loongnix.cn, zhuyinbo@loongson.cn
Subject: Re: [PATCH v3 3/3] soc: loongson2_pm: add power management support
Date: Thu, 15 Jun 2023 19:15:31 +0800	[thread overview]
Message-ID: <9edfe58a-7901-c2d1-8e01-5f10b3a51287@loongson.cn> (raw)
In-Reply-To: <CAAhV-H4Z13wpOsj5GxkuwMK1D6N6=sArQ52yHjcdiEen=dUpjg@mail.gmail.com>



在 2023/6/15 下午6:00, Huacai Chen 写道:

>> +static void loongson2_pm_status_clear(void)
>> +{
>> +       u16 value;
>> +
>> +       value = loongson2_pm_readw(LOONGSON2_PM1_STS_REG);
>> +       value |= (LOONGSON2_PM1_PWRBTN_STS | LOONGSON2_PM1_PCIEXP_WAKE_STS |
>> +                 LOONGSON2_PM1_WAKE_STS);
>> +       loongson2_pm_writew(value, LOONGSON2_PM1_STS_REG);
>> +       loongson2_pm_writel(loongson2_pm_readl(LOONGSON2_GPE0_STS_REG),
>> +                           LOONGSON2_GPE0_STS_REG);
> Long-line warnings is removed in latest kernel, so you don't need to split here.


okay, I got it.

> 
>> +}
>> +
>> +static void loongson2_power_button_irq_enable(void)
> 
> Using loongson2_pm_irq_enable is a little better.


Indeed, this looks better!  I will use it.

...

>> +static int loongson2_suspend_valid_state(suspend_state_t state)
>> +{
>> +       if (state == PM_SUSPEND_MEM)
>> +               return 1;
>> +
>> +       return 0;
> "return (state == PM_SUSPEND_MEM)" is enough.


okay, I got it.


Thanks,
Yinbo


  reply	other threads:[~2023-06-15 11:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15  9:17 [PATCH v3 0/3] soc: loongson2_pm: add power management support Yinbo Zhu
2023-06-15  9:17 ` [PATCH v3 1/3] loongarch: export some arch-specific pm interfaces Yinbo Zhu
2023-06-16  4:04   ` Huacai Chen
2023-06-16  6:06     ` zhuyinbo
2023-06-15  9:17 ` [PATCH v3 2/3] soc: dt-bindings: add loongson-2 pm Yinbo Zhu
2023-06-16  6:58   ` Conor Dooley
2023-06-16  7:53     ` zhuyinbo
2023-06-16  8:03       ` Conor Dooley
2023-06-16  8:47         ` zhuyinbo
2023-06-16  8:03   ` Krzysztof Kozlowski
2023-06-16  8:51     ` zhuyinbo
2023-06-16 15:17   ` Rob Herring
2023-06-17  1:57     ` zhuyinbo
2023-06-15  9:37 ` [PATCH v3 3/3] soc: loongson2_pm: add power management support zhuyinbo
2023-06-15 10:00   ` Huacai Chen
2023-06-15 11:15     ` zhuyinbo [this message]
2023-06-16  1:45       ` zhuyinbo
2023-06-16  1:54         ` Huacai Chen
2023-06-16  4:01           ` zhuyinbo
2023-06-16  6:52   ` Conor Dooley
2023-06-16  7:08     ` zhuyinbo

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=9edfe58a-7901-c2d1-8e01-5f10b3a51287@loongson.cn \
    --to=zhuyinbo@loongson.cn \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@xen0n.name \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=liupeibao@loongson.cn \
    --cc=loongarch@lists.linux.dev \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=lvjianmin@loongson.cn \
    --cc=maz@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wanghongliang@loongson.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.