From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Sebastian Reichel" <sre@kernel.org>,
platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] platform/x86/intel: bytcrc_pwrsrc: Optionally register a power_supply dev
Date: Sat, 16 Nov 2024 11:19:39 +0100 [thread overview]
Message-ID: <63fb95b2-dab0-445f-a1cf-cf55a35be99e@redhat.com> (raw)
In-Reply-To: <CAHp75Vete6HoHRRef-n2VNTZOawwMeULqH_a-ZD-z-K1iJDiFw@mail.gmail.com>
Hi,
On 5-Nov-24 9:51 AM, Andy Shevchenko wrote:
> On Mon, Nov 4, 2024 at 10:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> On some Android tablets with Crystal Cove PMIC the DSDT lacks an ACPI AC
>> device to indicate whether a charger is plugged in or not.
>>
>> Add support for registering a "crystal_cove_pwrsrc" power_supply class
>> device to indicate charger online status. This is made conditional on
>> a "linux,register-pwrsrc-power_supply" boolean device-property to avoid
>> registering a duplicate power_supply class device on devices where this
>> is already handled by an ACPI AC device.
>>
>> Note the "linux,register-pwrsrc-power_supply" property is only used on
>> x86/ACPI (non devicetree) devs and the devicetree-bindings maintainers
>> have requested properties like these to not be added to the devicetree
>> bindings, so the new property is deliberately not added to any bindings.
>
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
>
> ...
>
> + array_size.h
>
>> +#include <linux/bits.h>
>> #include <linux/debugfs.h>
>> +#include <linux/interrupt.h>
>> #include <linux/mfd/intel_soc_pmic.h>
>> #include <linux/module.h>
>> #include <linux/platform_device.h>
>> +#include <linux/power_supply.h>
>> +#include <linux/property.h>
>> #include <linux/regmap.h>
>
> ...
>
>> + if (device_property_read_bool(pdev->dev.parent, "linux,register-pwrsrc-power_supply")) {
>
> Btw, is that property type of boolean? If not,
> device_property_present() has to be used.
Yes this is a boolean property, as for your other remarks I agree
and I'll address them for the upcoming v2.
Regards,
Hans
prev parent reply other threads:[~2024-11-16 10:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 20:35 [PATCH 1/2] platform/x86/intel: bytcrc_pwrsrc: Optionally register a power_supply dev Hans de Goede
2024-11-04 20:35 ` [PATCH 2/2] platform/x86: x86-android-tablets: Add Vexia EDU ATLA 10 EC battery driver Hans de Goede
2024-11-05 10:39 ` Andy Shevchenko
2024-11-13 18:39 ` Hans de Goede
2024-11-16 10:43 ` Hans de Goede
2024-11-05 8:51 ` [PATCH 1/2] platform/x86/intel: bytcrc_pwrsrc: Optionally register a power_supply dev Andy Shevchenko
2024-11-16 10:19 ` Hans de Goede [this message]
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=63fb95b2-dab0-445f-a1cf-cf55a35be99e@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--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).