From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DC3337D12E for ; Wed, 22 Apr 2026 16:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776873913; cv=none; b=gk0K7gedYtVpZJEeArp1V4jxryEZL9RIIV92b2/ESTLqlqUpyEhcQP57J2tme1HeiUMxgci0jnq3uEqMpvJBlWa67BupymHFiuhWoXzRPUQkdR1ioODNgw9QK3Pagz4O3AwcQ6D/HnYFBPuLYn9RPEGFMLQsU+hkpZ8fMsZJPsA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776873913; c=relaxed/simple; bh=Tr/lZj2BPFruRnd6bHXXaaBZdHcN2WN1PTBnF3Qh+d4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=YHm46whabm2b8Jju3pXV97Hiu8ljIgq1Chbcn35UuhbNZRfsbP3l00Y/36OzmGxCtOeaTfWjUUiMRHg+p/Ttp/88PVBn3o6YcJqUnCZqFwVZUxjtSzACt5FwLrNiLBP+Zv7mNCIHFHsQ6AtZldbfKvFZtzpdPNegJv9aW4Q6tY4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=pwSGLXR3; arc=none smtp.client-ip=209.85.210.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pwSGLXR3" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-82f8cebc935so2477163b3a.0 for ; Wed, 22 Apr 2026 09:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776873910; x=1777478710; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tB86gMfHGoJ2KWqInX4kv4EkEdH3ANzmQQzn8Z0dCas=; b=pwSGLXR32mce0cs4ZHu/q8OYuyqhxrYC6ATklbXOjPXvtEAq74kpx1YsXGoLHLxFh6 aWg0VwzMbVcRzUscsrBRNT4KadttNSNyRDNE8+1LBcevCMPLl2ogUjsOaeavA2c0zWv5 E9GGCTGkYtUbXt9YaBE80v0kCBg0bzJRL5nco6+25yud8yO8k+sCC2g/1R4UTR8TaqNO 6wWNTnVLjLbQ0EfsAfE2nPL9spYEIeoyVIqec+OLt7IcuOzCCllkUESFf+0LKndov0O9 FAY7LDVpbjKO1nOIXXt/gduyxCBpj4TFPR4V9Qnao20TbxSXLU36zsLieuQ8BP7wvYZP At1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776873910; x=1777478710; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tB86gMfHGoJ2KWqInX4kv4EkEdH3ANzmQQzn8Z0dCas=; b=oQ7y+16GPUNM8zUZM/rapP3lal6WfX1Q2g8AeXG+Z/SEr+99J1RlFZbxJtiP3zebAF KH4VTWc+ERuwN6VId9kW5fZhGTanfInsf9sYqL8t+QnA+UHys1Bru5UVHGMMAt2TAziD 1zyn9DR0h9DfErr0kPAwnak0UOcxtTx0oi0b+sP58dPopmvPwX+RiEQcfuT8mge2iPRx 5iCY1bTIAcj52PfcrHsHzvKM+5NVusgzE26A4JbC+W0w1ZX0uU5KUqtfefWifIB3Vk+t QLvC0RMbfbNhbM0a1odADIlEXHprcMcDdYQCsgPEp8mVx8qCTxEXNG2SEFTTS5oawM2g gHpw== X-Forwarded-Encrypted: i=1; AFNElJ/AbGgRj52Z+DJ7VJ5D1MisePZPftuIB9AW4r990F5uthkDK9WqElvPEDSc6sD5F3Glnft9DnI15ccLeS4=@vger.kernel.org X-Gm-Message-State: AOJu0YwdFVA5fZ3cDyR+i5InrWDC4h8t5oYE75qqit8nU4PG3JM9P7Cb fwiXNrbsgMRDEH2KuejGHiWcfcMc/uIAt2WEKLSbVLkCdJZ02+4gzssn X-Gm-Gg: AeBDiesi7P7XCOaqsqPEEtJzqq2lTTXxNyOlVZ0/X3tRxEUn0B6C97AvLtT8m3r9fu/ TYpK5QvS9yTBsPZZTbPUNTEzwKLlmSnLSXoeVtKDkKn7xvlTkm+KcMwkdr7foWMS7tiYwOfAN1p bj6nRQ74041ATAbAJP1poMRiFb4NyQrSXGZlLNG0Tdta3+gmjU38VcktqSNy/TAXV9/n75jwRVf uhzhYumcea22MQKzh7Ksg3oBc7CzS7/1QcW7qCls+ljZqmaGKDbdxNyjEZn6PGXgsd8t5nP7gbG vkgwRzYS7TvUkbuhGvdTyrI1lgagbIakA567K+J0JW6veIITvFZ5GAmjMN1m/2hUT8b7p8+62+c aAJq+pBa450c+3S2wVxQ7B1qVLjT/NmpuT1u4mb0OztpyEXZW4MDbQJ+9dNB78kk1QOxiVstnc7 QxMFeGeTwcDdhaK8LJVqLrw9vj6rd/J8CoxcKg9vHvmXZf7EuJocMGAtUoi1f0bXnT X-Received: by 2002:a05:6a00:1956:b0:824:afe1:f7e3 with SMTP id d2e1a72fcca58-82f8c82bc5fmr25641307b3a.15.1776873909802; Wed, 22 Apr 2026 09:05:09 -0700 (PDT) Received: from happycpu-p1.. ([121.160.151.7]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82f8ec003dcsm18151031b3a.52.2026.04.22.09.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2026 09:05:09 -0700 (PDT) From: Chanhong Jung To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Ripard Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 0/2] gpio: 74x164: seed the chain from DT at probe time Date: Thu, 23 Apr 2026 01:05:02 +0900 Message-Id: X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi all, This short series lets the 74HC595/74LVC594 shift-register driver initialise its chain to a board-specified pattern before the gpiochip is registered, via a new optional 'registers-default' DT property. Motivation ---------- 74HC595 chains latch their outputs from the first serial write onwards. The current driver always issues that first write from a zeroed buffer during probe, so every output comes up low until user space intervenes. Boards that wire the chain to signals whose power-on state matters (active-low indicators, reset lines, early-boot status LEDs, etc.) have no DT-level way to express the intended initial pattern today, and must recreate it in user space after every probe. The property and layout documented here have been honoured by U-Boot's matching driver (drivers/gpio/74x164_gpio.c) for years, so this change also restores binding parity between the two boot stages: whichever one owns the chain first can leave it in a known state for the next. Validation ---------- Tested on stm32mp153d-ssonic, which drives 16 active-low LEDs from two cascaded 74HC595s with 'registers-default = /bits/ 8 <0xff 0xff 0x00 0x00>;'. With the series applied, the LED bank comes up in its defined off-state from probe onwards; without it, the bank flashes on briefly on every reboot until the user-space init writes the pattern. Tooling: - scripts/checkpatch.pl --strict: 0 errors, 0 warnings on each patch - make dt_binding_check DT_SCHEMA_FILES=fairchild,74hc595: passes (example DTS extracted, compiled, and validated against the new schema) - dt-validate on a built stm32mp153d-ssonic.dtb against the updated processed-schema.json: 'registers-default' accepted cleanly; no regressions against the rest of the 74hc595 binding Patch 1 adds the binding property. Patch 2 consumes it in the driver. Thanks for your time and reviews — feedback very welcome. Chanhong Chanhong Jung (2): dt-bindings: gpio: fairchild,74hc595: add registers-default property gpio: 74x164: support 'registers-default' DT property for initial state .../bindings/gpio/fairchild,74hc595.yaml | 10 ++++++++++ drivers/gpio/gpio-74x164.c | 14 ++++++++++++++ 2 files changed, 24 insertions(+) -- 2.34.1