Hi, On 5-Nov-24 9:51 AM, Andy Shevchenko wrote: > On Mon, Nov 4, 2024 at 10:36 PM Hans de Goede <hdegoede@xxxxxxxxxx> 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@xxxxxxxxxx> > > ... > > + 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