All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Daniel Palmer" <daniel@thingy.jp>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 6/8] ARM: dts: mstar: miyoo-mini: Add vbat switch
Date: Mon, 13 Jul 2026 11:09:39 +0000	[thread overview]
Message-ID: <20260713110940.122981F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260713105950.1346962-7-daniel@thingy.jp>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing `regulator-boot-on` will cause a power glitch if the rail is already on, or `regulator-always-on` will drain battery if it's an ADC switch.
--

--- Patch [6]: [PATCH 6/8] ARM: dts: mstar: miyoo-mini: Add vbat switch ---
commit a658b11235430fff38550ae571d1b7afe1a12775
Author: Daniel Palmer <daniel@0x0f.com>

ARM: dts: mstar: miyoo-mini: Add vbat switch

This commit adds a GPIO-controlled fixed regulator for the battery voltage
rail on the Miyoo Mini device.

> diff --git a/arch/arm/boot/dts/sigmastar/mstar-infinity2m-ssd202d-miyoo-mini.dts b/arch/arm/boot/dts/sigmastar/mstar-infinity2m-ssd202d-miyoo-mini.dts
> index 5e927f41fa733..fde4703eb52bc 100644
> --- a/arch/arm/boot/dts/sigmastar/mstar-infinity2m-ssd202d-miyoo-mini.dts
> +++ b/arch/arm/boot/dts/sigmastar/mstar-infinity2m-ssd202d-miyoo-mini.dts
[ ... ]
> @@ -24,6 +26,15 @@ vibrator {
>  		enable-gpios = <&gpio SSD20XD_GPIO_UART0_TX GPIO_ACTIVE_LOW>;
>  	};
>  
> +	reg_vbat: regulator-vbat {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vbat";
> +		regulator-min-microvolt = <4200000>;
> +		regulator-max-microvolt = <4200000>;
> +		gpio = <&gpio SSD20XD_GPIO_GPIO85 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		regulator-always-on;

[Severity: Medium]
Will this configuration cause a power glitch during probe or an unintended
battery drain?

Because regulator-boot-on is omitted, the fixed regulator driver initializes
the GPIO request as GPIOD_OUT_LOW, instantly dropping the line to 0V. The
regulator core will later process regulator-always-on and re-enable it, but
this gap can cause a power glitch if this rail is a system power hold latch
already enabled by the bootloader.

Alternatively, if this GPIO controls a voltage divider switch for an ADC
reading, leaving it regulator-always-on will cause a continuous battery
drain. 

Should regulator-boot-on be added, or regulator-always-on be removed
depending on the exact hardware function?

> +	};
>  };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260713105950.1346962-1-daniel@thingy.jp?part=6

  reply	other threads:[~2026-07-13 11:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 10:59 [PATCH 0/8] ARM: mstar: Board filling out pt. 1 Daniel Palmer
2026-07-13 10:59 ` [PATCH 1/8] ARM: dts: mstar: unitv2: Wire up LEDs Daniel Palmer
2026-07-13 10:59 ` [PATCH 2/8] ARM: dts: mstar: unitv2: Add regulators Daniel Palmer
2026-07-13 11:08   ` sashiko-bot
2026-07-13 10:59 ` [PATCH 3/8] ARM: dts: mstar: unitv2: Add button Daniel Palmer
2026-07-13 10:59 ` [PATCH 4/8] ARM: dts: mstar: unitv2: Link cpu to core regulator Daniel Palmer
2026-07-13 11:07   ` sashiko-bot
2026-07-13 10:59 ` [PATCH 5/8] ARM: dts: mstar: miyoo-mini: Add vibrator Daniel Palmer
2026-07-13 11:08   ` sashiko-bot
2026-07-13 10:59 ` [PATCH 6/8] ARM: dts: mstar: miyoo-mini: Add vbat switch Daniel Palmer
2026-07-13 11:09   ` sashiko-bot [this message]
2026-07-13 10:59 ` [PATCH 7/8] ARM: dts: mstar: sbc2d06: Add regulators Daniel Palmer
2026-07-13 11:08   ` sashiko-bot
2026-07-13 10:59 ` [PATCH 8/8] ARM: dts: mstar: ssd201htv2: Add SD card supply regulator Daniel Palmer
2026-07-13 11:11   ` sashiko-bot

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=20260713110940.122981F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel@thingy.jp \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.