[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <iefpe3vjf6u43yph2jqhd2pp6dhzk5kzseo2cffv5ksoyqk22c@2plv7xxped67>
Date: Thu, 6 Jun 2024 01:52:31 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Bjorn Andersson <andersson@...nel.org>, Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>, Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>, linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org, linux-usb@...r.kernel.org,
linux-arm-msm@...r.kernel.org, Nikita Travkin <nikita@...n.ru>
Subject: Re: [PATCH v4 4/6] power: supply: lenovo_yoga_c630_battery: add
Lenovo C630 driver
Hi,
Thanks for your patch. I have a few more comments.
On Tue, May 28, 2024 at 11:44:49PM +0300, Dmitry Baryshkov wrote:
...
> +struct yoga_c630_psy {
> + struct yoga_c630_ec *ec;
> + struct device *dev;
> + struct device_node *of_node;
Please use fwnode
> +static enum power_supply_property yoga_c630_psy_bat_mA_properties[] = {
> + POWER_SUPPLY_PROP_STATUS,
> + POWER_SUPPLY_PROP_PRESENT,
> + POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
> + POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
> + POWER_SUPPLY_PROP_CHARGE_FULL,
> + POWER_SUPPLY_PROP_CHARGE_NOW,
> + POWER_SUPPLY_PROP_CURRENT_NOW,
> + POWER_SUPPLY_PROP_POWER_NOW,
> + POWER_SUPPLY_PROP_VOLTAGE_NOW,
> + POWER_SUPPLY_PROP_TECHNOLOGY,
> + POWER_SUPPLY_PROP_MODEL_NAME,
> + POWER_SUPPLY_PROP_MANUFACTURER,
> +};
> +
> +static enum power_supply_property yoga_c630_psy_bat_mWh_properties[] = {
> + POWER_SUPPLY_PROP_STATUS,
> + POWER_SUPPLY_PROP_PRESENT,
> + POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
> + POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
> + POWER_SUPPLY_PROP_ENERGY_FULL,
> + POWER_SUPPLY_PROP_ENERGY_NOW,
> + POWER_SUPPLY_PROP_CURRENT_NOW,
> + POWER_SUPPLY_PROP_POWER_NOW,
> + POWER_SUPPLY_PROP_VOLTAGE_NOW,
> + POWER_SUPPLY_PROP_TECHNOLOGY,
> + POWER_SUPPLY_PROP_MODEL_NAME,
> + POWER_SUPPLY_PROP_MANUFACTURER,
> +};
Please also add
POWER_SUPPLY_PROP_SCOPE = POWER_SUPPLY_SCOPE_SYSTEM
> +static enum power_supply_property yoga_c630_psy_adpt_properties[] = {
> + POWER_SUPPLY_PROP_ONLINE,
> +};
Please also add
POWER_SUPPLY_PROP_USB_TYPE = POWER_SUPPLY_USB_TYPE_C
> +static const struct power_supply_desc yoga_c630_psy_adpt_psy_desc = {
> + .name = "yoga-c630-adapter",
> + .type = POWER_SUPPLY_TYPE_USB_TYPE_C,
static const enum power_supply_usb_type yoga_c630_psy_adpt_usb_type[] = {
POWER_SUPPLY_USB_TYPE_C,
};
.type = POWER_SUPPLY_TYPE_USB
.usb_types = yoga_c630_psy_adpt_usb_type
.num_usb_types = ARRAY_SIZE(yoga_c630_psy_adpt_usb_type),
> + .properties = yoga_c630_psy_adpt_properties,
> + .num_properties = ARRAY_SIZE(yoga_c630_psy_adpt_properties),
> + .get_property = yoga_c630_psy_adpt_get_property,
> +};
> +
Greetings,
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists