From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: michael.reeves077@gmail.com
Cc: Sven Peter <sven@kernel.org>, Janne Grunau <j@jannau.net>,
Neal Gompa <neal@gompa.dev>, Lee Jones <lee@kernel.org>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Hector Martin <marcan@marcan.st>,
Joey Gouly <joey.gouly@arm.com>
Subject: Re: [PATCH v6 0/2] Add Apple Silicon SMC power driver
Date: Fri, 30 Jan 2026 20:53:47 +0100 [thread overview]
Message-ID: <aX0L6Kb63My-PsGd@venus> (raw)
In-Reply-To: <20260126-b4-macsmc-power-v6-0-9861d4070f92@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4080 bytes --]
Hi,
On Mon, Jan 26, 2026 at 10:16:55AM +1100, Michael Reeves via B4 Relay wrote:
> This series adds a power supply driver for the Apple SMC found on
> Apple Silicon devices. This allows the kernel to report AC status,
> battery charging status, and power metrics, and modify the charging
> behaviour.
>
> The first patch adds the driver itself, and the second patch wires it
> up to the MFD core.
>
> The driver is based on an original out-of-tree implementation by
> Hector Martin. It has been refactored by myself for upstream inclusion,
> including support for newer SMC firmwares, devices without batteries,
> dynamic property detection and improved state management, among other
> things.
>
> This series is based ontop of the current linux-next at time of writing,
> the exact commit hash is listed below.
>
> Tested on: Apple M3 (MacBook Air, J613)
>
> Signed-off-by: Michael Reeves <michael.reeves077@gmail.com>
> ---
> Changes in v6:
> - Add FS header include for emergency_sync()
> - Link to v5: https://lore.kernel.org/r/20260126-b4-macsmc-power-v5-0-302462673b18@gmail.com
This fails to build as module, since emergency_sync() is not exported:
ERROR: modpost: "emergency_sync" [drivers/power/supply/macsmc-power.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
Greetings,
-- Sebastian
> Changes in v5:
> - Readd cover subject that mistakenly got dropped, apologies.
> - Link to v4: https://lore.kernel.org/r/20260126-b4-macsmc-power-v4-0-aa2a682ca650@gmail.com
>
> Changes in v4:
> - Restore Hector Martin as primary author for the series.
> - Restore downstream Co-developed-by and Signed-off-by tags.
> - Add Reviewed-by: Sven Peter <sven@kernel.org>.
> - Simplify MFD patch authorship and remove redundant tags.
> - Fix probe return value being overwritten by devm_work_autocancel.
> - Return -ENODEV in probe if neither battery nor AC adapter are found.
> - Add bounds check for nprops against MACSMC_MAX_BATT_PROPS.
> - Refactor macsmc_battery_set_charge_behaviour to remove unnecessary resets.
> - Improve critical_work shutdown flags and remove return.
> - Add comments explaining SMC key firmware history and flag meanings.
> - Clarify event ID descriptions and restore BSFC flag comments.
> - Remove redundant dev_dbg logs for missing battery or AC.
> - Link to v3: https://lore.kernel.org/r/20260115-b4-macsmc-power-v3-0-c236e09874be@gmail.com
>
> Changes in v3:
> - Rebase on top of latest linux-next
> - Drop charge control threshold properties.
> - Switch to devm_work_autocancel() for critical work.
> - Add platform ID table and remove MODULE_ALIAS.
> - Simplify property array management in struct macsmc_power.
> - Improve probe error handling and device pointer usage.
> - Minor style and indentation fixes.
> - Link to v2: https://lore.kernel.org/r/20260109-b4-macsmc-power-v2-0-93818f1e7d62@gmail.com
>
> Changes in v2:
> - Added Reviewed-by: Neal Gompa <neal@gompa.dev> to all patches.
> - Fixed Makefile alignment by using tabs for the macsmc-power entry.
> - Upgraded physical battery exhaustion log level to EMERG.
> - Downgraded software-triggered orderly poweroff log level to CRIT.
> - Added check for CHIS key to skip AC registration on desktop models.
> - Link to v1: https://lore.kernel.org/r/20260105-b4-macsmc-power-v1-0-62954c42a555@gmail.com
>
> ---
> Hector Martin (2):
> power: supply: Add macsmc-power driver for Apple Silicon
> mfd: macsmc: Wire up Apple SMC power driver
>
> MAINTAINERS | 1 +
> drivers/mfd/macsmc.c | 1 +
> drivers/power/supply/Kconfig | 11 +
> drivers/power/supply/Makefile | 1 +
> drivers/power/supply/macsmc-power.c | 852 ++++++++++++++++++++++++++++++++++++
> 5 files changed, 866 insertions(+)
> ---
> base-commit: ca3a02fda4da8e2c1cb6baee5d72352e9e2cfaea
> change-id: 20260125-b4-macsmc-power-bb30389e05f1
>
> Best regards,
> --
> Michael Reeves <michael.reeves077@gmail.com>
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-01-30 19:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 23:16 [PATCH v6 0/2] Add Apple Silicon SMC power driver Michael Reeves via B4 Relay
2026-01-25 23:16 ` [PATCH v6 1/2] power: supply: Add macsmc-power driver for Apple Silicon Michael Reeves via B4 Relay
2026-01-25 23:16 ` [PATCH v6 2/2] mfd: macsmc: Wire up Apple SMC power driver Michael Reeves via B4 Relay
2026-01-30 19:53 ` Sebastian Reichel [this message]
2026-01-30 23:30 ` [PATCH v6 0/2] Add Apple Silicon " Michael Reeves
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=aX0L6Kb63My-PsGd@venus \
--to=sebastian.reichel@collabora.com \
--cc=asahi@lists.linux.dev \
--cc=j@jannau.net \
--cc=joey.gouly@arm.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=michael.reeves077@gmail.com \
--cc=neal@gompa.dev \
--cc=sven@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