{"id":2226558,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2226558/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/cover/cover.1776872453.git.happycpu@gmail.com/","project":{"id":42,"url":"http://patchwork.ozlabs.org/api/1.1/projects/42/?format=json","name":"Linux GPIO development","link_name":"linux-gpio","list_id":"linux-gpio.vger.kernel.org","list_email":"linux-gpio@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<cover.1776872453.git.happycpu@gmail.com>","date":"2026-04-22T16:05:02","name":"[v1,0/2] gpio: 74x164: seed the chain from DT at probe time","submitter":{"id":93205,"url":"http://patchwork.ozlabs.org/api/1.1/people/93205/?format=json","name":"Chanhong Jung","email":"happycpu@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/linux-gpio/cover/cover.1776872453.git.happycpu@gmail.com/mbox/","series":[{"id":501038,"url":"http://patchwork.ozlabs.org/api/1.1/series/501038/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/list/?series=501038","date":"2026-04-22T16:05:02","name":"gpio: 74x164: seed the chain from DT at probe time","version":1,"mbox":"http://patchwork.ozlabs.org/series/501038/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2226558/comments/","headers":{"Return-Path":"\n <linux-gpio+bounces-35361-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-gpio@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=pwSGLXR3;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35361-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"pwSGLXR3\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.180","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g13yl6GYJz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 02:07:27 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id F3081302AB73\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 16:05:26 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 139B137D13A;\n\tWed, 22 Apr 2026 16:05:13 +0000 (UTC)","from mail-pf1-f180.google.com (mail-pf1-f180.google.com\n [209.85.210.180])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id CE4B937D10A\n\tfor <linux-gpio@vger.kernel.org>; Wed, 22 Apr 2026 16:05:10 +0000 (UTC)","by mail-pf1-f180.google.com with SMTP id\n d2e1a72fcca58-82735a41920so2325072b3a.2\n        for <linux-gpio@vger.kernel.org>;\n Wed, 22 Apr 2026 09:05:10 -0700 (PDT)","from happycpu-p1.. ([121.160.151.7])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82f8ec003dcsm18151031b3a.52.2026.04.22.09.05.06\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 22 Apr 2026 09:05:09 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776873912; cv=none;\n b=BIRC6tZKdcx7agEyG7b4lrP0UYke5vo9VNzkAtO9aBcxDPyHPwNXQyn/BdWp55vtYuq26nrKDsC8XQMriA4Oj36/bejLPq6cZISiRGdwZ5QLHQ8Kx1sAWZBRBur2c1yF0nuFvSP4//9oNS5RscKh09cjmivr3IaiVw7w71s/eMI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776873912; c=relaxed/simple;\n\tbh=Tr/lZj2BPFruRnd6bHXXaaBZdHcN2WN1PTBnF3Qh+d4=;\n\th=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type;\n b=Ed0MrowFcDAUMpJoNbMRokxTGTaduZB8X8gFyM47dteETx9A2bIgYk7pok+67eYv6sOc3eRVGJ3qIQLq51O79nPnSPrin4yTRnj7cWWrAZS12Cgfr60Rx25ydubfxNVLv6KlgkyovSzidVfVpuyN0msM/5LRaP9eCSTEfNnF0Fo=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=pwSGLXR3; arc=none smtp.client-ip=209.85.210.180","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776873910; x=1777478710;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=tB86gMfHGoJ2KWqInX4kv4EkEdH3ANzmQQzn8Z0dCas=;\n        b=pwSGLXR32mce0cs4ZHu/q8OYuyqhxrYC6ATklbXOjPXvtEAq74kpx1YsXGoLHLxFh6\n         aWg0VwzMbVcRzUscsrBRNT4KadttNSNyRDNE8+1LBcevCMPLl2ogUjsOaeavA2c0zWv5\n         E9GGCTGkYtUbXt9YaBE80v0kCBg0bzJRL5nco6+25yud8yO8k+sCC2g/1R4UTR8TaqNO\n         6wWNTnVLjLbQ0EfsAfE2nPL9spYEIeoyVIqec+OLt7IcuOzCCllkUESFf+0LKndov0O9\n         FAY7LDVpbjKO1nOIXXt/gduyxCBpj4TFPR4V9Qnao20TbxSXLU36zsLieuQ8BP7wvYZP\n         At1w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776873910; x=1777478710;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=tB86gMfHGoJ2KWqInX4kv4EkEdH3ANzmQQzn8Z0dCas=;\n        b=JVsdlrzKlKc1Fg+iUe9ziIG72j1YuHZU2UWzTR0Pt0zXxbMqnkSPBbsmjlo75AjlA7\n         3Jsz8HIoj0FrVzXuXPgfhFPJ5HOV+kBSNxE4KrzQatqf/dFUkPDSscHyXEgP5DNj4VCG\n         GLlbH+Hqaq5MswW1wLcQbG858kCYj313xUpTOLF00gGcANbnHvKk1UoKYqvZtiDdbHFD\n         UTvB+l6/AmNMAgrN2y9rrHOv44IHzJC5blGcqUNbbR1g7x3d+TPKKM684kONmUS7B6G/\n         gjFYYg2XZcVxLFyVKOeBlha4rOkZXRqiVIMYYa2Kf5/7cRnLL7Aid8aIxVkbQPJt85pF\n         N0Zg==","X-Gm-Message-State":"AOJu0YwleKxy3W1YZqYBUHDPQLo46xfopPrXYGvXQpmw1auVGo3B6dlP\n\t2EA3oGZ546mB+F6druR5l00sZEpFcrKHat5C6mAUZDFcDE7wrwcljSLf","X-Gm-Gg":"AeBDievaa+gIJTnDKK+U1hemUPcoD3/5J+g7QTJmspiW48fCPfCc1ZT9ekJyoI2ksTq\n\tkbem74GMqMX4ThcpPJXo0LPomtAREcztosQ5vOIAcRnFpDA7b/QeUYAq+KSpzRtRTlVxL8WHoFk\n\tLTotF6hnWD4Daqhk7LRHiUWxS/araKT2Bd7QXPSl360NX+b79WNoqzAxV/tJejnp73MQorlNMyB\n\tfTER1QnZ313zbWuT40nX4CVc2tMztwPD9kWWFC0hZeCHOMbN0UE+Tyf9HudVaiS0fpY0krb0xy0\n\tcFWRHvXgg+iH0n0D1aqidSuaRHGGInQ7Jy1zvFS1x0kn/8MHdDCdZwZTL5RiIieZB+2e+5edxKr\n\tkgp3pVtmVoIkl8xn4KWJjx1vEVftW/LhFk1ow+HtE2v9zAVgmB8WKl7if9VoJVLTrjH6oxTH26w\n\tRZH4nAsk/iNRXU/s00ulMOTMlFF5Hv2M39R6HbHMfkMWiaANv+h8cocm7dVTyssson","X-Received":"by 2002:a05:6a00:1956:b0:824:afe1:f7e3 with SMTP id\n d2e1a72fcca58-82f8c82bc5fmr25641307b3a.15.1776873909802;\n        Wed, 22 Apr 2026 09:05:09 -0700 (PDT)","From":"Chanhong Jung <happycpu@gmail.com>","To":"Linus Walleij <linusw@kernel.org>,\n\tBartosz Golaszewski <brgl@kernel.org>,\n\tRob Herring <robh@kernel.org>,\n\tKrzysztof Kozlowski <krzk+dt@kernel.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tMaxime Ripard <mripard@kernel.org>","Cc":"linux-gpio@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-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":"<cover.1776872453.git.happycpu@gmail.com>","X-Mailer":"git-send-email 2.34.1","Precedence":"bulk","X-Mailing-List":"linux-gpio@vger.kernel.org","List-Id":"<linux-gpio.vger.kernel.org>","List-Subscribe":"<mailto:linux-gpio+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-gpio+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit"},"content":"Hi all,\n\nThis short series lets the 74HC595/74LVC594 shift-register driver\ninitialise its chain to a board-specified pattern before the gpiochip\nis registered, via a new optional 'registers-default' DT property.\n\nMotivation\n----------\n\n74HC595 chains latch their outputs from the first serial write onwards.\nThe current driver always issues that first write from a zeroed buffer\nduring probe, so every output comes up low until user space intervenes.\n\nBoards that wire the chain to signals whose power-on state matters\n(active-low indicators, reset lines, early-boot status LEDs, etc.) have\nno DT-level way to express the intended initial pattern today, and must\nrecreate it in user space after every probe.\n\nThe property and layout documented here have been honoured by U-Boot's\nmatching driver (drivers/gpio/74x164_gpio.c) for years, so this change\nalso restores binding parity between the two boot stages: whichever one\nowns the chain first can leave it in a known state for the next.\n\nValidation\n----------\n\nTested on stm32mp153d-ssonic, which drives 16 active-low LEDs from two\ncascaded 74HC595s with 'registers-default = /bits/ 8 <0xff 0xff 0x00\n0x00>;'. With the series applied, the LED bank comes up in its defined\noff-state from probe onwards; without it, the bank flashes on briefly\non every reboot until the user-space init writes the pattern.\n\nTooling:\n  - scripts/checkpatch.pl --strict: 0 errors, 0 warnings on each patch\n  - make dt_binding_check DT_SCHEMA_FILES=fairchild,74hc595: passes\n    (example DTS extracted, compiled, and validated against the new\n     schema)\n  - dt-validate on a built stm32mp153d-ssonic.dtb against the updated\n    processed-schema.json: 'registers-default' accepted cleanly; no\n    regressions against the rest of the 74hc595 binding\n\nPatch 1 adds the binding property. Patch 2 consumes it in the driver.\n\nThanks for your time and reviews — feedback very welcome.\n\nChanhong\n\nChanhong Jung (2):\n  dt-bindings: gpio: fairchild,74hc595: add registers-default property\n  gpio: 74x164: support 'registers-default' DT property for initial\n    state\n\n .../bindings/gpio/fairchild,74hc595.yaml           | 10 ++++++++++\n drivers/gpio/gpio-74x164.c                         | 14 ++++++++++++++\n 2 files changed, 24 insertions(+)\n\n--\n2.34.1"}