Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1666854

Re: [PATCH 2/2] Input: pm8941-pwrkey: Introduce reboot mode support

From Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] Input: pm8941-pwrkey: Introduce reboot mode support
Date 2017-06-15 18:30 +0200
Message-ID <tSFOG-4JC-21@gated-at.bofh.it> (permalink)
References (1 earlier) <tLDRD-8cl-3@gated-at.bofh.it> <tMFy2-12b-5@gated-at.bofh.it> <tMHgt-2mn-7@gated-at.bofh.it> <tQ8Dw-6E7-23@gated-at.bofh.it> <tRH69-kl-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

On Mon, Jun 12, 2017 at 04:32:03PM -0700, Bjorn Andersson wrote:
> On Thu 08 Jun 09:32 PDT 2017, Sebastian Reichel wrote:
> 
> > Hi,
> > 
> > On Mon, May 29, 2017 at 09:47:11PM -0700, Bjorn Andersson wrote:
> > > On Mon 29 May 19:53 PDT 2017, Dmitry Torokhov wrote:
> > > 
> > > > On Fri, May 26, 2017 at 11:51:30PM -0700, Bjorn Andersson wrote:
> > > > > In some Qualcomm platforms the magic for informing LK which mode to
> > > > > reboot into is stored in the PON_SOFT_RB_SPARE register. Register with
> > > > > the reboot mode helpers to expose this to the user.
> > > > 
> > > > Hmm, is the power key driver the best place to have this? WHy isn't this
> > > > a driver in its own right?
> > > > 
> > > 
> > > The functionality is part of the "PON" block in the Qualcomm PMICs,
> > > other functionality from this block relates to configuration and
> > > handling related to power-key and reset-key.
> > > 
> > > Several of these properties are intermingled, so I do believe it's best
> > > to handle them in a single driver; that said, it might no longer be
> > > correct to name the driver "pwrkey" or that it is a "misc input" driver.
> > 
> > I merged patch 1 and provided an immutable branch, so
> > that this could go through the input subsystem.
> > 
> 
> Thanks
> 
> > To me it doesn't look that intermingled, though. I think
> > the reboot and reboot-mode parts could go into their own
> > driver in drivers/power/reset.
> > 
> 
> I did reach out to Rob regarding this and the single hardware block
> should be described by a single node in DeviceTree.
> 
> As such if we split the non-input related handling into another driver
> we would need to make the input driver create a subdevice during probe -
> or create a new pon-driver with a new compatible that internally spawns
> the pwrkey driver. Neither seems desirable to me...

The pon-driver would have been the proper solution, but with the
binding already being defined that's no longer a nice option :(

> The features of the PON block not yet shown on LKML are status registers
> to indicate the reason for powering up the PMIC and a watchdog (which I
> don't believe is used or exposed today).

So we have a block, which has watchdog, powerdown, reboot, boot-reason,
reboot-mode and power key. To me that does not look like it should be
one driver.

-- Sebastian

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2/2] Input: pm8941-pwrkey: Introduce reboot mode support Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-06-08 18:40 +0200
  Re: [PATCH 2/2] Input: pm8941-pwrkey: Introduce reboot mode support Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-06-13 01:40 +0200
    Re: [PATCH 2/2] Input: pm8941-pwrkey: Introduce reboot mode support Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-06-15 18:30 +0200
      Re: [PATCH 2/2] Input: pm8941-pwrkey: Introduce reboot mode support Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-06-15 20:40 +0200
        Re: [PATCH 2/2] Input: pm8941-pwrkey: Introduce reboot mode support Rob Herring <robh@kernel.org> - 2017-06-15 23:40 +0200

csiph-web