Thread (16 messages) 16 messages, 6 authors, 2014-12-08

Re: [PATCH 0/2] Qualcomm PM8941 power key driver

flat view

From: Ivan T. Ivanov <hidden>
Date: 2014-10-29 16:07:18
Also in: linux-arm-msm, linux-devicetree, lkml


Hi Bjorn,

On Fri, 2014-10-24 at 08:23 -0700, Bjorn Andersson wrote:
On Wed 08 Oct 02:50 PDT 2014, Ivan T. Ivanov wrote:
quoted
On Tue, 2014-10-07 at 11:46 -0700, Bjorn Andersson wrote:
quoted
On Tue 07 Oct 02:01 PDT 2014, Ivan T. Ivanov wrote:
quoted
Hi Bjorn,

On Mon, 2014-10-06 at 18:11 -0700, Bjorn Andersson wrote:
[..]
quoted
quoted
quoted
quoted
 create mode 100644 drivers/input/misc/pm8941-pwrkey.c
Any reason why we cannot reuse pm8xxx-pwrkey driver? It have been
converted to regmap already.
The boilerplate code is the same,
The boilerplate code is almost 100% :-)
quoted
 but configuration registers have different
layout and values written in them are different.
We talk about 3 registers and 2 bit defines. struct regmap_field
should be able to help here.
You're totally right, we could rewrite the driver to use regmap_field and make
the rest of the differences conditional. In my eyes we end up with two drivers
in one file - but it can be done.

A difference however is that in pm8941 the ps hold behavious (reboot vs power
off) is controlled by this same block. So I have an additional patch that adds
a restart handler here that sets the pmic in the right state before we pull
pshold (but I haven't been able to test it properly).

In pm8xxx this is handled in the pmic misc block and does not belong in this
driver.
Ok, Your plan is to bring up support for QPNP power-on PMIC sub function into this
driver. In this case, I agree, it will be cleaner to have separate driver for this.

Regards,
Ivan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help