From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Mark Gross <markgross@kernel.org>,
Andy Shevchenko <andy@infradead.org>,
Sebastian Reichel <sre@kernel.org>, Len Brown <lenb@kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Yauhen Kharuzhy <jekhor@gmail.com>,
Tsuchiya Yuto <kitakar@gmail.com>,
Platform Driver <platform-driver-x86@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [RFC v2 0/2] ACPI/power-suppy add fuel-gauge support on cht-wc PMIC without USB-PD support devs
Date: Wed, 3 Nov 2021 11:18:31 +0200 [thread overview]
Message-ID: <CAHp75VdoYO7DCWGHadgto3Aay836z1A7g4LHT7RNLF4kgAa_Pg@mail.gmail.com> (raw)
In-Reply-To: <20211102223959.3873-1-hdegoede@redhat.com>
On Wed, Nov 3, 2021 at 12:40 AM Hans de Goede <hdegoede@redhat.com> wrote:
...
> While working on this I realized that there also is a 4th option,
> which is basically option 1 from the v1 RFC minus the 2 gpiolib-acpi
> patches.
>
> With the 2nd option (as implemented by this RFC) we leave the
> _AEI handler in place and run the fuel-gauge without interrupt,
> we can do the same when marking the fuel-gauge as always present
> by treating IRQs on ACPI devices the same way as in the
> max17042_battery code, which has already solved the IRQ problem
> without disabling the _AEI handler:
>
> /*
> * On ACPI systems the IRQ may be handled by ACPI-event code,
> * so we need to share (if the ACPI code is willing to share).
> */
> if (acpi_id)
(Side remark: wouldn't it be better to have has_acpi_companion() and
use device_get_match_data()?)
> flags |= IRQF_SHARED | IRQF_PROBE_SHARED;
>
> This is a pretty decent option too, it requires:
>
> 1. 2 more always_present quirks in the ACPI scan code which is part of
> the main kernel image.
>
> 2. Patches to the bq27xxx_battery code to support ACPI enumeration.
If it works, why not try it?
I like the common base for the FG drivers that can be used as a pattern then.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-11-03 9:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 22:39 [RFC v2 0/2] ACPI/power-suppy add fuel-gauge support on cht-wc PMIC without USB-PD support devs Hans de Goede
2021-11-02 22:39 ` [RFC v2 1/2] ACPI / x86: Add PWM2 on the Xiaomi Mi Pad 2 to the always_present list Hans de Goede
2021-11-03 18:21 ` Rafael J. Wysocki
2021-11-02 22:39 ` [RFC v2 2/2] platform/x86: xiaomi-mipad2: New driver for Xiaomi Mi Pad 2 tablets Hans de Goede
2021-11-03 9:18 ` Andy Shevchenko [this message]
2021-11-03 13:24 ` [RFC v2 0/2] ACPI/power-suppy add fuel-gauge support on cht-wc PMIC without USB-PD support devs Hans de Goede
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=CAHp75VdoYO7DCWGHadgto3Aay836z1A7g4LHT7RNLF4kgAa_Pg@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=andy@infradead.org \
--cc=hdegoede@redhat.com \
--cc=jekhor@gmail.com \
--cc=kitakar@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sre@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).