All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Bjorn Andersson" <quic_bjorande@quicinc.com>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Udit Kumar" <u-kumar1@ti.com>, "Peng Fan" <peng.fan@nxp.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Prabhakar Mahadev Lad" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"biju.das.au" <biju.das.au@gmail.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig
Date: Mon, 11 Dec 2023 09:00:57 +0000	[thread overview]
Message-ID: <TYCPR01MB11269FF61142A63ED67F32647868FA@TYCPR01MB11269.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdUswKrzqgumyoJ3RYWEAUR9WOBzc12dVcCB1s79E-AMRw@mail.gmail.com>

Hi Geert,

> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: Monday, December 11, 2023 8:53 AM
> Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig
> 
> Hi Biju,
> 
> On Mon, Dec 11, 2023 at 9:32 AM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > > -----Original Message-----
> > > From: Geert Uytterhoeven <geert@linux-m68k.org>
> > > Sent: Monday, December 11, 2023 8:20 AM
> > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062
> > > defconfig
> > >
> > > On Sun, Dec 10, 2023 at 10:50 AM Biju Das
> > > <biju.das.jz@bp.renesas.com>
> > > wrote:
> > > > > -----Original Message-----
> > > > > From: Geert Uytterhoeven <geert@linux-m68k.org>
> > > > > Sent: Friday, December 1, 2023 3:42 PM
> > > > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062
> > > > > defconfig
> > > > >
> > > > > On Fri, Dec 1, 2023 at 4:02 PM Biju Das
> > > > > <biju.das.jz@bp.renesas.com>
> > > > > wrote:
> > > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Fri, Dec
> > > > > > > 1,
> > > > > > > 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com>
> > > > > > > wrote:
> > > > > > > > Enable the config for the Renesas DA9062 PMIC and RTC, as
> > > > > > > > it is populated on RZ/G2UL SMARC EVK.
> > > > > > > >
> > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > > > >
> > > > > > > Thanks for your patch!
> > > > > > >
> > > > > > > LGTM, but I would have expected (at least)
> > > > > > >
> > > > > > >     CONFIG_INPUT_DA9063_ONKEY=m
> > > > > > >
> > > > > > > too, cfr. my comments on patch 5/6.
> > > > > >
> > > > > > I have tested this, but I get "da9063-onkey da9062-onkey:
> > > > > > error -
> > > ENXIO:
> > > > > IRQ ONKEY not found"
> > > > > > So, I won't be able to test onkey events. So plaaning to
> > > > > > disable this
> > > > > node.
> > > > >
> > > > > Indeed, currently drivers/input/misc/da9063_onkey.c requires an
> > > > > interrupt to function.  I wonder if it can be made to work using
> > > > > a timer and pure polling...
> > > >
> > > > Yes, that is possible by either adding a debugfs to enable polling
> > > > for
> > > testing.
> > > >
> > > > Or
> > > >
> > > > a device tree property for adding poll delay, so that one can have
> > > polling support to test onkey driver.
> > >
> > > I would go for the latter, cfr. poll-interval in
> > > Documentation/devicetree/bindings/input/gpio-keys.yaml.
> > >
> > > > Basically, on a production system we should avoid polling as it
> > > unnecessarily wakeup the system.
> > >
> > > Wouldn't polling (by Linux) only happen when the system is already
> awake?
> >
> > IIUC, That is an overhead. If there is no load, system goes to suspend
> > mode and the timer for the polling (SCAN keys) will wakeup the system
> > and same process repeats. If we have a PMIC IRQ, this won't happen.
> 
> Ah, you mean idle. Yes, that does incur a (small) overhead (I guess there
> are other timers running, too).

Yes.

> I don't think any timer runs when the system is suspended.

I guess, If we are controlling PM through CPU idle states, this will have an effect.
We schedule timers for poll intervals from onkey driver, when it expires it will wakeup the system
and again based on idle state, it enters into some retention state and goes on.


Cheers,
BIju


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Bjorn Andersson" <quic_bjorande@quicinc.com>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Udit Kumar" <u-kumar1@ti.com>, "Peng Fan" <peng.fan@nxp.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Prabhakar Mahadev Lad" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"biju.das.au" <biju.das.au@gmail.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig
Date: Mon, 11 Dec 2023 09:00:57 +0000	[thread overview]
Message-ID: <TYCPR01MB11269FF61142A63ED67F32647868FA@TYCPR01MB11269.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdUswKrzqgumyoJ3RYWEAUR9WOBzc12dVcCB1s79E-AMRw@mail.gmail.com>

Hi Geert,

> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: Monday, December 11, 2023 8:53 AM
> Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig
> 
> Hi Biju,
> 
> On Mon, Dec 11, 2023 at 9:32 AM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > > -----Original Message-----
> > > From: Geert Uytterhoeven <geert@linux-m68k.org>
> > > Sent: Monday, December 11, 2023 8:20 AM
> > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062
> > > defconfig
> > >
> > > On Sun, Dec 10, 2023 at 10:50 AM Biju Das
> > > <biju.das.jz@bp.renesas.com>
> > > wrote:
> > > > > -----Original Message-----
> > > > > From: Geert Uytterhoeven <geert@linux-m68k.org>
> > > > > Sent: Friday, December 1, 2023 3:42 PM
> > > > > Subject: Re: [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062
> > > > > defconfig
> > > > >
> > > > > On Fri, Dec 1, 2023 at 4:02 PM Biju Das
> > > > > <biju.das.jz@bp.renesas.com>
> > > > > wrote:
> > > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Fri, Dec
> > > > > > > 1,
> > > > > > > 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com>
> > > > > > > wrote:
> > > > > > > > Enable the config for the Renesas DA9062 PMIC and RTC, as
> > > > > > > > it is populated on RZ/G2UL SMARC EVK.
> > > > > > > >
> > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > > > >
> > > > > > > Thanks for your patch!
> > > > > > >
> > > > > > > LGTM, but I would have expected (at least)
> > > > > > >
> > > > > > >     CONFIG_INPUT_DA9063_ONKEY=m
> > > > > > >
> > > > > > > too, cfr. my comments on patch 5/6.
> > > > > >
> > > > > > I have tested this, but I get "da9063-onkey da9062-onkey:
> > > > > > error -
> > > ENXIO:
> > > > > IRQ ONKEY not found"
> > > > > > So, I won't be able to test onkey events. So plaaning to
> > > > > > disable this
> > > > > node.
> > > > >
> > > > > Indeed, currently drivers/input/misc/da9063_onkey.c requires an
> > > > > interrupt to function.  I wonder if it can be made to work using
> > > > > a timer and pure polling...
> > > >
> > > > Yes, that is possible by either adding a debugfs to enable polling
> > > > for
> > > testing.
> > > >
> > > > Or
> > > >
> > > > a device tree property for adding poll delay, so that one can have
> > > polling support to test onkey driver.
> > >
> > > I would go for the latter, cfr. poll-interval in
> > > Documentation/devicetree/bindings/input/gpio-keys.yaml.
> > >
> > > > Basically, on a production system we should avoid polling as it
> > > unnecessarily wakeup the system.
> > >
> > > Wouldn't polling (by Linux) only happen when the system is already
> awake?
> >
> > IIUC, That is an overhead. If there is no load, system goes to suspend
> > mode and the timer for the polling (SCAN keys) will wakeup the system
> > and same process repeats. If we have a PMIC IRQ, this won't happen.
> 
> Ah, you mean idle. Yes, that does incur a (small) overhead (I guess there
> are other timers running, too).

Yes.

> I don't think any timer runs when the system is suspended.

I guess, If we are controlling PM through CPU idle states, this will have an effect.
We schedule timers for poll intervals from onkey driver, when it expires it will wakeup the system
and again based on idle state, it enters into some retention state and goes on.


Cheers,
BIju



  reply	other threads:[~2023-12-11  9:01 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01 11:08 [PATCH 0/6] Add DA9062 PMIC and built-in RTC support for RZ/G2UL SMARC EVK Biju Das
2023-12-01 11:08 ` Biju Das
2023-12-01 11:08 ` [PATCH 1/6] rtc: da9063: Make IRQ as optional Biju Das
2023-12-01 13:00   ` Geert Uytterhoeven
2023-12-01 13:23     ` Biju Das
2023-12-01 11:08 ` [PATCH 2/6] rtc: da9063: Use device_get_match_data() Biju Das
2023-12-01 13:06   ` Geert Uytterhoeven
2023-12-01 11:08 ` [PATCH 3/6] rtc: da9063: Use dev_err_probe() Biju Das
2023-12-01 13:11   ` Geert Uytterhoeven
2023-12-01 13:30     ` Biju Das
2023-12-01 15:20       ` Alexandre Belloni
2023-12-01 15:43         ` Biju Das
2023-12-01 15:55           ` Alexandre Belloni
2023-12-01 16:40             ` Biju Das
2023-12-19 23:49               ` Alexandre Belloni
2023-12-19 23:56                 ` Alexandre Belloni
2024-01-04 19:31                 ` Biju Das
2023-12-01 11:08 ` [PATCH 4/6] dt-bindings: mfd: Convert da9062 to json-schema Biju Das
2023-12-01 13:33   ` Geert Uytterhoeven
2023-12-01 15:54     ` Conor Dooley
2023-12-06  5:15   ` kernel test robot
2023-12-06  9:33     ` Biju Das
2023-12-06 13:28       ` Lee Jones
2023-12-06 15:19         ` Biju Das
2023-12-08  2:21           ` Liu, Yujie
2023-12-01 11:08 ` [PATCH 5/6] arm64: dts: renesas: rzg2ul-smarc: Enable PMIC and built-in RTC Biju Das
2023-12-01 13:39   ` Geert Uytterhoeven
2023-12-01 13:48     ` Biju Das
2023-12-01 13:58       ` Geert Uytterhoeven
2023-12-01 11:08 ` [PATCH 6/6] arm64: defconfig: Enable Renesas DA9062 defconfig Biju Das
2023-12-01 11:08   ` Biju Das
2023-12-01 13:41   ` Geert Uytterhoeven
2023-12-01 13:41     ` Geert Uytterhoeven
2023-12-01 15:02     ` Biju Das
2023-12-01 15:02       ` Biju Das
2023-12-01 15:41       ` Geert Uytterhoeven
2023-12-01 15:41         ` Geert Uytterhoeven
2023-12-10  9:49         ` Biju Das
2023-12-10  9:49           ` Biju Das
2023-12-11  8:20           ` Geert Uytterhoeven
2023-12-11  8:20             ` Geert Uytterhoeven
2023-12-11  8:32             ` Biju Das
2023-12-11  8:32               ` Biju Das
2023-12-11  8:52               ` Geert Uytterhoeven
2023-12-11  8:52                 ` Geert Uytterhoeven
2023-12-11  9:00                 ` Biju Das [this message]
2023-12-11  9:00                   ` Biju Das

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=TYCPR01MB11269FF61142A63ED67F32647868FA@TYCPR01MB11269.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=arnd@arndb.de \
    --cc=biju.das.au@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=neil.armstrong@linaro.org \
    --cc=nfraprado@collabora.com \
    --cc=peng.fan@nxp.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=quic_bjorande@quicinc.com \
    --cc=u-kumar1@ti.com \
    --cc=will@kernel.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 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.