All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Arınç ÜNAL" <arinc.unal@arinc9.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: linux-input@vger.kernel.org,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-mediatek@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Frank Wunderlich <frank-w@public-files.de>,
	erkin.bozoglu@xeront.com
Subject: mtk-pmic-keys: Ignore power button if pressed before driver loads
Date: Mon, 30 Jan 2023 16:36:23 +0300	[thread overview]
Message-ID: <883798d8-f7d9-eadc-1343-7d241741ff67@arinc9.com> (raw)

Hi all,

The power button on my Bananapi BPI-R2 (MT7623NI SoC, mt6323-keys) is 
shorted, so the device automatically boots when there's power. This 
causes the device to reboot when KEYBOARD_MTK_PMIC is loaded because the 
driver sees the power button being pressed.

I was wondering if it's possible to change the driver in a way that 
doesn't break in this situation. Maybe don't do anything if the first 
state of the the power button the driver sees is being pressed, and if 
the state doesn't change.

To address an edge case, if the power button was being pressed before 
the driver loads, look for if it's ever released. Only after then start 
working as usual.

Looking forward to hearing your thoughts.
Arınç

WARNING: multiple messages have this Message-ID (diff)
From: "Arınç ÜNAL" <arinc.unal@arinc9.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	linux-input@vger.kernel.org, erkin.bozoglu@xeront.com,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: mtk-pmic-keys: Ignore power button if pressed before driver loads
Date: Mon, 30 Jan 2023 16:36:23 +0300	[thread overview]
Message-ID: <883798d8-f7d9-eadc-1343-7d241741ff67@arinc9.com> (raw)

Hi all,

The power button on my Bananapi BPI-R2 (MT7623NI SoC, mt6323-keys) is 
shorted, so the device automatically boots when there's power. This 
causes the device to reboot when KEYBOARD_MTK_PMIC is loaded because the 
driver sees the power button being pressed.

I was wondering if it's possible to change the driver in a way that 
doesn't break in this situation. Maybe don't do anything if the first 
state of the the power button the driver sees is being pressed, and if 
the state doesn't change.

To address an edge case, if the power button was being pressed before 
the driver loads, look for if it's ever released. Only after then start 
working as usual.

Looking forward to hearing your thoughts.
Arınç


WARNING: multiple messages have this Message-ID (diff)
From: "Arınç ÜNAL" <arinc.unal@arinc9.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: linux-input@vger.kernel.org,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Frank Wunderlich <frank-w@public-files.de>,
	erkin.bozoglu@xeront.com
Subject: mtk-pmic-keys: Ignore power button if pressed before driver loads
Date: Mon, 30 Jan 2023 16:36:23 +0300	[thread overview]
Message-ID: <883798d8-f7d9-eadc-1343-7d241741ff67@arinc9.com> (raw)

Hi all,

The power button on my Bananapi BPI-R2 (MT7623NI SoC, mt6323-keys) is 
shorted, so the device automatically boots when there's power. This 
causes the device to reboot when KEYBOARD_MTK_PMIC is loaded because the 
driver sees the power button being pressed.

I was wondering if it's possible to change the driver in a way that 
doesn't break in this situation. Maybe don't do anything if the first 
state of the the power button the driver sees is being pressed, and if 
the state doesn't change.

To address an edge case, if the power button was being pressed before 
the driver loads, look for if it's ever released. Only after then start 
working as usual.

Looking forward to hearing your thoughts.
Arınç

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

             reply	other threads:[~2023-01-30 13:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 13:36 Arınç ÜNAL [this message]
2023-01-30 13:36 ` mtk-pmic-keys: Ignore power button if pressed before driver loads Arınç ÜNAL
2023-01-30 13:36 ` Arınç ÜNAL
2023-01-30 17:21 ` Mattijs Korpershoek
2023-01-30 17:21   ` Mattijs Korpershoek
2023-01-30 17:21   ` Mattijs Korpershoek
2023-02-12 11:29   ` Arınç ÜNAL
2023-02-12 11:29     ` Arınç ÜNAL
2023-02-12 11:29     ` Arınç ÜNAL

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=883798d8-f7d9-eadc-1343-7d241741ff67@arinc9.com \
    --to=arinc.unal@arinc9.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=erkin.bozoglu@xeront.com \
    --cc=frank-w@public-files.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mkorpershoek@baylibre.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 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.