From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 3D02C1F8723 for ; Sun, 23 Aug 2026 16:34:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787502882; cv=none; b=fV6Ekq3MVgEQt8qvMhi4+bu3bKWTZShzcvOoJ8X6dbtTpO2nI9wbmpEIBfOoxfj7MhHQUWC3TSz+F1v07eJWP+QJgP8JgiGoxK5Ou8yTnw5lF6r6SRrTKXFt6F9VGlYaCG5G3ieoIXCUOAovYHS7tMl58ShQNX2PmY3NlG2A+d8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787502882; c=relaxed/simple; bh=EbN1/J7NyFAesm0YIMkY7NgzVua37K6iIPmF+Cbslek=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Np1353Up5tUe4l0hb15pXaQOUDUGS7VZR2cFbHnb7iapgObpM5xq2Dszk5fjw6/4iNnJDI44Q+dPeWkyeqmDJVveFIUdrLgirppqcSWs25/4L3BNZVGbUy/2zL3FT7SRbRLBFv7RhSJxMrODTqwsJUk9i6ARbYrzaiHV+KdpLrc= 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=CUSizI81; arc=none smtp.client-ip=209.85.216.50 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="CUSizI81" Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-38ec1402b05so1893529a91.2 for ; Sun, 23 Aug 2026 09:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787502880; x=1788107680; 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:content-type; bh=yRZGP91hmqwJACNaVBPS28tDx/Jx08bZped2WwvQ79c=; b=CUSizI81GVXPNs/Zw599Gv7Yv+rQaoanDHogR3eMF/pPjGDANbymm5tJzRnpo4RSO+ fA3hV+PGTjZw4dPUL17wAAW/OY67c3rJHkCLvCSK/IofwPxFTdKlZGp/dVHL+73ljB76 Dsw6warlJDrI8wcZ2kfE/DOCsyWA4FM7m4FoggU6Ha8uhuKhe4NAiiHG8IRZU+iM7+ui rRrZP1a1pcJSWHGA43Inv3Kc+1We7huMvNqU2upgL7FOZfC0RTOp/64cDG+kVncx7GIM HII83r1g/LIy5lUPigAmBo2ZbLEoqVoX6L6lXPUf6OuM35QLTz7oLZOmyUAhqg45ntMO 1ekQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787502880; x=1788107680; 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:content-type; bh=yRZGP91hmqwJACNaVBPS28tDx/Jx08bZped2WwvQ79c=; b=iuHfXfKWwSVwZoIo8Qbnfxzl5/ytpBDxlx5MmO/xmB1ls4ZS/oWH5uuYNBEOOvzzDe W9MYjKwjPpahREAKyYMqbIfCYocVAt4WRj3kG0jd2yB9cOtU+axQsP1l9F4ZJhDDQifh /bh5ZId1uJ9+v6YVo3OOUo8rxjjHZ20jS4963gg1jP1lEKyICn7OtHxhftU2LcWNGbeN xCspdet7yImdyt0ZyzBdNk+W0G3MLQQzZrF3hbHT7v0MqfA44hNNsW5GyQBjGdDUjqvr Sb933gGskXXS+2gWmWaypwr13T91XRxOPEEZVq7ZI252j5FjUXh211zBJF3ByhX7w/yt CLxA== X-Forwarded-Encrypted: i=1; AHgh+Rq6XlMez7yuCwpoibLlMKTMC5OXoDX2odOt8LKq8meLFfL6vhxht9CEziRKDgpex33mV69IHvOis2Qjw6Q=@vger.kernel.org X-Gm-Message-State: AFuF++nr4IgpLPlrfhTuRClQDKlbz8Ct7/p0fqhga1Io1Qj9t/pDW3Ck iePOyXvO/c34WSWW20hxqV4SOqiQWbxntJyu67bBpiunTbZ0/yY1Vdsa X-Gm-Gg: AR+sD127lWFaTHxXLTRde59rt5Ufn0td1kif/VGpj7QeFTGdS78Uhwfitl0I1xnVqGt ozanwL/8gSB4Wbpl7+dQtJtviLHuSIBlIdI9eCV4o8PAIzws+TilKDbl4j7+X+vBod2RW2vb10d lWcCi8JcfCGldey7e3lHkK4W7I+9nSl01e4CEFheNkO6G388xIGb6g5umZdNTyWrR6cyMt+Aw/6 LS+4i25diHcEqWekH/QYRdGqczT6FKN4r+aJZ2Qq7H2QzSKBa8k/SzdCgfiqUcl89CBLAnbqisi wCfqCkwJiyJWw/jLReHJFDpbFFRAqDV6J9ENZWEnXqk0XtRs7UE8UX7GyS4zzfvUrrldw/6endC zmyx1RVGst3kzpzN5KF4JUwZlSvPxpNbhNlcDa+TK9+aQp28ieiYdQrf2iaL5AXfr6ZJsYLUGGw QipeDU1V2VvgHinMw/XvXkw+3+zfpxf91Tj/2fVzxOkbolvzGlHDQ1EKJqHiaU8K1dAEkRLtvU/ CFS1I4dThzvinUQhUFK6viNS3PWuFhohopYxu2OCaSKf5AWv0giLcJ30shoLj4Phu3xL2vR4Jet 9hboFCAaZLLxPbsRQvsjcgYXJptlx5Y= X-Received: by 2002:a17:90b:3d8a:b0:395:4de9:b30 with SMTP id 98e67ed59e1d1-395c353e28dmr36726682a91.5.1787502880486; Sun, 23 Aug 2026 09:34:40 -0700 (PDT) Received: from Mac.net (198-27-228-154.fiber.dynamic.sonic.net. [198.27.228.154]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-141860ef75esm17084319c88.7.2026.08.23.09.34.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 23 Aug 2026 09:34:39 -0700 (PDT) From: Ahmad Byagowi To: Andi Shyti Cc: Peter Rosin , Jakub Kicinski , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Ahmad Byagowi Subject: [PATCH v7 0/3] i2c: mux: Propagate software nodes to channel adapters Date: Sun, 23 Aug 2026 09:34:35 -0700 Message-ID: X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Device Tree channel nodes are associated with the adapters created by i2c-mux, but equivalent software-node descriptions are not. Use generic firmware-node operations for the channel lookup so child I2C devices can be instantiated from software-node properties. This is the I2C prerequisite split out of the Time Card series. The first patch fixes the existing Device Tree channel-node leak on adapter-add failure. The second factors the Device Tree lookup into a helper without changing behavior. The third converts that helper and the node lifetime handling to generic firmware-node operations. The dependent ptp_ocp board profiles will be resent to net-next after the LED and I2C prerequisites land. --- Changes since v6: - Split the existing Device Tree leak fix into its own patch. - Add a preparatory patch that only factors out the OF lookup. - Convert the helper to generic firmware-node operations in the final patch. - Drop the separate private software-node pointer and use the adapter's firmware node for cleanup. - Save the firmware node before adapter deletion, then release it afterwards following the i2c-atr lifetime pattern. - Rebase onto the current I2C i2c-next branch. Validation: - git diff --check - strict checkpatch - x86-64 Clang syntax check v6: https://lore.kernel.org/r/eb4a8ab1eedd8a01ca34c6a7e0685639d0498423.1787247467.git.ahmadexp@gmail.com/ Ahmad Byagowi (3): i2c: mux: Fix channel node leak on adapter add failure i2c: mux: Factor out channel node lookup i2c: mux: Propagate software nodes to channel adapters drivers/i2c/i2c-mux.c | 96 +++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 44 deletions(-) base-commit: cd5fec79af3fa04e88e5900cdfa56d5525f5740b -- 2.50.1 (Apple Git-155)