From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: "Sebastian Reichel" <sre@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Konrad Dybcio" <konrad.dybcio@linaro.org>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, linux-usb@vger.kernel.org,
linux-arm-msm@vger.kernel.org, "Nikita Travkin" <nikita@trvn.ru>
Subject: Re: [PATCH v7 4/6] power: supply: lenovo_yoga_c630_battery: add Lenovo C630 driver
Date: Fri, 14 Jun 2024 12:55:48 +0300 (EEST) [thread overview]
Message-ID: <1f6ada87-ae52-dca8-96f2-0fe6f85a372a@linux.intel.com> (raw)
In-Reply-To: <20240614-yoga-ec-driver-v7-4-9f0b9b40ae76@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 2788 bytes --]
On Fri, 14 Jun 2024, Dmitry Baryshkov wrote:
> On the Lenovo Yoga C630 WOS laptop the EC provides access to the adapter
> and battery status. Add the driver to read power supply status on the
> laptop.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/power/supply/Kconfig | 9 +
> drivers/power/supply/Makefile | 1 +
> drivers/power/supply/lenovo_yoga_c630_battery.c | 500 ++++++++++++++++++++++++
> 3 files changed, 510 insertions(+)
>
> diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> index 3e31375491d5..55ab8e90747d 100644
> --- a/drivers/power/supply/Kconfig
> +++ b/drivers/power/supply/Kconfig
> @@ -167,6 +167,15 @@ config BATTERY_LEGO_EV3
> help
> Say Y here to enable support for the LEGO MINDSTORMS EV3 battery.
>
> +config BATTERY_LENOVO_YOGA_C630
> + tristate "Lenovo Yoga C630 battery"
> + depends on OF && EC_LENOVO_YOGA_C630
> + help
> + This driver enables battery support on the Lenovo Yoga C630 laptop.
> +
> + To compile the driver as a module, choose M here: the module will be
> + called lenovo_yoga_c630_battery.
> +
> config BATTERY_PMU
> tristate "Apple PMU battery"
> depends on PPC32 && ADB_PMU
> diff --git a/drivers/power/supply/Makefile b/drivers/power/supply/Makefile
> index 58b567278034..8ebbdcf92dac 100644
> --- a/drivers/power/supply/Makefile
> +++ b/drivers/power/supply/Makefile
> @@ -32,6 +32,7 @@ obj-$(CONFIG_BATTERY_DS2782) += ds2782_battery.o
> obj-$(CONFIG_BATTERY_GAUGE_LTC2941) += ltc2941-battery-gauge.o
> obj-$(CONFIG_BATTERY_GOLDFISH) += goldfish_battery.o
> obj-$(CONFIG_BATTERY_LEGO_EV3) += lego_ev3_battery.o
> +obj-$(CONFIG_BATTERY_LENOVO_YOGA_C630) += lenovo_yoga_c630_battery.o
> obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o
> obj-$(CONFIG_BATTERY_QCOM_BATTMGR) += qcom_battmgr.o
> obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o
> diff --git a/drivers/power/supply/lenovo_yoga_c630_battery.c b/drivers/power/supply/lenovo_yoga_c630_battery.c
> new file mode 100644
> index 000000000000..0209cdb5546f
> --- /dev/null
> +++ b/drivers/power/supply/lenovo_yoga_c630_battery.c
> @@ -0,0 +1,500 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2022-2024, Linaro Ltd
> + * Authors:
> + * Bjorn Andersson
> + * Dmitry Baryshkov
> + */
> +#include <linux/auxiliary_bus.h>
> +#include <linux/bits.h>
Add #include <linux/cleanup.h> for guard().
(I added it into patch 2/6 myself so you don't need to respin that
patch just because of it).
Once you've addressed the include and the note from Sebastian about
Kconfig dependencies, please add:
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2024-06-14 9:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 23:43 [PATCH v7 0/6] power: supply: Lenovo Yoga C630 EC Dmitry Baryshkov
2024-06-13 23:43 ` [PATCH v7 1/6] dt-bindings: platform: Add " Dmitry Baryshkov
2024-06-13 23:43 ` [PATCH v7 2/6] platform: arm64: add Lenovo Yoga C630 WOS EC driver Dmitry Baryshkov
2024-06-13 23:43 ` [PATCH v7 3/6] usb: typec: ucsi: add Lenovo Yoga C630 glue driver Dmitry Baryshkov
2024-06-14 9:56 ` Ilpo Järvinen
2024-06-13 23:43 ` [PATCH v7 4/6] power: supply: lenovo_yoga_c630_battery: add Lenovo C630 driver Dmitry Baryshkov
2024-06-14 9:55 ` Ilpo Järvinen [this message]
2024-06-13 23:43 ` [PATCH v7 5/6] arm64: dts: qcom: sdm845: describe connections of USB/DP port Dmitry Baryshkov
2024-06-13 23:43 ` [PATCH v7 6/6] arm64: dts: qcom: c630: Add Embedded Controller node Dmitry Baryshkov
2024-06-18 11:56 ` Konrad Dybcio
2024-06-14 9:49 ` [PATCH v7 0/6] power: supply: Lenovo Yoga C630 EC Ilpo Järvinen
2024-06-21 6:11 ` (subset) " Bjorn Andersson
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=1f6ada87-ae52-dca8-96f2-0fe6f85a372a@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nikita@trvn.ru \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@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).