From: Andreas Kemnade <andreas@kemnade.info>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: tony@atomide.com, Sebastian Reichel <sre@kernel.org>,
linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
linux-kernel@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 3/3] power: supply: initial support for TWL6030/32
Date: Mon, 23 Sep 2024 18:29:48 +0200 [thread overview]
Message-ID: <20240923182948.571eaa59@akair> (raw)
In-Reply-To: <89a7e86b-8866-4148-9f9e-13ca84c1aede@kernel.org>
Am Wed, 18 Sep 2024 12:43:01 +0200
schrieb Krzysztof Kozlowski <krzk@kernel.org>:
> On 18/09/2024 10:41, Andreas Kemnade wrote:
> > Add a driver for the charger in the TWL6030/32. For now it does not
> > report much in sysfs but parameters are set up for USB, charging is
> > enabled with the specified parameters. It stops charging when full
> > and also restarts charging.
> > This prevents ending up in a system setup where you run out of
> > battery although a charger is plugged in after precharge completed.
> >
> > Battery voltage behavior was checked via the GPADC.
> >
>
> Few stylistic comments below.
>
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> > drivers/power/supply/Kconfig | 10 +
> > drivers/power/supply/Makefile | 1 +
> > drivers/power/supply/twl6030_charger.c | 566
> > +++++++++++++++++++++++++ 3 files changed, 577 insertions(+)
> > create mode 100644 drivers/power/supply/twl6030_charger.c
> >
> > diff --git a/drivers/power/supply/Kconfig
> > b/drivers/power/supply/Kconfig index bcfa63fb9f1e2..9f2eef6787f7a
> > 100644 --- a/drivers/power/supply/Kconfig
> > +++ b/drivers/power/supply/Kconfig
> > @@ -493,6 +493,16 @@ config CHARGER_TWL4030
> > help
> > Say Y here to enable support for TWL4030 Battery Charge
> > Interface.
> > +config CHARGER_TWL6030
> > + tristate "OMAP TWL6030 BCI charger driver"
> > + depends on IIO && TWL4030_CORE
>
> || COMPILE_TEST, at least for TWL part
> (but please test first)
>
ERROR: modpost: "twl_i2c_write"
[drivers/power/supply/twl6030_charger.ko] undefined! ERROR: modpost:
"twl_i2c_read" [drivers/power/supply/twl6030_charger.ko] undefined!
>
> > + { }
> > +};
> > +MODULE_DEVICE_TABLE(of, twl_charger_of_match);
> > +
> > +static struct platform_driver twl6030_charger_driver = {
> > + .probe = twl6030_charger_probe,
> > + .driver = {
> > + .name = "twl6030_charger",
> > + .of_match_table =
> > of_match_ptr(twl_charger_of_match),
>
> I propose to drop of_match_ptr and maybe_unused, so this won't be
> restricted only to OF
>
so that more things get compile-tested without OF? But I see no reason
why .probe would be optimized away (and with it a lot more things) by
the compiler.
Regards,
Andreas
next prev parent reply other threads:[~2024-09-23 16:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-18 8:41 [PATCH 0/3] power: supply: twl6030/32 charger Andreas Kemnade
2024-09-18 8:41 ` [PATCH 1/3] dt-bindings: power: supply: Add TI TWL603X charger Andreas Kemnade
2024-09-18 10:46 ` Krzysztof Kozlowski
2024-09-18 8:41 ` [PATCH 2/3] dt-bindings: mfd: twl: add charger node also for TWL603x Andreas Kemnade
2024-09-18 10:47 ` Krzysztof Kozlowski
2024-09-18 11:35 ` Andreas Kemnade
2024-09-21 0:51 ` Rob Herring
2024-09-26 7:26 ` Andreas Kemnade
2024-09-18 8:41 ` [PATCH 3/3] power: supply: initial support for TWL6030/32 Andreas Kemnade
2024-09-18 10:43 ` Krzysztof Kozlowski
2024-09-18 12:43 ` Andreas Kemnade
2024-09-18 12:53 ` Krzysztof Kozlowski
2024-09-23 16:29 ` Andreas Kemnade [this message]
2024-09-24 8:00 ` Krzysztof Kozlowski
2024-09-18 21:11 ` kernel test robot
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=20240923182948.571eaa59@akair \
--to=andreas@kemnade.info \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
--cc=tony@atomide.com \
/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).